I am writing a simple cache-encryption operation. Two EditTexts on the screen, one clear text, one encrypted. Here's an example for an encrypted EditText - plain text is similar.
<EditText android:layout_below="@id/Caesar_Label_CryptText" android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/Caesar_Text_CryptText" android:hint="Enter crypted text" android:maxLines="2" android:lines="2" android:minLines="2" android:inputType="text|textMultiLine|textVisiblePassword" android:scrollbars="vertical" android:gravity="top" />
Now, when entering plain text, I have TextChangedListener working, which programmatically encrypts and populates this crypto-EditText. So far so good.
When the entered text is completely long, scartext-EditText scrolls with my imputation, but the crypto-EditText remains at the top of the text. I would really like the crypto-EditText to scroll so that it always shows the bottom line of its contents.
How can this be done, preferably from the onTextChanged () method of TextWatcher?
source share