瀏覽代碼

Find textual buttons in TitleBar by text instead of content description

Guy Carmeli 7 年之前
父節點
當前提交
6a78a3282d
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      android/app/src/main/java/com/reactnativenavigation/views/TitleBarButton.java

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/views/TitleBarButton.java 查看文件

@@ -114,7 +114,7 @@ class TitleBarButton implements MenuItem.OnMenuItemClickListener {
114 114
     @NonNull
115 115
     private ArrayList<View> findActualTextViewInMenuByLabel() {
116 116
         ArrayList<View> outViews = new ArrayList<>();
117
-        parent.findViewsWithText(outViews, buttonParams.label, View.FIND_VIEWS_WITH_CONTENT_DESCRIPTION);
117
+        parent.findViewsWithText(outViews, buttonParams.label, View.FIND_VIEWS_WITH_TEXT);
118 118
         return outViews;
119 119
     }
120 120