Adding the banner to the each activity in my application
I am new in android application development.I am developing one application in this we have four screens.In every screen I want ban开发者_如何学编程ner below of the activity.for each activity I am using ListView class for displaying no of elements.So if you know please help me for this.thanks in advance
you can include your banner layout inside other layouts like below.
<include
android:layout_width="fill_parent"
android:layout_height="wrap_content"
layout="@layout/yourlayout" />
You can refer this link for more Information http://www.curious-creature.org/2009/02/25/android-layout-trick-2-include-to-reuse/
Assuming that every screen in your app is a separate activity with its own layout, you can define layout for the banner and include
it using include layout.
Some more on the subject: http://developer.android.com/resources/articles/layout-tricks-reuse.html
精彩评论