I believe that many of my friends who have never done mobile development, like me, started the android tutorial from Master Gao hentang's book. However, I can see that the 5th plan and the subsequent steps are as follows:CodeThere is always a problem, because there is no simple_list_item_1, and the subsequent code explanation does not seem to mention what this file is. In fact, this XML file seems like itemrenderer In Flex or itemtemplate in Asp.net, the content is as follows:
<? XML version = "1.0" encoding = "UTF-8"?>
<Textview Android: text = "textview01" Android: Id = "@ + ID/textview01"
Android: layout_width = "fill_parent" Android: layout_height = "wrap_content"
Xmlns: Android = "http://schemas.android.com/apk/res/android"> </textview>
Adapter = new arrayadapter <string>
(This, Android. R. layout. simple_list_item_1, DM. loaddata ());
This sentence uses simple_list_item_1 to render the data,
LV. setadapter (adapter );
Display Data on listview
It seems that the adapter in Android is a tool that sets rendering and data binding, and then binds rendering and data to the container.
PS: It seems that the current applicationProgramThe interface design patterns tend to be XML. Flex, Silverlight, WPF, and Android all use XML la S. As long as you understand the corresponding terms, it seems that there are not many methods.