Browse Source

Clear component when setting title

Guy Carmeli 6 years ago
parent
commit
543f720b6e

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

@@ -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
     }