android屏幕适配
来源:互联网 发布:mac 开发php 必备软件 编辑:程序博客网 时间:2024/06/01 09:10
2.标准的布局
<RelativeLayout android:layout_width="match_parent" android:layout_height="108px" android:layout_marginTop="26px" android:background="#ffffffff" xmlns:android="http://schemas.android.com/apk/res/android"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="22px" android:layout_marginTop="16px" android:text="王大炮 WANG.DAPAO" android:textColor="#333" android:textSize="28px" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_marginBottom="16px" android:layout_marginLeft="22px" android:text="护照:G50786449" android:textColor="#999" android:textSize="26px" /></RelativeLayout>3.导入依赖
compile 'com.zhy:autolayout:1.4.5'
4.在你的项目的AndroidManifest中注明你的设计稿
的尺寸。<meta-data android:name="design_width" android:value="768"></meta-data><meta-data android:name="design_height" android:value="1280"></meta-data>5.也可以在布局文件中直接用autolayout布局方式
6.注意事项:
测试最好用真机Android Studio有时候不能动态的加载布局。
阅读全文
0 0
- 【Android】屏幕适配
- android屏幕适配
- android屏幕适配
- android 屏幕适配
- Android屏幕适配
- Android屏幕适配
- Android屏幕适配
- Android屏幕适配
- android 屏幕适配
- Android屏幕适配
- Android屏幕适配
- Android 屏幕适配
- android屏幕适配
- Android屏幕适配
- Android屏幕适配
- Android 屏幕适配
- android屏幕适配
- Android屏幕适配
- 转载
- 谷歌访问提示您的链接不是私密链接解决方案
- 关于阿里云CDN的一些了解(上篇)
- 排序算法及巨量数据排序
- Head First设计模式第一天学习笔记
- android屏幕适配
- 【赠书】从商用到开源:15个维度,全面剖析DB2与MySQL数据库的差异
- 详解 db file sequential read 等待事件
- 指针,&,*操作符
- com.sanwin.acdm.modules.sys.listener.WebContextListener
- android studio3.0 编译 Cannot set the value of read-only property 'outputFile' for apkVariantOutputImp
- 快速排序
- 网络访问流程 与 http流程
- How to get rid of this annoying W8123 warning in my IDE