Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 0e8c9b1f authored by Marten Gajda's avatar Marten Gajda Committed by GitHub
Browse files

Allow Multiline Checklist items. Implements #991 (#992)

parent 12c16e3e
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -340,14 +340,19 @@ public class DescriptionFieldView extends AbstractFieldView implements OnChecked
                // create new item with new test
                int pos = mContainer.indexOfChild(itemView);
                insertItem(item.checkbox, pos + 1, newText);
                ((EditText) mContainer.getChildAt(pos + 1).findViewById(android.R.id.title)).setSelection(0);
                ((EditText) mContainer.getChildAt(pos + 1).findViewById(android.R.id.title)).setSingleLine(true);
                EditText editText = ((EditText) mContainer.getChildAt(pos + 1).findViewById(android.R.id.title));
                editText.setSelection(0);
                editText.setSingleLine(true);
                editText.setMaxLines(Integer.MAX_VALUE);
                editText.setHorizontallyScrolling(false);
                return true;
            }
            return false;
        });

        text.setSingleLine(item.checkbox);
        text.setMaxLines(Integer.MAX_VALUE);
        text.setHorizontallyScrolling(false);

        TextWatcher watcher = new TextWatcher()
        {