Commit b1c7a618 authored by fallenstardust's avatar fallenstardust

引导打开悬浮窗

parent b448f8a8
package cn.garymb.ygomobile.ui.adapters; package cn.garymb.ygomobile.ui.adapters;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
...@@ -33,6 +35,11 @@ public class ServerListAdapter extends BaseRecyclerAdapterPlus<ServerInfo, Serve ...@@ -33,6 +35,11 @@ public class ServerListAdapter extends BaseRecyclerAdapterPlus<ServerInfo, Serve
DialogPlus builder = new DialogPlus(getContext()); DialogPlus builder = new DialogPlus(getContext());
builder.setTitle(R.string.OpenTIP); builder.setTitle(R.string.OpenTIP);
builder.setMessage(R.string.join_helper_tip); builder.setMessage(R.string.join_helper_tip);
builder.setLeftButtonText(R.string.Open_Alert_Window);
builder.setLeftButtonListener((dlg, s) -> {
getContext().startActivity(new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION));
dlg.dismiss();
});
builder.show(); builder.show();
}); });
if(position==0){ if(position==0){
......
...@@ -96,7 +96,7 @@ public class ServiceDuelAssistant extends Service ...@@ -96,7 +96,7 @@ public class ServiceDuelAssistant extends Service
private void joinRoom(String ss, int start) { private void joinRoom(String ss, int start) {
final String password = ss.substring(start, ss.length()); final String password = ss.substring(start, ss.length());
ds_text.setText("加入房间\"" + password + "\""); ds_text.setText(getString(R.string.quick_join) + password + "\"");
ds_join.setText(R.string.join); ds_join.setText(R.string.join);
ds_qx.setText(R.string.search_close); ds_qx.setText(R.string.search_close);
disJoinDialog(); disJoinDialog();
......
...@@ -208,4 +208,5 @@ ...@@ -208,4 +208,5 @@
\n이 기능을 사용하여 소프트웨어 일시 중지 창을 엽니다. \n이 기능을 사용하여 소프트웨어 일시 중지 창을 엽니다.
\n그후 소프트웨어가 백그라운드로 구동되고 있는지 확인하십시오.</string> \n그후 소프트웨어가 백그라운드로 구동되고 있는지 확인하십시오.</string>
<string name="OpenTIP">빠른 사용법</string> <string name="OpenTIP">빠른 사용법</string>
<string name="Open_Alert_Window">열기 정지된창</string>
</resources> </resources>
...@@ -202,9 +202,10 @@ ...@@ -202,9 +202,10 @@
<string name="deck_name">卡组</string> <string name="deck_name">卡组</string>
<string name="save_quit">保存并退出</string> <string name="save_quit">保存并退出</string>
<string name="tip_reset_game_res">游戏数据检查完成</string> <string name="tip_reset_game_res">游戏数据检查完成</string>
<string name="join_helper_tip">你可以把偏好的服务器拖到置顶 <string name="join_helper_tip">你可以把常约战的服务器拖到第一位
\n那么快捷加房时候就会加入置顶的服务器 \n之后快捷加房时就会加入置顶的服务器
\n使用此功能须开启本软件悬浮窗 \n使用此功能须开启本软件悬浮窗
\n并确保本软件后台运行中</string> \n并确保本软件后台运行中</string>
<string name="OpenTIP">快捷加房使用方法</string> <string name="OpenTIP">快捷加房使用方法</string>
<string name="Open_Alert_Window">去打开悬浮窗</string>
</resources> </resources>
...@@ -206,8 +206,9 @@ ...@@ -206,8 +206,9 @@
<string name="save_quit">Save and quit</string> <string name="save_quit">Save and quit</string>
<string name="tip_reset_game_res">Reset game resources completed</string> <string name="tip_reset_game_res">Reset game resources completed</string>
<string name="join_helper_tip">you can move your favourite sever on top <string name="join_helper_tip">you can move your favourite sever on top
\n then join helper will acquiescently start in it \nthen join helper will acquiescently start in it
\n pls open the "SYSTEM ALERT WINDOW" permission \npls click to APP permission to find me and open the "Pop-ups"
\n and keep the soft run in the background</string> \nand keep the soft run in the background</string>
<string name="OpenTIP">about Quick Join in Game</string> <string name="OpenTIP">about Quick Join in Game</string>
<string name="Open_Alert_Window">To Open Pop-ups</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment