Merging layout is an excellent feature in android. Separate xml can be included in a single xml.
For this first i create a main.xml file
< RelativeLayout xmlns:android = "http://schemas.android.com/apk/res/android" android:orientation = "vertical" android:layout_width = "fill_parent" android:layout_height = "fill_parent" > < TextView android:text = "Account" android:id = "@+id/account" android:layout_below = "@+id/title" android:padding = "10dip" android:layout_alignParentLeft = "true" android:layout_width = "wrap_content" android:layout_height = "wrap_content" > </ TextView > < EditText android:id = "@+id/youtube_feed_TF" android:hint = "Username" android:layout_marginLeft = "10dip" android:inputType = "textEmailAddress" android:layout_below = "@+id/account" android:layout_centerHorizontal = "true" android:layout_width = "fill_parent" android:padding = "10dip" android:layout_height = "wrap_content" ></ EditText > < include layout = "@layout/footer2button" /> </ RelativeLayout > |
In the bottom you can see that i have included a xml file named footer2button.xml
< merge xmlns:android = "http://schemas.android.com/apk/res/android" > < LinearLayout android:layout_width = "fill_parent" android:gravity = "bottom" android:id = "@+id/bottomlayout" android:layout_height = "wrap_content" android:layout_alignParentBottom = "true" > < Button android:layout_height = "wrap_content" android:id = "@+id/backbutton" android:text = "Back" android:layout_width = "wrap_content" android:layout_weight = "1" android:layout_alignParentBottom = "true" > </ Button > < Button android:layout_height = "wrap_content" android:id = "@+id/nextbutton" android:text = "Next" android:layout_width = "wrap_content" android:layout_weight = "1" android:layout_alignParentBottom = "true" > </ Button > </ LinearLayout > </ merge > |
The Merged layout will be like this
Pingback: Merge two layout xml in android | Coderz Heaven | Content Store
Pingback: Android » Archive » Merge two layout xml in android | Coderz Heaven » Android
Pingback: Merge two layout xml in android | Coderz Heaven
Pingback: Merge two layout xml in android | Coderz Heaven | WWW.ANDROIDWORLD.BIZ
Pingback: Merge two layout xml in android | Coderz Heaven | Dr-Net
how to create a zip file on sd card with attachment(images)
please need help
You can simply create a folder in sdcard and copy images into it.
Check this link on creating a directory in your sdcard http://coderzheaven.com/2011/04/27/how-to-create-and-delete-a-directory-in-sdcard-in-android/
Hello there
I followed your tutorials.
But footer2button.xml comes up new windows how to fix it?