[Android] Fix about view not scrollable
Geoffrey Métais
git at videolan.org
Tue Oct 1 14:33:46 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Sep 27 16:12:41 2019 +0200| [0bbe0ec5f19494d30a5eae95d846957385870cc5] | committer: Geoffrey Métais
Fix about view not scrollable
Fix #1049
> https://code.videolan.org/videolan/vlc-android/commit/0bbe0ec5f19494d30a5eae95d846957385870cc5
---
vlc-android/res/layout/about_main.xml | 4 ++--
vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt | 4 ++--
vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt | 11 ++++++-----
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/vlc-android/res/layout/about_main.xml b/vlc-android/res/layout/about_main.xml
index ce124d33b..313aee320 100644
--- a/vlc-android/res/layout/about_main.xml
+++ b/vlc-android/res/layout/about_main.xml
@@ -2,7 +2,7 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
- <ScrollView
+ <androidx.core.widget.NestedScrollView
android:id="@+id/about_main"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -120,7 +120,7 @@
android:textSize="12sp" />
</LinearLayout>
- </ScrollView>
+ </androidx.core.widget.NestedScrollView>
<include layout="@layout/tv_time" />
</merge>
diff --git a/vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt b/vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt
index ed48d6bf0..37222f3f9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/AboutFragment.kt
@@ -29,8 +29,8 @@ import android.view.View
import android.view.ViewGroup
import android.webkit.WebView
import android.webkit.WebViewClient
-import android.widget.ScrollView
import androidx.appcompat.app.AppCompatActivity
+import androidx.core.widget.NestedScrollView
import androidx.fragment.app.Fragment
import androidx.viewpager.widget.ViewPager
import com.google.android.material.tabs.TabLayout
@@ -58,7 +58,7 @@ class AboutFragment : Fragment() {
(activity as? AppCompatActivity)?.supportActionBar?.title = "VLC ${BuildConfig.VERSION_NAME}"
- val aboutMain = view.findViewById<ScrollView>(org.videolan.vlc.R.id.about_main)
+ val aboutMain = view.findViewById<NestedScrollView>(org.videolan.vlc.R.id.about_main)
val webView = view.findViewById<WebView>(org.videolan.vlc.R.id.webview)
val revision = getString(org.videolan.vlc.R.string.build_revision)
diff --git a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt
index 250e601de..a79353363 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt
@@ -128,15 +128,16 @@ class SecondaryActivity : ContentActivity() {
private fun fetchSecondaryFragment(id: String) {
when (id) {
ALBUMS_SONGS -> {
- fragment = AudioAlbumsSongsFragment()
- val args = Bundle()
- args.putParcelable(AudioBrowserFragment.TAG_ITEM, intent.getParcelableExtra<Parcelable>(AudioBrowserFragment.TAG_ITEM))
- fragment!!.arguments = args
+ fragment = AudioAlbumsSongsFragment().apply {
+ val args = Bundle(1)
+ args.putParcelable(AudioBrowserFragment.TAG_ITEM, intent.getParcelableExtra<Parcelable>(AudioBrowserFragment.TAG_ITEM))
+ arguments = args
+ }
}
ABOUT -> fragment = AboutFragment()
VIDEO_GROUP_LIST -> {
fragment = VideoGridFragment().apply {
- arguments = Bundle(1).apply {
+ arguments = Bundle(2).apply {
putParcelable(KEY_FOLDER, intent.getParcelableExtra<Parcelable>(KEY_FOLDER))
putParcelable(KEY_GROUP, intent.getParcelableExtra<Parcelable>(KEY_GROUP))
}
More information about the Android
mailing list