aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-01 10:43:06 -0700
committerAllan Wang <me@allanwang.ca>2017-06-01 10:43:06 -0700
commitd924fd96dd3dff3b13af3a1ea112e0e784ce65bb (patch)
tree7a17c4e7f2f37110ca7671bdc56f9ee3d54dc181 /app/src/main/kotlin/com/pitchedapps
parent4cbcabb122e4bdf5d8e3eb67213ec7270d7aa9f0 (diff)
downloadfrost-d924fd96dd3dff3b13af3a1ea112e0e784ce65bb.tar.gz
frost-d924fd96dd3dff3b13af3a1ea112e0e784ce65bb.tar.bz2
frost-d924fd96dd3dff3b13af3a1ea112e0e784ce65bb.zip
cleanup
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt5
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt37
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt2
3 files changed, 42 insertions, 2 deletions
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)
}