From 1786ee5fa0cdd58649b6757c0ac513f2ee0e4d97 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Wed, 15 Feb 2012 11:46:57 -0800 Subject: [PATCH] Fixed a crash in the task rabbit activity introduced by the control set refactor --- .../astrid/taskrabbit/TaskRabbitNameControlSet.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/taskrabbit/TaskRabbitNameControlSet.java b/astrid/plugin-src/com/todoroo/astrid/taskrabbit/TaskRabbitNameControlSet.java index 4e83eb842..c67f2a04b 100644 --- a/astrid/plugin-src/com/todoroo/astrid/taskrabbit/TaskRabbitNameControlSet.java +++ b/astrid/plugin-src/com/todoroo/astrid/taskrabbit/TaskRabbitNameControlSet.java @@ -45,13 +45,9 @@ public class TaskRabbitNameControlSet extends PopupControlSet implements TaskRab editText = (EditText) getView().findViewById(R.id.notes); notesPreview = (TextView) getDisplayView().findViewById(R.id.display_row_edit); notesBody = (LinearLayout) getDisplayView().findViewById(R.id.notes_body); - dialog.getWindow() - .setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); displayText.setText(activity.getString(titleID)); editText.setMaxLines(Integer.MAX_VALUE); - - pictureButton = (ImageButton) getDisplayView().findViewById(R.id.picture); if (pictureButton != null) { @@ -75,6 +71,13 @@ public class TaskRabbitNameControlSet extends PopupControlSet implements TaskRab } + @Override + protected void additionalDialogSetup() { + dialog.getWindow() + .setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE + | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); + } + @Override public void saveToDatabase(JSONObject json, String key) throws JSONException { json.put(key, editText.getText().toString());