android - R 和 android.R 类之间的区别

标签 android

<分区>

谁能从这个问题中解释一下; “R”之间的区别是什么

R.id.myListView

&

android.R.layout.simple_list_item_1

这2个'R'不是同一个类吗?

* Some people has down voted this question. I need to ask them the reason. If you answered the duplicate question & then down voted me it would have made sense. Neither answered my question nor the duplicate one!!! I mean whats the point of down voting some one without even helping? isn't this site supposed to be for help for programmers!! Weird!! **

最佳答案

R.layout.*, R.id.*,实际上任何没有 android.R.something - 前面的部分它指的是资源文件夹中的某些资源,例如drawables, strings, layouts, ids of widgets 等。android.R.* 是指随您的 SDK 一起提供的标准 android 项目

关于android - R 和 android.R 类之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16996600/

相关文章:

java - 来自另一个类的多个 Activity 的 setContentView

java - View 展开动画通过在嵌套布局中使用 "animateLayoutChanges"影响其他 View

java - 表格 View 中的随机图像

android - WebView 在 ProgressDialog 上显示应用程序强制关闭并出现空指针异常

Android Geofencingclient ApiException 1004 :

java - 网络安全配置 : Using Network Security Config from resource network_security_config debugBuild: true

java - Google Cloud Speech to Text 错误 : java. lang.NoSuchMethodError: No virtual method build()Lcom/google/protobuf/GeneratedMessageLite;

android - 用户不会收到具有多个APK的自动更新

android - 从 Activity 获取当前可见 fragment

android - Ajax请求发送到服务器但返回状态码0