diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-22 19:50:44 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-22 19:50:44 -0700 |
commit | da5967f87b8a0e9863fb6b82fc5807bae9e62a00 (patch) | |
tree | 8575d63efacb79ae10a50c471bf3c8055ea1dbf9 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt | |
parent | 42d441c0e2b436c7b95fe8dc02ef36608395dbff (diff) | |
download | frost-da5967f87b8a0e9863fb6b82fc5807bae9e62a00.tar.gz frost-da5967f87b8a0e9863fb6b82fc5807bae9e62a00.tar.bz2 frost-da5967f87b8a0e9863fb6b82fc5807bae9e62a00.zip |
Fix up colors and add overlay tip
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt index 694550d0..7f74990e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt @@ -9,6 +9,7 @@ import android.widget.FrameLayout import android.widget.ProgressBar import ca.allanwang.kau.utils.bindView import ca.allanwang.kau.utils.tint +import ca.allanwang.kau.utils.visible import ca.allanwang.kau.utils.withAlpha import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FbTab @@ -18,8 +19,10 @@ import io.reactivex.android.schedulers.AndroidSchedulers /** * Created by Allan Wang on 2017-06-01. */ -class FrostWebView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, defStyleRes: Int = 0) - : FrameLayout(context, attrs, defStyleAttr, defStyleRes), SwipeRefreshLayout.OnRefreshListener { +class FrostWebView @JvmOverloads constructor( + context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, defStyleRes: Int = 0 +) : FrameLayout(context, attrs, defStyleAttr, defStyleRes), SwipeRefreshLayout.OnRefreshListener { + val refresh: SwipeRefreshLayout by bindView(R.id.swipe_refresh) val web: FrostWebViewCore by bindView(R.id.frost_webview_core) val progress: ProgressBar by bindView(R.id.progressBar) @@ -40,7 +43,7 @@ class FrostWebView @JvmOverloads constructor(context: Context, attrs: AttributeS refresh.setOnRefreshListener(this) addOnAttachStateChangeListener(object : OnAttachStateChangeListener { override fun onViewDetachedFromWindow(v: View) { - web.visibility = View.VISIBLE + web.visible() } override fun onViewAttachedToWindow(v: View) {} |