Android:系统资源和应用程序资源之间的区别? [英] Android: Difference between a System Resource and an Application Resource?

查看:229
本文介绍了Android:系统资源和应用程序资源之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自Resources类的Android文档:

From Android documentation for the Resources class:

public static Resources getSystem ()

已在API级别1中添加返回一个全局共享资源对象,该对象 仅提供对系统资源的访问(不提供应用程序资源), 并且未针对当前屏幕进行配置(无法使用尺寸 单位,不会根据方向等发生变化.

Added in API level 1 Return a global shared Resources object that provides access to only system resources (no application resources), and is not configured for the current screen (can not use dimension units, does not change based on orientation, etc).

什么是系统资源应用程序资源,它们之间有什么区别?

What are system resources and application resources and what is the difference between them?

推荐答案

应用程序资源为

  1. 动画资源( R.anim )-> res/anim
  2. 颜色状态列表资源( R.color )->分辨率/颜色
  3. 可绘制资源( R.drawable )-> res/drawable
  4. 布局资源( R.layout )-> res/layout
  1. Animation Resources (R.anim) --> res/anim
  2. Color State List Resource(R.color) --> res/color
  3. Drawable Resources (R.drawable) --> res/drawable
  4. Layout Resource (R.layout) -- >res/layout

请参见此链接以获取更多详细信息

系统资源是

  1. Android ID( android.R.id )
  2. Android的小部件( android:id/tabs )
  3. 颜色( android.R.color.transparent )
  1. Android ids (android.R.id)
  2. Android's widgets (android:id/tabs)
  3. Color (android.R.color.transparent)

有关此信息,请参见更多详细信息

这篇关于Android:系统资源和应用程序资源之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆