<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Calvin's Tech Space

    成于堅忍,毀于浮躁

       :: 首頁 :: 聯系 :: 聚合  :: 管理

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

      <ListView android:id="@android:id/list"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
      <TextView android:id="@android:id/empty"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/no_notes"/>

    <TextView android:id="@+id/text1"
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
    </LinearLayout>

    • @告訴XML解析器后面的是一個資源引用,+意味著如果沒有這個資源就創建一個
    • list和empty ID是Android平臺提供的,因此要加上android: 前綴
    • layout文件下的每一個xml文件在R.java中都有一個class對應,其中的每一個資源在R.java中都有相應的入口,以便在應用程序中方便的引用
    •  The android.R class is a set of predefined resources provided for you by the platform, while your project's R class is the set of resources your project has defined. Resources found in the android.R resource class can be used in the XML files by using the android: name space prefix (as we see here).
    • Most Activity classes will have a layout associated with them. The layout will be the "face" of the Activity to the user. In this case our layout will take over the whole screen and provide a list of notes.Full screen layouts are not the only option for an Activity however. You might also want to use a floating layout (for example, a dialog or alert), or perhaps you don't need a layout at all (the Activity will be invisible to the user unless you specify some kind of layout for it to use).

    • This example uses a SimpleCursorAdapter to bind a database Cursor into a ListView, and this is a common way to use a ListAdapter. Other options exist like ArrayAdapter which can be used to take a List or Array of in-memory data and bind it in to a list as well.

    http://www.chinaup.org/docs/intro/tutorial-ex1.html

    posted on 2009-09-02 09:12 calvin 閱讀(233) 評論(0)  編輯  收藏 所屬分類: Android
    主站蜘蛛池模板: 日韩精品无码区免费专区 | 亚洲经典在线中文字幕| 国产国产人免费人成成免视频| 国产大片91精品免费看3| 亚洲精品无码久久久久APP | 亚洲精品美女在线观看| 久久国产免费观看精品3| 337p欧洲亚洲大胆艺术| 在免费jizzjizz在线播| 亚洲国产精品久久网午夜| 曰批视频免费30分钟成人| 天堂亚洲国产中文在线| 国产在线19禁免费观看| 四虎影视久久久免费| 精品国产香蕉伊思人在线在线亚洲一区二区| 老司机在线免费视频| 亚洲av无码电影网| 免费无码又爽又刺激高潮 | 日韩精品无码免费专区午夜不卡| 亚洲乱码中文字幕综合| 无码国产精品一区二区免费式芒果 | 亚洲va乱码一区二区三区| 爽爽日本在线视频免费| 一级特黄色毛片免费看| 亚洲精品午夜国产VA久久成人| 久久99热精品免费观看牛牛| 亚洲噜噜噜噜噜影院在线播放| 拨牐拨牐x8免费| 一个人看的www免费在线视频| 国产v亚洲v天堂无码网站| ww在线观视频免费观看| 亚洲国产精品美女久久久久| 综合亚洲伊人午夜网| 99re免费99re在线视频手机版| 色噜噜亚洲男人的天堂| 免费在线观看一级毛片| 99久久精品免费视频| 国产成人亚洲精品电影| 亚洲丝袜美腿视频| 国产免费人成视频在线观看| 久久精品免费视频观看|