I am trying to implement a list using ListView, which has rows created with rows. This LinearLayout is made up of a checkbox and a textview. The name of the line layout is Task_list_Oro.xml:
& Lt; TextView Android: id = "@ android: id / text1" Android: layout_width = "fill_parent" android: layout_height = "wrap_content" /> & Lt; / LinearLayout & gt; Then from my code, I can initialize this list:
last string [] items_task = new string [] {"one", " Two "," three "}; SetListAdapter (New Arrayheader & lt; String & gt; (This, RLType_Cast_List_ImS, Items_task)); But then I get an error: Aradhyapter - You have to provide a resource ID for a text wave Then I will send textview Attempt to specify ID like this:
setListAdapter (new array adapter & lt; string & gt; (this, RID.Text1, RL.Task_List_Lai, item_task )); but I did not find any resource error (R.id.text1 exists in R.java file).
What should I do?
In this case, you have Android. RidText1 will be used because you had an Android-built ID (@Android: Id clue).
setListAdapter (new array adapter & lt; string & gt; (this, R. Late Task_s ______O, AndroidRID.Text1, items_task)); There is not much profit to do this, as long as you do not build in layout, such as Android. R. Layout. Two_line_l_ystem
Comments
Post a Comment