开发者

Adding the banner to the each activity in my application

开发者 https://www.devze.com 2023-03-18 18:21 出处:网络
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 usi

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

0

精彩评论

暂无评论...
验证码 换一张
取 消