Adding two R.id in a single TextView in xml

后端 未结 2 817
慢半拍i
慢半拍i 2021-01-21 13:00

I have two android:id .

For example: [ R.id.custom_font ] and [ R.id.product_name ]

In .java file

 TextVie         


        
2条回答
  •  情深已故
    2021-01-21 13:36

    I don't see the point of having two IDs for one view...

    Just use the R.id.custom_font again in the following line:

        adapter = new ArrayAdapter(this, R.layout.list_item, R.id.custom_font,  products);
    

提交回复
热议问题