Reputation: 159
I Want to Prevent app bar pushing up When Edittext Clicks Please help me to prevent Appbar scrolling and i added android:windowSoftInputMode="adjustResize" and adjustpan but not worked please help me.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:id="@+id/act"
android:clickable="true"
android:focusableInTouchMode="true"
android:orientation="vertical"
android:layout_height="match_parent"
tools:context="com.example.admin.easydart.View.Dart">
<android.support.v7.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_alignParentTop="true"
android:background="#016ba9"
android:layout_height="60dp"
android:layout_width="match_parent">
</android.support.v7.widget.Toolbar>
<RelativeLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_below="@+id/my_toolbar"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/actS"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:clickable="true"
android:focusableInTouchMode="true"
android:gravity="center"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
Upvotes: 2
Views: 2074
Reputation: 41
set in onCreate method of your activity class:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
Upvotes: 3
Reputation: 4415
use this inside your activity tag
<activity
android:windowSoftInputMode="adjustResize"/>
for more reference look this page
Upvotes: 0
Reputation: 69709
Use android:windowSoftInputMode="adjustNothing"
to your activity inside your manifest file
<activity
android:name=".YourActivity"
android:windowSoftInputMode="adjustNothing"
android:theme="@style/StoreSetting" />
Upvotes: 0