How can I add blank space to the end of a ListView?

后端 未结 5 2012
一生所求
一生所求 2021-01-04 05:26

I have a number of elements in a ListView that scroll off the screen.

I would like there to be blank space at the end of the View. That is, the user should be able

5条回答
  •  梦谈多话
    2021-01-04 05:47

    this 100% works. in adapter set your code like this

       //in getCount
       @Override
       public int getCount() {
       return ArrayList.size()+1;
          }
        //in getview make your code like this
        public View getView(final int i, View view, ViewGroup viewGroup) {
    
        view = inflter.inflate(R.layout.yourlayout, null);
    
        if(i

提交回复
热议问题