Skip to content

Commit

Permalink
fix: update SaveToPanelDialog style
Browse files Browse the repository at this point in the history
Signed-off-by: Hicores <me@hicore.cc>
  • Loading branch information
Hicores committed Jul 7, 2023
1 parent f49512f commit c6a1751
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
15 changes: 9 additions & 6 deletions app/src/main/java/cc/hicore/hook/stickerPanel/PanelUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.LayoutInflater;
Expand Down Expand Up @@ -63,8 +64,8 @@ public static void PreSavePicToList(String URL, String MD5, Context context) {
for (LocalDataHelper.LocalPath path : paths) {
RadioButton button = new RadioButton(context);
button.setText(path.Name);
button.setTextColor(context.getColor(R.color.font_plugin));
button.setTextSize(16);
button.setTextColor(Color.BLACK);
button.setOnCheckedChangeListener((v, ischeck) -> {
if (v.isPressed() && ischeck) {
choicePath = path;
Expand All @@ -79,7 +80,7 @@ public static void PreSavePicToList(String URL, String MD5, Context context) {
new AlertDialog.Builder(CommonContextWrapper.createAppCompatContext(context))
.setTitle("创建新目录")
.setView(edNew)
.setNeutralButton("确定创建", (dialog, which) -> {
.setPositiveButton("确定创建", (dialog, which) -> {
String newName = edNew.getText().toString();
if (TextUtils.isEmpty(newName)) {
Toasts.info(v.getContext(),"名字不能为空");
Expand All @@ -97,7 +98,7 @@ public static void PreSavePicToList(String URL, String MD5, Context context) {
RadioButton button = new RadioButton(context);
button.setText(pathItem.Name);
button.setTextSize(16);
button.setTextColor(Color.BLACK);
button.setTextColor(context.getColor(R.color.font_plugin));
button.setOnCheckedChangeListener((vaa, ischeck) -> {
if (vaa.isPressed() && ischeck) {
choicePath = pathItem;
Expand All @@ -111,9 +112,8 @@ public static void PreSavePicToList(String URL, String MD5, Context context) {
});

new AlertDialog.Builder(CommonContextWrapper.createAppCompatContext(context))
.setTitle("是否保存")
.setView(mRoot)
.setNeutralButton("保存", (dialog, which) -> {
.setPositiveButton("保存", (dialog, which) -> {
if (choicePath == null) {
Toasts.info(context,"没有选择任何的保存列表");
} else if (TextUtils.isEmpty(NewInfo.Path)) {
Expand All @@ -130,7 +130,10 @@ public static void PreSavePicToList(String URL, String MD5, Context context) {

Toasts.info(context,"已保存到:" + Env.app_save_path + "本地表情包/" + choicePath.storePath + "/" + MD5);
}
}).setOnDismissListener(dialog -> {
}).setNeutralButton("取消", (dialog, which) -> {

})
.setOnDismissListener(dialog -> {
Glide.with(HostInfo.getApplication()).clear(preView);
}).show();
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/sticker_pre_save.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:text="是否保存如下图片"
android:textColor="@color/font_plugin"
android:gravity="center_horizontal"
android:textSize="16sp"/>
android:textSize="20sp"/>
<ImageView
android:id="@+id/emo_pre_container"
android:layout_width="160dp"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
<color name="defaultThemeBackgroundColor">#FF303030</color>
<color name="defaultThemeBackgroundColorAlpha80">#CC303030</color>


<color name="font_plugin">#FFFFFFFF</color>
<color name="bg_plugin">#FF3C3C3C</color>
</resources>

0 comments on commit c6a1751

Please sign in to comment.