Reputation: 12384
I've got this EditText
:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<EditText
android:id="@+id/text_editor"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start|top"
android:inputType="textLongMessage|textCapSentences|textMultiLine"
android:textAlignment="gravity" />
</RelativeLayout>
I'm using the support ActionBarActivity
, and this is what I have on my Nexus 5:
As you can see the ActionBar
is slightly scrolled off screen. I've made a video that shows that.
I don't think this is the expected behavior, is it?
If it is, how can I prevent this? It seems very counter-intuitive.
Upvotes: 2
Views: 750
Reputation: 1261
Just remove this attribute in your actionbar's xml:
app:layout_scrollFlags="scroll|enterAlways"
Upvotes: 0
Reputation: 30804
Wrap your EditText
in a ScrollView
.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<EditText
android:id="@+id/text_editor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="start|top"
android:inputType="textLongMessage|textCapSentences|textMultiLine"
android:textAlignment="gravity" />
</ScrollView>
Upvotes: 2