KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have created a custom listView with the row as follows: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:id="@+id/lay1" android:layout_height="wrap_content" android:background="#ffffff"> <TextView android:layout_width="fill_parent" android:textColor="#000000" android:id="@+id/text" android:layout_height="wrap_content" android:layout_toRightOf="@+id/check" android:textSize="15dip" android:paddingBottom="5dip" android:paddingRight="10dip" android:paddingLeft="10dip"></TextView> <Button android:id="@+id/check" android:layout_centerVertical="true" android:background="@drawable/uncheck" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"></Button> <EditText android:layout_width="fill_parent" android:textColor="#000000" android:id="@+id/edit" android:layout_height="wrap_content" android:background="@null" android:layout_below="@+id/text" android:textSize="15dip" android:paddingTop="5dip" android:paddingRight="10dip" android:paddingLeft="10dip" android:layout_toRightOf="@+id/check" android:paddingBottom="5dip" ></EditText> </RelativeLayout> And listview code used in my main xml is: <ListView android:layout_width="450dip" android:background="#FFFFFF" android:layout_height="340dip" android:layout_marginLeft="9dip" android:layout_marginTop="10dip" android:id="@+id/mainlist1" android:divider="@drawable/grayline" android:cacheColorHint="#00000000" ></ListView> And adapter used is as follows: public class Adapter extends BaseAdapter { ArrayList<Row> row; private Context context; public Adapter(Context context, ArrayList<SongRow> songrow) { this.context = context; this.row = row; }
Tags (comma-separated)
Save Edits
Cancel