Skip to content

Commit d6d5753

Browse files
committed
Move locate action from FAB to menu
#5423
1 parent 014d510 commit d6d5753

File tree

12 files changed

+25
-15
lines changed

12 files changed

+25
-15
lines changed

V2rayNG/app/src/main/java/com/v2ray/ang/ui/MainActivity.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
9494
})
9595

9696
binding.fab.setOnClickListener { handleFabAction() }
97-
binding.fabLocate.setOnClickListener { locateSelectedServer() }
9897
binding.layoutTest.setOnClickListener { handleLayoutTestClick() }
9998

10099
setupGroupTab()
@@ -340,6 +339,10 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
340339
true
341340
}
342341

342+
R.id.locate_selected_config -> {
343+
locateSelectedServer()
344+
true
345+
}
343346

344347
else -> super.onOptionsItemSelected(item)
345348
}

V2rayNG/app/src/main/res/layout/activity_main.xml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,6 @@
9797
android:layout_marginBottom="-16dp"
9898
android:layout_marginEnd="@dimen/padding_spacing_dp16">
9999

100-
<com.google.android.material.floatingactionbutton.FloatingActionButton
101-
android:id="@+id/fab_locate"
102-
android:layout_width="wrap_content"
103-
android:layout_height="wrap_content"
104-
android:layout_gravity="bottom|end"
105-
android:layout_marginBottom="@dimen/view_height_dp120"
106-
android:clickable="true"
107-
android:contentDescription="@string/title_server"
108-
android:focusable="true"
109-
android:src="@android:drawable/ic_menu_mylocation"
110-
app:useCompatPadding="true"
111-
app:layout_anchorGravity="bottom|right|end" />
112-
113100
<com.google.android.material.floatingactionbutton.FloatingActionButton
114101
android:id="@+id/fab"
115102
android:layout_width="wrap_content"

V2rayNG/app/src/main/res/menu/menu_main.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@
9898
android:id="@+id/sort_by_test_results"
9999
android:title="@string/title_sort_by_test_results"
100100
app:showAsAction="never" />
101+
<item
102+
android:id="@+id/locate_selected_config"
103+
android:title="@string/title_locate_selected_config"
104+
app:showAsAction="never" />
101105
<item
102106
android:id="@+id/sub_update"
103107
android:title="@string/title_sub_update"

V2rayNG/app/src/main/res/values-ar/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@
301301
<string name="title_update_subscription_no_subscription">No subscriptions</string>
302302
<string name="toast_server_not_found_in_group">Selected server not found in current group</string>
303303
<string name="toast_fragment_not_available">Unable to locate current view</string>
304+
<string name="title_locate_selected_config">Locate the selected config</string>
305+
304306
<string name="tasker_start_service">بدء الخدمة</string>
305307
<string name="tasker_setting_confirm">تأكيد</string>
306308

V2rayNG/app/src/main/res/values-bn/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@
300300
<string name="title_update_subscription_no_subscription">No subscriptions</string>
301301
<string name="toast_server_not_found_in_group">Selected server not found in current group</string>
302302
<string name="toast_fragment_not_available">Unable to locate current view</string>
303+
<string name="title_locate_selected_config">Locate the selected config</string>
304+
303305
<string name="tasker_start_service">সার্ভিস শুরু করুন</string>
304306
<string name="tasker_setting_confirm">নিশ্চিত করুন</string>
305307

V2rayNG/app/src/main/res/values-bqi-rIR/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@
301301
<string name="title_update_subscription_no_subscription">بؽ اشتراک</string>
302302
<string name="toast_server_not_found_in_group">Selected server not found in current group</string>
303303
<string name="toast_fragment_not_available">Unable to locate current view</string>
304+
<string name="title_locate_selected_config">Locate the selected config</string>
305+
304306
<string name="tasker_start_service">ره وندن خدمات</string>
305307
<string name="tasker_setting_confirm">قوۊل</string>
306308

V2rayNG/app/src/main/res/values-fa/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@
298298
<string name="title_update_subscription_no_subscription">No subscriptions</string>
299299
<string name="toast_server_not_found_in_group">Selected server not found in current group</string>
300300
<string name="toast_fragment_not_available">Unable to locate current view</string>
301+
<string name="title_locate_selected_config">Locate the selected config</string>
302+
301303
<string name="tasker_start_service">شروع خدمات</string>
302304
<string name="tasker_setting_confirm">تایید</string>
303305

V2rayNG/app/src/main/res/values-ru/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@
299299
<string name="title_update_subscription_no_subscription">Нет подписок</string>
300300
<string name="toast_server_not_found_in_group">Выбранный профиль не найден в текущей группе</string>
301301
<string name="toast_fragment_not_available">Фрагмент недоступен</string>
302+
<string name="title_locate_selected_config">Locate the selected config</string>
302303

303304
<string name="tasker_start_service">Запуск службы</string>
304305
<string name="tasker_setting_confirm">Подтвердить</string>

V2rayNG/app/src/main/res/values-vi/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@
301301
<string name="title_update_subscription_no_subscription">No subscriptions</string>
302302
<string name="toast_server_not_found_in_group">Selected server not found in current group</string>
303303
<string name="toast_fragment_not_available">Unable to locate current view</string>
304+
<string name="title_locate_selected_config">Locate the selected config</string>
305+
304306
<string name="tasker_start_service">Khởi động v2rayNG</string>
305307
<string name="tasker_setting_confirm">Xác nhận</string>
306308

V2rayNG/app/src/main/res/values-zh-rCN/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@
299299
<string name="title_update_subscription_no_subscription">无订阅</string>
300300
<string name="toast_server_not_found_in_group">当前分组中未找到选中的服务器</string>
301301
<string name="toast_fragment_not_available">无法定位当前视图</string>
302+
<string name="title_locate_selected_config">定位所选配置</string>
303+
302304
<string name="tasker_start_service">启动服务</string>
303305
<string name="tasker_setting_confirm">确定</string>
304306

0 commit comments

Comments
 (0)