abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
diff options
context:
space:
mode:
authorJules Aguillon2024-12-08 11:43:40 +0100
committerJules Aguillon2024-12-08 11:43:40 +0100
commit7c85870352c93cc7f73f28c26effc37e4f5bfc9b (patch)
tree59fd7b35dee5af9fa3c9d9549207b02de2cc914a /srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
parent2060e6ab07ea1b16b368e2bab2423cfa35fac760 (diff)
downloadunexpected-keyboard-7c85870352c93cc7f73f28c26effc37e4f5bfc9b.tar.gz
unexpected-keyboard-7c85870352c93cc7f73f28c26effc37e4f5bfc9b.zip
Fix empty text box when editing custom extra keys
Diffstat (limited to 'srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java')
-rw-r--r--srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java b/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
index fda07ec..6f4cf41 100644
--- a/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
+++ b/srcs/juloo.keyboard2/prefs/CustomExtraKeysPreference.java
@@ -10,6 +10,7 @@ import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
+import android.widget.TextView;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -48,10 +49,12 @@ public class CustomExtraKeysPreference extends ListGroupPreference<String>
String label_of_value(String value, int i) { return value; }
@Override
- void select(final SelectionCallback<String> callback)
+ void select(final SelectionCallback<String> callback, String old_value)
{
+ View content = View.inflate(getContext(), R.layout.dialog_edit_text, null);
+ ((TextView)content.findViewById(R.id.text)).setText(old_value);
new AlertDialog.Builder(getContext())
- .setView(View.inflate(getContext(), R.layout.dialog_edit_text, null))
+ .setView(content)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int which)
{