2

Androidに示すように、別の listView 内に listView を実装しようとしています: listview の listview

問題は、子リストの最初の項目のみが表示され、非表示のままであるということです。

4

4 に答える 4

0

Listview 内で Listview を提供するための使用法は何ですか..展開可能な ListView を使用する方が良い

于 2013-02-15T10:32:51.793 に答える
0

ExpandableHeightGridView を使用して、expanded true を設定できます。

于 2016-01-09T08:05:48.847 に答える
0

First, why do you want to put a ListView in a ListView ? Maybe your problem can be solved by using an ExpandableListView.

A ListView is a scrollable component and it's not a good idea to nest scrollable components.

If you still want to use nested ListView, you have to know that the calculated height of a ListView is the height of his first element.

So if you want to use a ListView in a ListView, you will have to code a CustomListView and Override some methods as :

  • onLayout
  • onMeasure
  • onDraw / dispatchDraw

To know more about Custom components, here is a nice explanation given by Chiuki Chan : Follow the link

于 2013-02-15T10:33:39.097 に答える