Forráskód Böngészése

try to show correct back button

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 9 hónapja
szülő
commit
1858674eed

+ 24 - 18
app/src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.kt

@@ -75,24 +75,30 @@ class NotificationsActivity : DrawerActivity(), NotificationsContract.View {
             showError()
         }
     }
-    
-     private fun setupBack() {
-         updateActionBarTitleAndHomeButtonByString("1")
-         
-         if (resources == null) return
-         val menuIcon = ResourcesCompat.getDrawable(
-             resources,
-             R.drawable.ic_arrow_back,
-             null
-         )
-
-         if (menuIcon == null) return
-
-         supportActionBar?.let {
-             it.setHomeAsUpIndicator(menuIcon)
-             it.title = getString(R.string.drawer_item_notifications)
-         }
-     }
+
+    private fun setupBack() {
+        updateActionBarTitleAndHomeButtonByString("1")
+
+        if (resources == null) return
+        val menuIcon = ResourcesCompat.getDrawable(
+            resources,
+            R.drawable.ic_arrow_back,
+            null
+        )
+
+        if (menuIcon == null) return
+
+        supportActionBar?.let {
+            it.setDisplayHomeAsUpEnabled(true)
+            it.setDisplayShowTitleEnabled(true)
+
+            viewThemeUtils.androidx.themeActionBar(
+                this,
+                it,
+                getString(R.string.drawer_item_notifications),
+                menuIcon)    
+        }
+    }
 
     private fun setupContainingList() {
         viewThemeUtils.androidx.themeSwipeRefreshLayout(binding.swipeContainingList)