when user click on FULL-TIME button ,I want to open fragment which should display list-view that include image, texts, and 3 dots on the right end of each view find image below. how would do this?
.
this is my code . home.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/layout_2nd"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/btn_full_time"
android:layout_width="191dp"
android:layout_height="60dp"
android:layout_alignParentTop="true"
android:text="@string/full_time" />
<Button
android:id="@+id/btn_part_time"
android:layout_width="206dp"
android:layout_height="60dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_toRightOf="@+id/btn_full_time"
android:text="@string/part_time" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/layout_2nd">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</ListView>
</FrameLayout>
</RelativeLayout>
</RelativeLayout>
Do i need to create separate xml for each view or can i do that programmatically ? please suggest?