mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-22 04:46:04 +03:00
#559 Use emojis for checkboxes in widgets if possible - special decision for samsung
This commit is contained in:
parent
1e152e48fb
commit
a153462dfa
1 changed files with 11 additions and 2 deletions
|
@ -91,8 +91,17 @@ public class MarkdownUtil {
|
|||
|
||||
@Nullable
|
||||
private static String getCheckboxEmoji(boolean checked) {
|
||||
final String[] checkedEmojis = new String[]{"✅", "☑️", "✔️"};
|
||||
final String[] uncheckedEmojis = new String[]{"❌", "\uD83D\uDD32️", "☐️"};
|
||||
final String[] checkedEmojis;
|
||||
final String[] uncheckedEmojis;
|
||||
// Seriously what the fuck, Samsung?
|
||||
// https://emojipedia.org/ballot-box-with-x/
|
||||
if(Build.MANUFACTURER.toLowerCase().contains("samsung")) {
|
||||
checkedEmojis = new String[]{"✅", "☑️", "✔️"};
|
||||
uncheckedEmojis = new String[]{"❌", "\uD83D\uDD32️", "☐️"};
|
||||
} else {
|
||||
checkedEmojis = new String[]{"☒", "✅", "☑️", "✔️"};
|
||||
uncheckedEmojis = new String[]{"☐", "❌", "\uD83D\uDD32️", "☐️"};
|
||||
}
|
||||
final Paint paint = new Paint();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
for (String emoji : checked ? checkedEmojis : uncheckedEmojis) {
|
||||
|
|
Loading…
Reference in a new issue