framework下添加资源文件方法
来源:互联网 发布:emc测试 知乎 编辑:程序博客网 时间:2024/06/06 20:39
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent" android:layout_height="match_parent"android:orientation="horizontal"android:gravity="center">android:id="@+id/root"><!-- 关机滑块 --> <FrameLayout android:id="@+id/slide_layout"android:layout_marginTop="50dip"android:layout_marginLeft="30dip" android:layout_width="match_parent"android:layout_height="wrap_content"> <FrameLayout android:id="@+id/gradientView_layout" android:layout_width="match_parent"android:layout_height="wrap_content"> <com.android.server.policy.GradientPowerView android:id="@+id/gradientView"android:layout_gravity="center"android:layout_width="match_parent"android:layout_height="75dip"android:layout_centerVertical="true"android:text="@string/slide_to_poweroff"android:textSize="16sp"android:textColor="#505050"android:SlideColor="#FFFFFF" /> </FrameLayout></FrameLayout>
上面这段 xml中添加的元素
添加方法
1.添加整个xml的名字到public.xml里声明 ,id 根据最末一个值的id号增加 eg:
<public type="layout" name="iphone_shutdown_dialog" id="0x01090018" />2.这个xml里的子layout布局需要添加到symbols.xml里声明 eg:
<java-symbol type="id" name="gradientView_layout" />3.自定义的id需要到 public.xml中声明 eg:
<public type="id" name="gradientView" id="0x0102003d" />
4.string资源文件的添加 需要到./frameworks/base/core/res/res/values/trings.xml 根据国际化选择不同的value目录
5.图片资源的添加 需要将图片资源名字在public.xml里声明eg:
<public type="drawable" name="slide_touch_icon" />
阅读全文
0 0
- framework下添加资源文件方法
- android源码framework下添加新资源的方法
- android源码framework下添加新资源的方法 .
- android源码framework下添加新资源的方法
- android源码framework下添加新资源的方法
- android源码framework下添加新资源的方法
- android framework中添加资源文件
- android framework中添加私有资源文件
- android framework中添加私有资源文件
- 编译Android Framework下的资源文件
- framework添加资源
- framework中添加资源!!!!!!!!!
- 在android源码framework里添加的资源文件!
- Android framework/base/core/res 中添加资源文件编译
- Android5.1 framework 添加资源文件后编译报错
- Android 往Framework中添加新资源的方法详解
- Android 往Framework中添加新资源的方法详解
- Qt下如何添加资源文件
- 关联查询
- AE开发中实现Control中的各种图形工具的方法
- js实现简单计算器(样式酷炫)
- okhttp的二次封装(基本使用)
- Js中的盒子模型及其几个常用的属性
- framework下添加资源文件方法
- Struts2的valueStack与actionContext(contextMap)的取值
- cookie/session机制
- iis服务器架网页远程播放ppt swf等office文档
- codility Ladder
- android md5加密与php md5加密一致
- matlab无法正常加载excel
- Centos6.5 安装配置Weblogic环境
- 数据库基本概念(二