Created
April 24, 2018 18:36
-
-
Save vorobeij/432c348929ea71cbe8eab4cd277bbb04 to your computer and use it in GitHub Desktop.
webview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rssdetWebView.loadUrl(rssItem.link) | |
| rssdetWebView.webChromeClient = object : WebChromeClient() { | |
| override fun onProgressChanged(view: WebView?, | |
| newProgress: Int) { | |
| progressBar.progress = newProgress | |
| if (progress == 100) progressBar.visibility = View.GONE | |
| else progressBar.visibility = View.VISIBLE | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ProgressBar | |
| android:id="@+id/progressBar" | |
| style="?android:attr/progressBarStyleHorizontal" | |
| android:layout_width="0dp" | |
| android:layout_height="2dp" | |
| app:layout_constraintTop_toBottomOf="@id/rssdetDivBottom" | |
| app:layout_constraintStart_toStartOf="parent" | |
| app:layout_constraintEnd_toEndOf="parent"/> | |
| <WebView | |
| android:id="@+id/rssdetWebView" | |
| android:layout_width="0dp" | |
| android:layout_height="300dp" | |
| app:layout_constraintBottom_toBottomOf="parent" | |
| app:layout_constraintEnd_toEndOf="parent" | |
| app:layout_constraintStart_toStartOf="parent" | |
| app:layout_constraintTop_toBottomOf="@id/progressBar" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment