知识就是力量,时间就是生命。这篇文章主要讲述Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构相关的知识,希望能为你提供帮助。
概述日常使用别家的APP过程中,会遇到一些比较好看的布局,这时候我们就想学习一下别人的布局结构,以便参考。
(1)手机连接电脑、设置手机为USB调试模式【Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构】参考《【Android Studio安装部署系列】七、真机运行项目》
(2)运行android Studio,打开 Tools--Android--Android Device Monitor注意:android Studio3.1开始只能通过命令行的方式启动Android Device Monitor。
双击sdk安装目录/tools/monitor.bat
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002A62Y0-0.jpg)
文章图片
android Studio3.0或更低版本可以通过菜单栏的方式打开
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002AC4a-1.jpg)
文章图片
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002A63B1-2.jpg)
文章图片
(3)切换到DDMS
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002AB3T-3.jpg)
文章图片
(4)选中设备,点击 “Dump View hHerarchy for UI Automator”,我们就可以查看布局的视图结构了
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002A62H3-4.jpg)
文章图片
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002A63T3-5.jpg)
文章图片
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002AC542-6.jpg)
文章图片
(5)如果想要获取APP里面的颜色值,可以使用Android Studio的拾色器 1、打开任意一个项目的colors.xml文件,点击左侧的颜色方块,打开Android Studio拾色器
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002AC4R-7.jpg)
文章图片
2、调整Android studio的当前项目和Android Device Monitor界面,保证两者不遮挡
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002A61F9-8.jpg)
文章图片
3、使用吸管进行取色即可
![Android Studio安装部署系列二十八Android Studio查看其它APP的布局结构](http://img.readke.com/220509/002A61043-9.jpg)
文章图片
参考资料使用Android studio 查看其它app的布局的结构
android studio 3.1 Android Device Monitor 新的启动方式
推荐阅读
- (转)android系统开发 AP 和 BP 简要说明
- Android基础知识学习
- 8.16安卓开发注意事项
- Android : 输入设备键值映射流程
- Multiple dex files define Lcom/google/gson/internal/Streams$AppendableWriter$CurrentWrite;
- hdu6406 Taotao Picks Apples 多校第8场1010
- android在Service中新建TextView
- Spring Boot @DeleteMapping
- android打包生成apk时自定义文件名版本号。自定义项目字段等等