开发者

Android Layout ListView

I need following layout for my application:

<TextView/>开发者_如何学C;
<ListView/>
<Button/>

But in this layout only ListView has a scrollbar.

I need Scrallbar for all page and don't need it for ListView. Is it possible?


Why don't you use something like this:

ListView myListView = new ListView (this);

TextView myTextView = new TextView (this);
myTextView.setText ("Your text");
…       // setup whatever else you need
Button myButton = new Button (this);
…       // setup button text, callback, whatever

myListView.addHeaderView (TextView);
myListView.addFooterView (myButton);

With the following layout:

<ListView />

This adds a fixed view to be displayed at the top and bottom of the ListView, regardless of the contents of the ListView. See the reference for these methods.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜