I have a custom view which looks something like this:
<LinearLayout
android:orientation="vertical">
<TextInputLayout>
<TextInputEditText />
</TextInputLayout>
<TextView
android:text="Some info text" />
</LinearLayout>
It's basically a normal edit text with hint, which has "info" text underneath.
The problem comes in when I try to requestFocus()
on the custom view. It correctly places the cursor in the edit text, but only scrolls to the bottom of the edit text. The "info" text is therefore "hidden" until the user scrolls down a bit.
Is it possible to tell the custom view what its "focus area" is? Or perhaps another mechanism which makes the system scroll correctly (i.e. scroll to the bottom of the "info" text?
Any help will be appreciated. Thanks.