diff options
| author | Jules Aguillon | 2024-02-10 17:33:42 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2024-02-10 17:33:42 +0100 |
| commit | d5676d683f031a2d23f4e01e0ada0afd58dc9b89 (patch) | |
| tree | 983cebb866b28e1c6352b2bf639cf82432221484 /srcs/juloo.keyboard2/prefs/LayoutsPreference.java | |
| parent | 332413ed3c34b6e4021c3bad97625704edb8b5c6 (diff) | |
| download | unexpected-keyboard-d5676d683f031a2d23f4e01e0ada0afd58dc9b89.tar.gz unexpected-keyboard-d5676d683f031a2d23f4e01e0ada0afd58dc9b89.zip | |
Fix compatibility with Android 3.0
Incompatible APIs were used in the custom layouts and the extra keys
options.
Add @TargetApi annotations to help catch similar issues in the future
with the help of 'gradle lint'.
Diffstat (limited to 'srcs/juloo.keyboard2/prefs/LayoutsPreference.java')
| -rw-r--r-- | srcs/juloo.keyboard2/prefs/LayoutsPreference.java | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |
