I have linearlayers, with two textview, and checkkbox. I want create custom view, and add this code few times. I try 2 days, create custom view, but i don't find example with more complicated sample. Only one textview, or other simple thing.
My linearlayer:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:background="@drawable/border1px"
android:focusable="true"
android:clickable="true"
android:id="@+id/linearxyz"
>
<RelativeLayout android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="15dip"
android:focusable="false"
android:clickable="false"
>
<TextView android:id="@+android:id/title"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="Testxyz"
android:textColor="#FF0000"
/>
<TextView android:id="@+android:id/summary"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="Testxyz2"
/>
</RelativeLayout>
<CheckBox
android:id="@+android:id/checkboxxyz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
I want, use this layer, and i want change the text of textview, change id layer and add onclicklistener, to him.