android - adding a layout in another layout -


this question has answer here:

how add 1 layout in layout.i created layout in tblrow.xml.so want add rows in menu.xml.i want add rows depending upon no of rows.how can that.if add how can identify each row.please me.i need solution in java not in xml. code is

<tablerow android:id="@+id/tblrowmovies" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/btn_backgrnd"  android:clickable="true" android:focusable = "true" android:layout_weight="1.0"> <imageview android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/movie" android:layout_gravity="center_vertical|center_horizontal"/> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="movies" android:layout_gravity="center_vertical" android:paddingleft="20dp" android:textcolor="@android:color/white" android:textsize="20sp" android:textstyle="bold"> </textview>         

.

you can include 1 layout file in , technique called reusing android layouts using include tag. e.g:

<include android:id="@+id/myid1" layout="@layout/workspace_screen" /> 

this explained in a blogpost android developers..

yet article on android developer site explains layout re-usability.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -