Skip to content

Commit

Permalink
change dialog title when set full image as wallpaper
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve-Mr committed Nov 17, 2024
1 parent 3a81b3c commit f79d69b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,15 @@ protected void onCreate(Bundle savedInstanceState) {
//setup the fab click listener
binding.fab.setOnClickListener(view -> {
cord = binding.mainView.getVisibleRect();
builder.setTitle(R.string.setAs);
binding.bottomAppBar.getMenu().getItem(MENU_RESET).setEnabled(true);
AlertDialog dialog = builder.create();
dialog.show();
});

binding.fab.setOnLongClickListener(view -> {
cord = null;
builder.setTitle(R.string.setFullAs);
AlertDialog dialog = builder.create();
dialog.show();
return false;
Expand Down Expand Up @@ -202,7 +204,7 @@ public void onColorsChanged(@Nullable WallpaperColors colors, int which) {

//setup AlertDialog builder
builder = new MaterialAlertDialogBuilder(context);
builder.setTitle(R.string.setAs);
// builder.setTitle(R.string.setAs);

String[] options = {
getResources().getString(R.string.home),
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@
<string name="tile_size">图像块大小</string>
<string name="fp16">使用 FP_16</string>
<string name="cpu_disabled">不使用 CPU</string>
<string name="center">居中</string>
<string name="crop">裁切</string>
<string name="setFullAs">全图设置为</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@
<string name="cpu_disabled">Disable CPU</string>
<string name="center">Center</string>
<string name="crop">Crop</string>
<string name="setFullAs">Set full image as</string>
</resources>

0 comments on commit f79d69b

Please sign in to comment.