From d924fd96dd3dff3b13af3a1ea112e0e784ce65bb Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 1 Jun 2017 10:43:06 -0700 Subject: cleanup --- .idea/misc.xml | 2 +- app/build.gradle | 12 ++++--- .../kotlin/com/pitchedapps/frost/MainActivity.kt | 5 ++- .../com/pitchedapps/frost/WebOverlayActivity.kt | 37 ++++++++++++++++++++++ .../com/pitchedapps/frost/fragments/WebFragment.kt | 2 +- app/src/main/res/layout/activity_web_overlay.xml | 21 ++++++++++++ app/src/main/res/layout/login_teest.xml | 20 ------------ app/src/main/res/xml/changelog.xml | 14 +++++++- docs/Changelog.md | 5 ++- gradle.properties | 4 ++- 10 files changed, 92 insertions(+), 30 deletions(-) create mode 100644 app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt create mode 100644 app/src/main/res/layout/activity_web_overlay.xml delete mode 100644 app/src/main/res/layout/login_teest.xml diff --git a/.idea/misc.xml b/.idea/misc.xml index 3ea8f885..5e76ef5d 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -121,7 +121,7 @@ - + diff --git a/app/build.gradle b/app/build.gradle index 362ac6b8..c25418ad 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,7 +56,7 @@ dependencies { compile "com.jakewharton.timber:timber:${TIMBER}" //Dialog - compile "com.afollestad.material-dialogs:core:${MD}" + compile "com.afollestad.material-dialogs:core:${MATERIAL_DIALOG}" compile "com.github.Raizlabs.DBFlow:dbflow:${DBFLOW}" compile "com.github.Raizlabs.DBFlow:dbflow-core:${DBFLOW}" @@ -103,11 +103,15 @@ dependencies { compile "com.github.bumptech.glide:glide:${GLIDE}" annotationProcessor "com.github.bumptech.glide:compiler:${GLIDE}" - compile "com.google.auto.value:auto-value:${AUTO}" - annotationProcessor "com.google.auto.value:auto-value:${AUTO}" - annotationProcessor "com.ryanharter.auto.value:auto-value-parcel:${AUTO_VALUE_PARCEL}" +// compile "com.google.auto.value:auto-value:${AUTO}" +// annotationProcessor "com.google.auto.value:auto-value:${AUTO}" +// annotationProcessor "com.ryanharter.auto.value:auto-value-parcel:${AUTO_VALUE_PARCEL}" compile "com.f2prateek.rx.preferences2:rx-preferences:${RX_PREFS}" + + compile("com.mikepenz:materialdrawer:${MATERIAL_DRAWER}@aar") { + transitive = true + } } kapt { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt index 41de3578..2cf8cd5b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt @@ -12,6 +12,7 @@ import android.support.v7.widget.Toolbar import android.view.Menu import android.view.MenuItem import butterknife.ButterKnife +import com.mikepenz.materialdrawer.Drawer import com.pitchedapps.frost.dbflow.loadFbTabs import com.pitchedapps.frost.dbflow.saveAsync import com.pitchedapps.frost.facebook.FbTab @@ -28,6 +29,7 @@ class MainActivity : AppCompatActivity() { val viewPager: ViewPager by bindView(R.id.container) val fab: FloatingActionButton by bindView(R.id.fab) val tabs: TabLayout by bindView(R.id.tabs) + lateinit var drawer: Drawer override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -70,7 +72,8 @@ class MainActivity : AppCompatActivity() { // finish() } R.id.action_changelog -> Changelog.show(this) - R.id.action_call -> {} + R.id.action_call -> { + } R.id.action_db -> adapter.pages.saveAsync(this) R.id.action_restart -> { finish(); diff --git a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt new file mode 100644 index 00000000..25c20594 --- /dev/null +++ b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt @@ -0,0 +1,37 @@ +package com.pitchedapps.frost + +import android.content.Context +import android.content.Intent +import android.os.Bundle +import android.support.v4.widget.SwipeRefreshLayout +import android.support.v7.app.AppCompatActivity +import android.support.v7.widget.Toolbar +import butterknife.ButterKnife +import com.pitchedapps.frost.utils.bindView +import com.pitchedapps.frost.web.FrostWebView + +/** + * Created by Allan Wang on 2017-06-01. + */ +class WebOverlayActivity : AppCompatActivity() { + + val toolbar: Toolbar by bindView(R.id.toolbar) + val refresh: SwipeRefreshLayout by bindView(R.id.swipe_refresh) + val web: FrostWebView by bindView(R.id.frost_webview) + + companion object { + private const val ARG_URL = "arg_url" + fun newInstance(context: Context, url: String) { + val intent = Intent(context, WebOverlayActivity::class.java) + intent.putExtra(ARG_URL, url) + context.startActivity(intent) + } + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_web_overlay) + ButterKnife.bind(this) + setSupportActionBar(toolbar) + } +} \ No newline at end of file diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt index ba9584eb..f55579e0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt @@ -25,7 +25,7 @@ class WebFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener { } companion object { - private val ARG_URL = "arg_url" + private const val ARG_URL = "arg_url" fun newInstance(position: Int, url: String) = BaseFragment.newInstance(WebFragment(), position).putString(ARG_URL, url) } diff --git a/app/src/main/res/layout/activity_web_overlay.xml b/app/src/main/res/layout/activity_web_overlay.xml new file mode 100644 index 00000000..1e81dba7 --- /dev/null +++ b/app/src/main/res/layout/activity_web_overlay.xml @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/app/src/main/res/layout/login_teest.xml b/app/src/main/res/layout/login_teest.xml deleted file mode 100644 index 47e72acd..00000000 --- a/app/src/main/res/layout/login_teest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - -