zoukankan      html  css  js  c++  java
  • 关于android.R.id.text1

    android.R.id.text1是Android 框架里面的TextView的一个标识符,

    可以在Android的布局文件(layouts)里找到类似的(如select_dialog_item, select_dialog_singlechoice, simple_dropdown_item_1line, 等等)

    在Android xml中描述为@+id/text1

    所以,如果你要使用这些layouts,并且改变内容,你就必须使用这个id

    #probably in a custom ListAdapter that uses 
    View view = inflater.inflate(android.R.layout.simple_list_item_1, parent, false);
    TextView textView = (textView) view.findViewById(android.R.id.text1);
    textView.setText("Oh no! not hello world again");

    同时,你也可以使用这个标识符来标识一个TextView或者其他的控件甚至你自己的定制的布局文件,如:

    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1"
    android:layout_width="fill_parent"
    android:layout_height="?android:attr/listPreferredItemHeight"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:gravity="center_vertical"
    android:paddingLeft="5dip"
    android:singleLine="true"  
    />
  • 相关阅读:
    R set.seed()
    R tapply()
    R table
    清除R console中出现加号+
    r向量映射
    Java常识1
    IDEA配置
    SQL.字符串重叠项数量统计
    SQL.数据库内拆分字符串并返回数据表
    IDEA--TomCat配置
  • 原文地址:https://www.cnblogs.com/mumue/p/2450238.html
Copyright © 2011-2022 走看看