Skip to content

Commit 5aae9a3

Browse files
committed
更改快捷应用为快捷菜单
1 parent d3a3232 commit 5aae9a3

File tree

9 files changed

+33
-22
lines changed

9 files changed

+33
-22
lines changed

app/app-release.apk

-1.95 MB
Binary file not shown.

app/src/main/java/com/hardwork/fg607/relaxfinger/SettingActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void onAppSettingClick() {
112112

113113
transaction.commit();
114114

115-
SettingActivity.this.setTitle("快捷应用设置");
115+
SettingActivity.this.setTitle("快捷菜单设置");
116116
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
117117

118118

@@ -324,7 +324,8 @@ public void showUpdateInfo(){
324324
dialog.setMessage("1.添加自定义主题功能。\r\n" +
325325
"2.快捷菜单增加打开wifi,蓝牙,响铃模式,音乐控制和手电筒等功能。\r\n" +
326326
"3.修复横屏下点击截屏的问题。\r\n" +
327-
"4.修复主题名称不随主题改变的问题。");
327+
"4.修复截屏黑边问题。\r\n" +
328+
"5.修复主题名称不随主题改变的问题。");
328329
dialog.show();
329330

330331
}

app/src/main/java/com/hardwork/fg607/relaxfinger/utils/FloatingBallUtils.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ public static ArrayList<ToolInfo> getToolInfos() {
630630
ToolInfo data = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_2_data),"移动数据");
631631
ToolInfo bluetooth = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_10_bluetooth),"蓝牙");
632632
ToolInfo flash = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_9_flashlight),"手电筒");
633-
ToolInfo vibration = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_6_vibration),"震动");
634-
ToolInfo mute = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_5_mute),"静音");
633+
ToolInfo vibration = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_6_vibration),"震动/声音");
634+
ToolInfo mute = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_5_mute),"静音/声音");
635635
ToolInfo rotation = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_8_rotation),"屏幕旋转");
636636
ToolInfo music = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_15_music),"音乐开关");
637637
ToolInfo musicNext = new ToolInfo(context.getResources().getDrawable(R.drawable.switch_16_music_next),"音乐下一曲");
@@ -674,10 +674,10 @@ public static Drawable getSwitcherIcon(String name){
674674
case "手电筒":
675675
icon = context.getResources().getDrawable(R.drawable.switch_9_flashlight);
676676
break;
677-
case "震动":
677+
case "震动/声音":
678678
icon = context.getResources().getDrawable(R.drawable.switch_6_vibration);
679679
break;
680-
case "静音":
680+
case "静音/声音":
681681
icon = context.getResources().getDrawable(R.drawable.switch_5_mute);
682682
break;
683683
case "屏幕旋转":
@@ -716,10 +716,10 @@ public static void switchButton(String name){
716716
case "手电筒":
717717
switchFlashlight();
718718
break;
719-
case "震动":
719+
case "震动/声音":
720720
vibrationMode();
721721
break;
722-
case "静音":
722+
case "静音/声音":
723723
muteMode();
724724
break;
725725
case "屏幕旋转":
@@ -834,11 +834,13 @@ private static void switchRotation() {
834834

835835
//打开
836836
Settings.System.putInt(resolver, Settings.System.ACCELEROMETER_ROTATION, 1);
837+
Toast.makeText(context,"屏幕旋转已启用",Toast.LENGTH_SHORT).show();
837838

838839
} else if (gravity == 1) {
839840

840841
//关闭
841842
Settings.System.putInt(resolver, Settings.System.ACCELEROMETER_ROTATION, 0);
843+
Toast.makeText(context,"屏幕旋转已关闭",Toast.LENGTH_SHORT).show();
842844
}
843845
}else {
844846

@@ -857,9 +859,11 @@ private static void muteMode() {
857859
if(mAudioManager.getRingerMode()!=AudioManager.RINGER_MODE_SILENT){
858860

859861
mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);
862+
Toast.makeText(context,"静音模式已启用",Toast.LENGTH_SHORT).show();
860863
}else {
861864

862865
mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
866+
Toast.makeText(context,"普通模式已启用",Toast.LENGTH_SHORT).show();
863867
}
864868

865869

@@ -877,9 +881,11 @@ private static void vibrationMode() {
877881
if(mAudioManager.getRingerMode()!=AudioManager.RINGER_MODE_VIBRATE){
878882

879883
mAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);
884+
Toast.makeText(context,"震动模式已启用",Toast.LENGTH_SHORT).show();
880885
}else {
881886

882887
mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
888+
Toast.makeText(context,"普通模式已启用",Toast.LENGTH_SHORT).show();
883889
}
884890

885891

app/src/main/java/com/hardwork/fg607/relaxfinger/view/ScreenshotActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ public class ScreenshotActivity extends Activity {
4545
protected void onCreate(Bundle savedInstanceState) {
4646
super.onCreate(savedInstanceState);
4747

48-
takeScreenshot();
48+
verifyStoragePermissions(ScreenshotActivity.this);
49+
50+
takeScreenshot();
4951

5052
}
5153

@@ -77,7 +79,6 @@ public void onScreenshot(Bitmap bitmap) {
7779
if(!mIsExist){
7880

7981
sendMsg(Config.HIDE_BALL, "hide", false);
80-
verifyStoragePermissions(ScreenshotActivity.this);
8182
saveScreenshot(bitmap);
8283

8384
mIsExist = true;

app/src/main/java/com/hardwork/fg607/relaxfinger/view/SettingFragment.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ public boolean onPreferenceClick(Preference preference) {
222222
return true;
223223
}
224224
});
225+
226+
mFloatBallTheme.setSummary(mPreferences.getString("theme","默认"));
225227
}
226228

227229
private void showThemeDialog() {
@@ -709,6 +711,7 @@ else if (requestCode == Config.REQUEST_CLIP) {
709711
if("自定义".equals(mThemeChoosed)){
710712

711713
sendMsg(Config.FLOAT_THEME, "theme", mThemeChoosed);
714+
mFloatBallTheme.setSummary(mThemeChoosed);
712715
}
713716

714717

app/src/main/res/layout/fragment_app_setting.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
android:textSize="16sp"
2626
android:textColor="?android:attr/textColorPrimary"
2727
android:clickable="false"
28-
android:text="快捷应用1"/>
28+
android:text="快捷菜单1"/>
2929
<TextView
3030
android:id="@+id/app1_name"
3131
android:layout_width="wrap_content"
@@ -72,7 +72,7 @@
7272
android:textSize="16sp"
7373
android:textColor="?android:attr/textColorPrimary"
7474
android:clickable="false"
75-
android:text="快捷应用2"/>
75+
android:text="快捷菜单2"/>
7676
<TextView
7777
android:id="@+id/app2_name"
7878
android:layout_width="wrap_content"
@@ -119,7 +119,7 @@
119119
android:textSize="16sp"
120120
android:textColor="?android:attr/textColorPrimary"
121121
android:clickable="false"
122-
android:text="快捷应用3"/>
122+
android:text="快捷菜单3"/>
123123
<TextView
124124
android:id="@+id/app3_name"
125125
android:layout_width="wrap_content"
@@ -166,7 +166,7 @@
166166
android:textSize="16sp"
167167
android:textColor="?android:attr/textColorPrimary"
168168
android:clickable="false"
169-
android:text="快捷应用4"/>
169+
android:text="快捷菜单4"/>
170170
<TextView
171171
android:id="@+id/app4_name"
172172
android:layout_width="wrap_content"
@@ -213,7 +213,7 @@
213213
android:textSize="16sp"
214214
android:textColor="?android:attr/textColorPrimary"
215215
android:clickable="false"
216-
android:text="快捷应用5"/>
216+
android:text="快捷菜单5"/>
217217
<TextView
218218
android:id="@+id/app5_name"
219219
android:layout_width="wrap_content"

app/src/main/res/xml/preferences_app.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@
55
android:defaultValue=""
66
android:key="app1"
77
android:summary=""
8-
android:title="快捷应用1" />
8+
android:title="快捷菜单1" />
99

1010
<com.jenzz.materialpreference.Preference
1111
android:defaultValue=""
1212
android:key="app2"
1313
android:summary=""
14-
android:title="快捷应用2" />
14+
android:title="快捷菜单2" />
1515

1616
<com.jenzz.materialpreference.Preference
1717
android:defaultValue=""
1818
android:key="app3"
1919
android:summary=""
20-
android:title="快捷应用3" />
20+
android:title="快捷菜单3" />
2121

2222
<com.jenzz.materialpreference.Preference
2323
android:defaultValue=""
2424
android:key="app4"
2525
android:summary=""
26-
android:title="快捷应用4" />
26+
android:title="快捷菜单4" />
2727

2828
<com.jenzz.materialpreference.Preference
2929
android:defaultValue=""
3030
android:key="app5"
3131
android:summary=""
32-
android:title="快捷应用5" />
32+
android:title="快捷菜单5" />
3333

3434
</PreferenceScreen>

app/src/main/res/xml/preferences_setting.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
<com.jenzz.materialpreference.Preference
8585
android:key="appSetting"
86-
android:title="快捷应用设置"/>
86+
android:title="快捷菜单设置"/>
8787

8888

8989
</PreferenceScreen>

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

0 commit comments

Comments
 (0)