[Android] Fix anchor link navigation in License screen

Nicolas Pomepuy git at videolan.org
Tue Sep 10 15:30:32 CEST 2019


vlc-android | branch: 3.2.x | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Thu Sep  5 09:32:59 2019 +0200| [983f32df75ef9ca4dd981b44e7e1e8f05b92cfa8] | committer: Geoffrey Métais

Fix anchor link navigation in License screen

(cherry picked from commit a75ec093e30f9256dfdb2fa7521d3fbc2b1f3232)

> https://code.videolan.org/videolan/vlc-android/commit/983f32df75ef9ca4dd981b44e7e1e8f05b92cfa8
---

 vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt b/vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt
index b6482fc08..dec548662 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt
@@ -34,7 +34,9 @@ import androidx.appcompat.app.AppCompatActivity
 import androidx.fragment.app.Fragment
 import androidx.viewpager.widget.ViewPager
 import com.google.android.material.tabs.TabLayout
-import kotlinx.coroutines.*
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.ObsoleteCoroutinesApi
+import kotlinx.coroutines.launch
 import org.videolan.tools.coroutineScope
 import org.videolan.vlc.BuildConfig
 import org.videolan.vlc.gui.audio.AudioPagerAdapter
@@ -72,11 +74,8 @@ class AboutFragment : Fragment() {
             setupWithViewPager(viewPager)
         }
         coroutineScope.launch {
-            val asset = withContext(Dispatchers.IO) {
-                Util.readAsset("licence.htm", "").replace("!COMMITID!", revision)
-            }
             UiTools.fillAboutView(view)
-            webView.loadData(asset, "text/html", "UTF8")
+            webView.loadUrl("file:///android_asset/licence.htm")
 
             webView.webViewClient = object : WebViewClient() {
 
@@ -97,8 +96,6 @@ class AboutFragment : Fragment() {
                     super.onPageFinished(view, url)
                 }
             }
-
-
         }
     }
 



More information about the Android mailing list