Refer to colored stars FAQ

This commit is contained in:
M66B 2022-11-30 11:02:38 +01:00
parent f3592d1a2c
commit d4b1d81b57
4 changed files with 18 additions and 1 deletions

View File

@ -6151,6 +6151,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
args.putInt("color", message.color == null ? Color.TRANSPARENT : message.color);
args.putString("title", context.getString(R.string.title_flag_color));
args.putBoolean("reset", true);
args.putInt("faq", 187);
FragmentDialogColor fragment = new FragmentDialogColor();
fragment.setArguments(args);

View File

@ -29,6 +29,7 @@ import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import com.flask.colorpicker.ColorPickerView;
import com.flask.colorpicker.OnColorChangedListener;
@ -53,6 +54,7 @@ public class FragmentDialogColor extends FragmentDialogBase {
: savedInstanceState.getInt("fair:color"));
String title = args.getString("title");
boolean reset = args.getBoolean("reset", false);
int faq = args.getInt("faq");
Context context = getContext();
int editTextColor = Helper.resolveColor(context, android.R.attr.editTextColor);
@ -91,6 +93,17 @@ public class FragmentDialogColor extends FragmentDialogBase {
}
});
return builder.build();
AlertDialog dialog = builder.build();
if (faq > 0)
dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.title_info),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Helper.viewFAQ(context, faq);
}
});
return dialog;
}
}

View File

@ -3114,6 +3114,7 @@ public class FragmentMessages extends FragmentBase
args.putInt("color", message.color == null ? Color.TRANSPARENT : message.color);
args.putString("title", getString(R.string.title_flag_color));
args.putBoolean("reset", true);
args.putInt("faq", 187);
FragmentDialogColor fragment = new FragmentDialogColor();
fragment.setArguments(args);
@ -4057,6 +4058,7 @@ public class FragmentMessages extends FragmentBase
args.putString("title", getString(R.string.title_flag_color));
args.putBoolean("reset", true);
args.putBoolean("clear", clear);
args.putInt("faq", 187);
FragmentDialogColor fragment = new FragmentDialogColor();
fragment.setArguments(args);

View File

@ -619,6 +619,7 @@ public class FragmentRule extends FragmentBase {
args.putInt("color", btnColor.getColor());
args.putString("title", getString(R.string.title_flag_color));
args.putBoolean("reset", true);
args.putInt("faq", 187);
FragmentDialogColor fragment = new FragmentDialogColor();
fragment.setArguments(args);