How to make list view items align left and right programmatically in Android
问题 I am working on a chat app and on chat view I have to show message left and right. But as I am pretty new in Android programming, I am not being able to achieve this. Here is what I am getting : Here is my chatbubble.xml that is being used to show line items. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/bubble_layout_parent" android:layout_width="wrap_content" android:layout_height="wrap_content">