The only thing I am trying do that there will be an editText at the top and after that there will be an ImageView. Now at the bottom line there will be some buttons (ex. emojis) and this bottom part will only be pushed up by the soft keyboard whenever it will appear.
I am making it more clear by attaching this layout of Facebook. required output
I have gone through all these SO questions and also tried their answers but no luck. May be I am doing something wrong.
Android: Resize only parts of view with soft keyboard on screen
Android: How do I prevent the soft keyboard from pushing my view up?
android : How to prevent resizing the window when displaying the virtual keyboard
My XML code
<ScrollView
android:id="@+id/scrollOnPost"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:isScrollContainer="false"
android:fillViewport="true"
android:layout_below="@+id/header_layout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="4"
android:layout_gravity="bottom"
android:gravity="bottom">
<EditText
android:id="@+id/ed_post"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ImageView
android:id="@+id/img_posted_list_row"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2.7"
android:adjustViewBounds="true"
android:src="@mipmap/ic_launcher"
android:scaleType="fitCenter"
android:background="@color/red"/>
</LinearLayout>
</ScrollView>
<ImageButton
android:id="@+id/imgBtn_Emoji"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:src="@drawable/smile_face"
android:background="@drawable/button_pressed_white"
/>
All I getting that my soft keyboard always pushing the whole layout up not just the emoji at the bottom. Thanks.