I stuck from one day I tried multiple ways but not screen not auto resizable I am using parent="@style/Theme.AppCompat.Light.NoActionBar" theme but did not worked. I tried following process in Manifest File I added following
android:windowSoftInputMode="adjustResize"
I added FrameLayout and ScrollView too as a root layout and child layout but did not work.
My code in xml file is
android:id="@+id/root_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:fitsSystemWindows="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/forgot_screen_send_button"
android:layout_width="100dp"
android:layout_height="45dp"
android:layout_marginLeft="30sp"
android:layout_marginRight="30dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="20dp"
android:layout_gravity="center_horizontal"
android:background="@drawable/blue_color_bg_rec"
android:text="Send"
android:layout_alignParentBottom="true"
android:textColor="@color/white"
android:textAllCaps="false"
android:textSize="18sp"/>
</LinearLayout>
</LinearLayout>
Try this in the manifest of your app: In the <activity tag>
android:windowSoftInputMode="adjustPan"
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan">
</activity>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.