diff --git a/.idea/libraries/support_annotations_20_0_0.xml b/.idea/libraries/support_annotations_20_0_0.xml index 9e4620b..ceb0f0c 100644 --- a/.idea/libraries/support_annotations_20_0_0.xml +++ b/.idea/libraries/support_annotations_20_0_0.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/support_v4_20_0_0.xml b/.idea/libraries/support_v4_20_0_0.xml index 1d5c97b..420d544 100644 --- a/.idea/libraries/support_v4_20_0_0.xml +++ b/.idea/libraries/support_v4_20_0_0.xml @@ -1,8 +1,9 @@ - + + diff --git a/Emoji Switcher/Emoji Switcher.iml b/Emoji Switcher/Emoji Switcher.iml index 0015b44..ff82e59 100644 --- a/Emoji Switcher/Emoji Switcher.iml +++ b/Emoji Switcher/Emoji Switcher.iml @@ -77,15 +77,16 @@ + - + - - - + + + diff --git a/Emoji Switcher/build.gradle b/Emoji Switcher/build.gradle index 10c9ad9..bfa563b 100644 --- a/Emoji Switcher/build.gradle +++ b/Emoji Switcher/build.gradle @@ -1,14 +1,14 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 19 - buildToolsVersion '20.0.0' + compileSdkVersion 21 + buildToolsVersion '21.0.2' defaultConfig { minSdkVersion 19 - targetSdkVersion 19 - versionCode 6 - versionName "1.4" + targetSdkVersion 21 + versionCode 7 + versionName "1.5" } compileOptions { diff --git a/Emoji Switcher/src/main/assets/emojisets/Google.ttf b/Emoji Switcher/src/main/assets/emojisets/GoogleKitkat.ttf similarity index 100% rename from Emoji Switcher/src/main/assets/emojisets/Google.ttf rename to Emoji Switcher/src/main/assets/emojisets/GoogleKitkat.ttf diff --git a/Emoji Switcher/src/main/assets/emojisets/GoogleLollipop.ttf b/Emoji Switcher/src/main/assets/emojisets/GoogleLollipop.ttf new file mode 100644 index 0000000..c6d61ae Binary files /dev/null and b/Emoji Switcher/src/main/assets/emojisets/GoogleLollipop.ttf differ diff --git a/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/EmojiSet.java b/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/EmojiSet.java index bea737c..8d59129 100644 --- a/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/EmojiSet.java +++ b/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/EmojiSet.java @@ -51,6 +51,8 @@ public String toString() { private static Map filenamesToFriendlyNames = new HashMap<>(); static { + filenamesToFriendlyNames.put("GoogleLollipop", "Google (Lollipop)"); + filenamesToFriendlyNames.put("GoogleKitkat", "Google (KitKat)"); filenamesToFriendlyNames.put("HTCM8", "HTC M8"); filenamesToFriendlyNames.put("LGG3", "LG G3"); filenamesToFriendlyNames.put("SamsungS4", "Samsung S4"); diff --git a/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/SwitcherActivity.java b/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/SwitcherActivity.java index 3db0aba..0585547 100644 --- a/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/SwitcherActivity.java +++ b/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/SwitcherActivity.java @@ -60,6 +60,12 @@ protected void onCreate(Bundle savedInstanceState) { verifyRoot(); + if (EmojiSwitcherUtils.isRootReady()) { + init(); + } + } + + private void init() { textCurrentEmojiSet = (TextView) findViewById(R.id.text_currentemojisetdetected_is); buttonRefreshEmojiState = (ImageButton) findViewById(R.id.button_refreshemojistate); @@ -75,13 +81,13 @@ public void onClick(View v) { emojiSetsAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinnerInstallEmojis.setAdapter(emojiSetsAdapter); - final Button buttonReboot = (Button) findViewById(R.id.button_reboot); - buttonReboot.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - RootTools.restartAndroid(); - } - }); + final Button buttonReboot = (Button) findViewById(R.id.button_reboot); + buttonReboot.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + RootTools.restartAndroid(); + } + }); Button buttonInstallEmojiSet = (Button) findViewById(R.id.button_installemojiset); buttonInstallEmojiSet.setOnClickListener(new View.OnClickListener() { @@ -89,22 +95,22 @@ public void onClick(View v) { public void onClick(View v) { emojiSwitcherUtils.installEmojiSet(SwitcherActivity.this, (EmojiSet) spinnerInstallEmojis.getSelectedItem()); fetchCurrentSystemEmojiSet(); - AlertDialog.Builder builder = new AlertDialog.Builder(SwitcherActivity.this); - builder.setTitle("Reboot now?"); - builder.setMessage("Most apps require a reboot for new emojis to be recognized."); - builder.setPositiveButton("Reboot", new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - RootTools.restartAndroid(); - } - }); - builder.setNegativeButton("No", new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.cancel(); - } - }); - builder.show(); + AlertDialog.Builder builder = new AlertDialog.Builder(SwitcherActivity.this); + builder.setTitle("Reboot now?"); + builder.setMessage("Most apps require a reboot for new emojis to be recognized."); + builder.setPositiveButton("Reboot", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + RootTools.restartAndroid(); + } + }); + builder.setNegativeButton("No", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dialog.cancel(); + } + }); + builder.show(); } }); @@ -112,7 +118,7 @@ public void onClick(DialogInterface dialog, int which) { fetchCurrentSystemEmojiSet(); - setupBilling(); + setupBilling(); } private void fetchCurrentSystemEmojiSet() { diff --git a/Emoji Switcher/src/main/res/drawable/button_round.xml b/Emoji Switcher/src/main/res/drawable/button_round.xml index fc24969..e90edd7 100644 --- a/Emoji Switcher/src/main/res/drawable/button_round.xml +++ b/Emoji Switcher/src/main/res/drawable/button_round.xml @@ -3,32 +3,32 @@ - + - + - + - + - + - + diff --git a/Emoji Switcher/src/main/res/layout/activity_emojiswitcher.xml b/Emoji Switcher/src/main/res/layout/activity_emojiswitcher.xml index 3809933..08c05b8 100644 --- a/Emoji Switcher/src/main/res/layout/activity_emojiswitcher.xml +++ b/Emoji Switcher/src/main/res/layout/activity_emojiswitcher.xml @@ -1,5 +1,4 @@ - + android:layout_centerHorizontal="true" /> + android:src="@drawable/emoji_bg" /> + android:layout_marginBottom="@dimen/activity_vertical_margin" /> + android:text="@string/refresh" /> + android:textSize="18sp" /> + android:textSize="24sp" /> @@ -99,7 +98,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="6dp" android:text="@string/set_emojis_to_" - android:textColor="#808080"/> + android:textColor="#808080" /> + android:spinnerMode="dropdown" />