abouttreesummaryrefslogcommitdiff
diff options
context:
space:
mode:
-rw-r--r--srcs/juloo.keyboard2/DirectBootAwarePreferences.java2
-rw-r--r--srcs/juloo.keyboard2/Keyboard2.java3
-rw-r--r--srcs/juloo.keyboard2/LauncherActivity.java4
-rw-r--r--srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java2
-rw-r--r--srcs/juloo.keyboard2/prefs/LayoutsPreference.java3
5 files changed, 11 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/DirectBootAwarePreferences.java b/srcs/juloo.keyboard2/DirectBootAwarePreferences.java
index 372e159..fcc67c6 100644
--- a/srcs/juloo.keyboard2/DirectBootAwarePreferences.java
+++ b/srcs/juloo.keyboard2/DirectBootAwarePreferences.java
@@ -1,5 +1,6 @@
package juloo.keyboard2;
+import android.annotation.TargetApi;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build.VERSION;
@@ -7,6 +8,7 @@ import android.preference.PreferenceManager;
import java.util.Map;
import java.util.Set;
+@TargetApi(24)
public final class DirectBootAwarePreferences
{
/* On API >= 24, preferences are read from the device protected storage. This
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java
index 0f46a13..6440c7d 100644
--- a/srcs/juloo.keyboard2/Keyboard2.java
+++ b/srcs/juloo.keyboard2/Keyboard2.java
@@ -1,5 +1,6 @@
package juloo.keyboard2;
+import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@@ -118,6 +119,7 @@ public class Keyboard2 extends InputMethodService
return Arrays.asList();
}
+ @TargetApi(12)
private ExtraKeys extra_keys_of_subtype(InputMethodSubtype subtype)
{
String extra_keys = subtype.getExtraValueOf("extra_keys");
@@ -127,6 +129,7 @@ public class Keyboard2 extends InputMethodService
return ExtraKeys.EMPTY;
}
+ @TargetApi(12)
private void refreshAccentsOption(InputMethodManager imm, InputMethodSubtype subtype)
{
List<InputMethodSubtype> enabled_subtypes = getEnabledSubtypes(imm);
diff --git a/srcs/juloo.keyboard2/LauncherActivity.java b/srcs/juloo.keyboard2/LauncherActivity.java
index b8906b5..7b82d21 100644
--- a/srcs/juloo.keyboard2/LauncherActivity.java
+++ b/srcs/juloo.keyboard2/LauncherActivity.java
@@ -1,5 +1,6 @@
package juloo.keyboard2;
+import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.media.AudioManager;
@@ -31,7 +32,7 @@ public class LauncherActivity extends Activity
_intro_video = (VideoView)findViewById(R.id.launcher_intro_video);
_tryhere_text = (TextView)findViewById(R.id.launcher_tryhere_text);
_tryhere_area = (EditText)findViewById(R.id.launcher_tryhere_area);
- if (VERSION.SDK_INT > 28)
+ if (VERSION.SDK_INT >= 28)
_tryhere_area.addOnUnhandledKeyEventListener(
this.new Tryhere_OnUnhandledKeyEventListener());
setup_intro_video(_intro_video);
@@ -76,6 +77,7 @@ public class LauncherActivity extends Activity
v.start();
}
+ @TargetApi(28)
final class Tryhere_OnUnhandledKeyEventListener implements View.OnUnhandledKeyEventListener
{
public boolean onUnhandledKeyEvent(View v, KeyEvent ev)
diff --git a/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java b/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
index 9d8395f..cf47d46 100644
--- a/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
+++ b/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
@@ -51,7 +51,7 @@ public class CustomExtraKeysPreference extends ListGroupPreference<String>
void select(final SelectionCallback<String> callback)
{
new AlertDialog.Builder(getContext())
- .setView(R.layout.dialog_edit_text)
+ .setView(View.inflate(getContext(), R.layout.dialog_edit_text, null))
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int which)
{
diff --git a/srcs/juloo.keyboard2/prefs/LayoutsPreference.java b/srcs/juloo.keyboard2/prefs/LayoutsPreference.java
index 842a2f2..c1a863f 100644
--- a/srcs/juloo.keyboard2/prefs/LayoutsPreference.java
+++ b/srcs/juloo.keyboard2/prefs/LayoutsPreference.java
@@ -7,6 +7,7 @@ import android.content.SharedPreferences;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.util.AttributeSet;
+import android.view.View;
import android.widget.ArrayAdapter;
import java.util.ArrayList;
import java.util.Arrays;
@@ -149,7 +150,7 @@ public class LayoutsPreference extends ListGroupPreference<LayoutsPreference.Lay
{
ArrayAdapter layouts = new ArrayAdapter(getContext(), android.R.layout.simple_list_item_1, _layout_display_names);
new AlertDialog.Builder(getContext())
- .setView(R.layout.dialog_edit_text)
+ .setView(View.inflate(getContext(), R.layout.dialog_edit_text, null))
.setAdapter(layouts, new DialogInterface.OnClickListener(){
public void onClick(DialogInterface _dialog, int which)
{