Position of modalities for dialogue



  • I'm trying to make a communication window like contact or whats app? I mean, when the line edit with the button is sent, attached to the lower part of the screen, and the rest of the screen showed messages, the thing is, I don't know exactly how to do it. I tried to use LinearLayout but after the listview, and then lineedit, lineedit goes down the screen. Tell me how better and better to lay down the elements?



  • You can try RelativeLayout:

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    
    &lt;ListView
        android:id="@+id/myList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/myEdit"
        android:layout_alignParentTop="true" /&gt;
    
    &lt;EditText
        android:id="@+id/myEdit"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true" /&gt;
    

    </RelativeLayout>

    Instead of EditText, you put your lineedit




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2