How to make the same strip with buttons as in the vk application when creating a post? This panel still has to be raised when the keyboard extends to always be visible.


W post

    1 answer 1

    EditText stretch the width and length of the screen, below will be the blue panel with the 5th ImageView as in the screenshot. Change pictures, replace with ImageButton and here is your happiness. Space must be placed between all view that need to be aligned.

     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_height="match_parent" android:layout_width="match_parent"> <EditText android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:text="Df" android:gravity="top|left" android:padding="10dp" android:background="#FFFFFF" android:textColor="#000000"/> <LinearLayout android:gravity="bottom" android:layout_width="match_parent" android:background="#0953AE" android:layout_centerVertical="true" android:layout_height="60dp"> <ImageView android:layout_height="match_parent" android:layout_width="wrap_content" android:src="@drawable/ic_launcher"/> <Space android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1"/> <ImageView android:layout_height="match_parent" android:layout_width="wrap_content" android:src="@drawable/ic_launcher"/> <Space android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1"/> <ImageView android:layout_height="match_parent" android:layout_width="wrap_content" android:src="@drawable/ic_launcher"/> <Space android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1"/> <ImageView android:layout_height="match_parent" android:layout_width="wrap_content" android:src="@drawable/ic_launcher"/> <Space android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1"/> <ImageView android:layout_height="match_parent" android:layout_width="wrap_content" android:src="@drawable/ic_launcher"/> </LinearLayout> </LinearLayout> 

    Well, in your Activity tag in AndroidManifest

     android:windowSoftInputMode="adjustResize" 
    • Comments are not intended for extended discussion; conversation moved to chat . - Nick Volynkin