The new Android Toolbar gives us some flexibility in what we can do with the actionbar, but I have ran into an issue. I'm using a ToolBar in the layout of my activity as an actionbar('AppBar' is correct name now I guess). When user focuses on a edittext the content is scrolled up by the system to let the user see the field. It also scrolls the ToolBar up and off the screen. This is a problem because navigation is on the Toolbar and now hidden from the user.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize">
</Toolbar>
</LinearLayout>
How can we keep the ToolBar in place?
0 comments:
Post a Comment