step 1: file name : style_list.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/colorBlue"
android:angle="270"/>
<corners
android:bottomRightRadius="7dp"
android:bottomLeftRadius="7dp"
android:topLeftRadius="7dp"
android:topRightRadius="7dp"/>
</shape>
step 2: file name:listview.xml
<ListView
android:id="@+id/Appoinment_list"
android:layout_width="368dp"
android:layout_height="wrap_content"
android:dividerHeight="10.0sp"
tools:layout_editor_absoluteY="0dp"
tools:layout_editor_absoluteX="8dp" />
step 3: file name:listview_item.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical".
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/style_list"
android:orientation="horizontal">
<TextView
android:id="@+id/time"
android:gravity="center"
android:padding="10dip"
android:textSize="16dip"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="TextView" />
<TextView
android:id="@+id/name"
android:gravity="center"
android:padding="10dip"
android:textSize="16dip"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
</LinearLayout>
No comments:
Post a Comment