i want to create the follow relative layout dynamically ,contains spinner ,textview .with the same style?



here my XML code to create the spinner with textview in the relative layout. here i need this format dynamically with the exact style. u can find the style by clicking this link . [IMG]http://ift.tt/TWSkzd]



<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp" >`

<Spinner
android:id="@+id/spinner_ApproveLine"
style="@style/spinner_style"

android:paddingLeft="90dp"
android:layout_marginLeft="-2dp"
android:layout_marginTop="0dp"
android:paddingRight="5dp"

android:layout_width="fill_parent"
android:layout_height="45dp"
android:orientation="vertical"
android:layout_alignBottom="@+id/relativeLayout_app"/>

<LinearLayout
android:id="@+id/relativeLayout_app"
android:layout_width="85dp"
android:layout_height="43dp"
android:orientation="vertical"
android:background="@drawable/icon_label_bg" >

<TextView
android:id="@+id/Approve"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:paddingTop="7dp"
android:text="@string/text_approval"
android:textColor="@color/tab_color"
android:layout_gravity="right"
android:textSize="12sp" />

<TextView
android:id="@+id/Line"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingRight="5dp"
android:text="@string/text_line"
android:textColor="@color/tab_color"
android:layout_gravity="right"
android:textSize="12sp" />

</LinearLayout>
</RelativeLayout>


this is my static XML code . i want this exact style dynamically and populate the data dynamically


http://ift.tt/1s2fLGb


Thank You !!!


No comments:

Post a Comment