diff --git a/app/src/main/java/com/github/libretube/activities/MainActivity.kt b/app/src/main/java/com/github/libretube/activities/MainActivity.kt
index d5618ef91..45f032df3 100644
--- a/app/src/main/java/com/github/libretube/activities/MainActivity.kt
+++ b/app/src/main/java/com/github/libretube/activities/MainActivity.kt
@@ -38,6 +38,7 @@ import com.github.libretube.util.RetrofitInstance
import com.github.libretube.util.ThemeHelper
import com.google.android.material.color.DynamicColors
import com.google.android.material.elevation.SurfaceColors
+import com.google.android.material.navigation.NavigationBarView
class MainActivity : AppCompatActivity() {
val TAG = "MainActivity"
@@ -124,6 +125,16 @@ class MainActivity : AppCompatActivity() {
// navigate to the default fragment
navController.navigate(startFragmentId)
+ val labelVisibilityMode = when (
+ PreferenceHelper.getString(this, "label_visibility", "always")
+ ) {
+ "always" -> NavigationBarView.LABEL_VISIBILITY_LABELED
+ "selected" -> NavigationBarView.LABEL_VISIBILITY_SELECTED
+ "never" -> NavigationBarView.LABEL_VISIBILITY_UNLABELED
+ else -> NavigationBarView.LABEL_VISIBILITY_AUTO
+ }
+ binding.bottomNav.labelVisibilityMode = labelVisibilityMode
+
binding.bottomNav.setOnItemSelectedListener {
// clear backstack if it's the start fragment
if (startFragmentId == it.itemId) navController.backQueue.clear()
diff --git a/app/src/main/res/drawable/ic_label.xml b/app/src/main/res/drawable/ic_label.xml
new file mode 100644
index 000000000..fc165149c
--- /dev/null
+++ b/app/src/main/res/drawable/ic_label.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/values/array.xml b/app/src/main/res/values/array.xml
index f57787c26..6c7eac38c 100644
--- a/app/src/main/res/values/array.xml
+++ b/app/src/main/res/values/array.xml
@@ -709,4 +709,16 @@
- portrait
+
+ - @string/always
+ - @string/selected
+ - @string/never
+
+
+
+ - always
+ - selected
+ - never
+
+
\ 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 6f0f77787..141527a8f 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -233,4 +233,8 @@
Playback speed
Restart required
This change requires an app restart. Do you want to restart the app now? Otherwise the changes will be applied on the next app restart.
+ Navbar label visibility
+ Always
+ Selected
+ Never
\ No newline at end of file
diff --git a/app/src/main/res/xml/appearance_settings.xml b/app/src/main/res/xml/appearance_settings.xml
index f044c2967..a8d3c834b 100644
--- a/app/src/main/res/xml/appearance_settings.xml
+++ b/app/src/main/res/xml/appearance_settings.xml
@@ -51,6 +51,15 @@
app:title="@string/hideTrendingPage"
app:useSimpleSummaryProvider="true" />
+
+