[Solved] How can i add two buttons to the listview from the adapter?
For ListViews, there are two layout files used. One specifies the layout for the list as a whole, the other specifies the layout for the list_item. List Item Layout: list_item.xml <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:baselineAligned=”false” android:orientation=”horizontal”> <TextView android:id=”@+id/contact_phone” android:layout_width=”match_parent” android:layout_height=”40dp” android:layout_marginBottom=”2dp” android:layout_marginLeft=”5dp” android:layout_marginStart=”5dp” android:layout_marginRight=”5dp” android:layout_marginEnd=”5dp” android:layout_weight=”0.73″ android:background=”#00000000″ android:gravity=”start|center_vertical” android:text=”” android:textColor=”#FFFFFFFF” android:textSize=”16sp” /> … Read more