I have problem in ScrollView
.I have one layout,I use ScrollView
have one Button
which is bottom at position.When I click EditText
then keyboard is showing,my button moving up in my keyboard(Button
witch is a bottom position use this windowSoftInputMode
in my manifest file
<activity
android:name=".activities.MainActivity"
android:screenOrientation="sensorPortrait"
android:theme="@style/NoTitleBar"
android:windowSoftInputMode="stateAlwaysHidden"
>
and this is a my xml code
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:clickable="true">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:fillViewport="true"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/upload_main_layout_upload"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/lay_v3"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/transfer_headerView_height"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:background="#f2f2f2"
android:layout_alignParentStart="true"
android:id="@+id/upload_header_layout">
<Button
android:layout_width="@dimen/withdrow_change_card_width"
android:layout_height="@dimen/withdrow_change_card_height"
android:text="@string/u_slide_menu_change_card_v1"
android:background="@drawable/rounded_corners_withdrow"
android:id="@+id/upload_choose_card_main"
android:layout_centerVertical="true"
android:textColor="#4c4c4c"
android:textSize="@dimen/u_common_text_size_small"
android:layout_centerHorizontal="true" />
</RelativeLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/u_common_margin_left"
android:layout_marginRight="@dimen/u_common_margin_left"
android:layout_marginTop="@dimen/withdrow_change_card_height"
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/edittext_input_background_not_focus"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/u_common_margin_left"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:orientation="vertical"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_menu_downarrow_grey"
android:layout_centerVertical="true"
android:visibility="invisible"
android:padding="@dimen/slide_menu_hide_image"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/u_transfer_currency_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/u_widget_height"
android:layout_alignParentTop="true"
>
<EditText
android:id="@+id/u_major_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
android:maxLines="1"
style="@style/u_edit_text"
android:textSize="@dimen/u_common_text_size_extra_large"
android:hint="0.00"
android:inputType="numberDecimal"
android:background="@null"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/bootom_layout"
android:paddingRight="@dimen/u_common_margin_left"
android:paddingLeft="@dimen/u_common_margin_left"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<Button
android:id="@+id/u_done"
android:layout_width="fill_parent"
android:layout_height="@dimen/u_widget_height"
android:background="@drawable/rounded_corners_blue"
android:textColor="#ffffff"
android:textSize="@dimen/u_common_text_size"
android:text="@string/u_menu_upload" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/u_common_margin_left"
android:visibility="invisible"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>
i don't need to move botton button keyboard up.i want simple scroll when keyboard is showing.i also tryed this in my manifest file but not working
android:windowSoftInputMode="adjustResize"
what am i doing wrong? if anyone knows solution please help me thanks everyone