Android layout - listview and edittext below

前端 未结 2 1042
故里飘歌
故里飘歌 2021-01-28 21:47

I\'m trying to mimic the behaviour of the HTC SMS application (tradional view), where all messages are shown, and an EditTextis shown below. As you can see in the screenshot, wh

相关标签:
2条回答
  • 2021-01-28 22:17

    i think what you need to implement here is some sort of modification of the SeparatedListAdapter from Jeff Sharkey from this Article. In this article he not only manages to add two Adapters to a ListView but also explains how to have Headers to separate them if you want (you can remove that part of the code).

    So what i mean, is your first Adapter will be the data with It's rows, and the second Adapter will be a dummy one with no data that just points to a View with your controls or whatever.

    this way the ListView and what you want to add at the bottom are gonna be all scrollable.

    Hope this helps.

    0 讨论(0)
  • 2021-01-28 22:20

    A ListView automatically scrolls if all the items in it take up more space than the view provides. What happens if you remove the ScrollView?

    0 讨论(0)
提交回复
热议问题