Ha hentang Android Application Framework original layout and programming code addendum (1)

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.