reusable UI in android app
I am working on android app where I am thinking to develop reusable UI interface. How it can be developed and included in my .xml's
Here I want to develop a progress bar with my image and it will be display on some .xml's. Please provide any code help.
I am开发者_开发问答 a new in this field.
you can use <Include>
xml tag within your layout xml,
read this :) http://developer.android.com/resources/articles/layout-tricks-merge.html
I think you need to use styles and themes. Check this out.
You can either build custom (compound) views, look at Building Custom Components.
Or you can use Fragments. Fragments are new in Honeycomb (Android 3.0), but there is a compatibility library that adds fragment support to lower android versions (can be found in your ANDROID_SDK/extras/android
folder). Or you can mix both of course.
精彩评论