Quellcode durchsuchen

Clear component when setting title

Guy Carmeli vor 6 Jahren
Ursprung
Commit
543f720b6e

+ 6
- 0
lib/android/app/src/main/java/com/reactnativenavigation/views/titlebar/TitleBar.java Datei anzeigen

@@ -43,6 +43,12 @@ public class TitleBar extends Toolbar {
43 43
         setContentDescription("titleBar");
44 44
     }
45 45
 
46
+    @Override
47
+    public void setTitle(CharSequence title) {
48
+        clearComponent();
49
+        super.setTitle(title);
50
+    }
51
+
46 52
     public String getTitle() {
47 53
         return super.getTitle() == null ? "" : (String) super.getTitle();
48 54
     }