Android: id list view

前端 未结 3 2062
闹比i
闹比i 2021-02-09 02:37

I have a list view declared in my xml:




        
3条回答
  •  不知归路
    2021-02-09 03:09

    In xml layout use,

     
    

    In Java Code:

     ListView listview=(ListView)findViewById(R.id.list);// it takes id of listview from xml
    

    if you need to use android id for listview then replace your code as

    
    

    It may help you..

提交回复
热议问题