开发者

Two layouts for a single activity

Can i give two layouts for a single activity?? If yes, then how can i join them?? First layout should c开发者_如何学JAVAontain heading and the other one will be used in list adapter and repeated for every item in the list..

Thanks


You can have one layout for your Activity and use the following command to include a sub-layout :

<include android:layout="@layout/layout_name" />


I believe what you want to do is to have an activity layout containing the header and the list view. And on the other side, a row layout that will be used by a custom adapter for your list view.

Here is a short tutorial covering what you want to acheive: custom-listview-items-and-adapters

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜