From b4e3c977fd33962c48da5e139d1b7801b1fd21aa Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 4 Jun 2023 16:42:23 +0200 Subject: [PATCH] [Welcome Activity] Scrollbars, CDN indicator, note about instance regions --- .../com/github/libretube/ui/adapters/InstancesAdapter.kt | 3 ++- app/src/main/res/layout/activity_welcome.xml | 6 ++++-- app/src/main/res/layout/instance_row.xml | 6 ++++-- app/src/main/res/values/strings.xml | 4 +++- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/adapters/InstancesAdapter.kt b/app/src/main/java/com/github/libretube/ui/adapters/InstancesAdapter.kt index cb590342e..49215a247 100644 --- a/app/src/main/java/com/github/libretube/ui/adapters/InstancesAdapter.kt +++ b/app/src/main/java/com/github/libretube/ui/adapters/InstancesAdapter.kt @@ -26,7 +26,8 @@ class InstancesAdapter( override fun onBindViewHolder(holder: InstancesViewHolder, position: Int) { val instance = instances[position] holder.binding.apply { - radioButton.text = "${instance.name} ${instance.locations}" + val cdnText = if (instance.cdn) " (\uD83C\uDF10 CDN)" else "" + radioButton.text = "${instance.name} ${instance.locations} $cdnText" radioButton.setOnCheckedChangeListener(null) radioButton.isChecked = selectedInstanceIndex == position radioButton.setOnCheckedChangeListener { _, isChecked -> diff --git a/app/src/main/res/layout/activity_welcome.xml b/app/src/main/res/layout/activity_welcome.xml index f6d7ae551..56b1d15ee 100644 --- a/app/src/main/res/layout/activity_welcome.xml +++ b/app/src/main/res/layout/activity_welcome.xml @@ -31,7 +31,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginHorizontal="20dp" - android:text="@string/choose_instance" /> + android:text="@string/choose_instance_long" /> + android:layout_height="wrap_content" + android:fadeScrollbars="false" + android:scrollbars="vertical" /> + android:paddingHorizontal="12dp"> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e36756da0..1fa2b98e8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -413,7 +413,9 @@ Alphabetic Alphabetic (reversed) Welcome to LibreTube - Please choose a Piped instance to use below. The Piped instance will act as a middle man between you and YouTube. You can still change it later in the instance settings. + Please choose an instance first! + Please choose a Piped instance to use below. The Piped instance will act as a middle man between you and YouTube. These servers are located at different physical places (indicated with flags). Instances that are close to where you live, are likely faster than others. You can still change it later in the instance settings. + Registration disabled Import subscriptions from