Android Studio如何把约束布局(ConstraintLayout)改为相对布局(RelativeLayout)
来源:互联网 发布:淘宝如何买到正品 编辑:程序博客网 时间:2024/06/14 14:21
前言:Android Studio升级到2.3之后新建Activity布局变成了约束(ConstraintLayout)布局,新手可能还不大会用,所以相对布局(RelativeLayout)的控件拖拽定位比较合适。
1.在Android Studio安装目录\plugins\android\lib\templates\activities\common\root\res\layout下,找到simple.xml.ftl文件,并打开
(默认安装的同学直接复制上面地址打开就可以啦)
C:\Program Files\Android\Android Studio\plugins\android\lib\templates\activities\common\root\res\layout
2.把下面代码复制替换掉原来的布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="${relativePackage}.${activityClass}"> <TextView android:text="@string/hello_world" android:layout_width="wrap_content" android:layout_height="wrap_content" /></RelativeLayout>
3.重启Android Studio,OK!
end、、、、、、
阅读全文
1 0
- Android Studio如何把约束布局(ConstraintLayout)改为相对布局(RelativeLayout)
- Android studio约束布局 ConstraintLayout
- Android ConstraintLayout 约束布局
- Android ConstraintLayout约束布局
- Android ConstraintLayout 约束布局
- Android约束布局ConstraintLayout
- Android ConstraintLayout 约束布局
- Android RelativeLayout(相对布局)
- Android-相对布局(RelativeLayout)
- android布局之相对布局(RelativeLayout)
- Android:控件布局(相对布局)RelativeLayout
- Android:控件布局(相对布局)RelativeLayout
- Android:控件布局(相对布局)RelativeLayout
- Android:控件布局(相对布局)RelativeLayout
- Android:控件布局(相对布局)RelativeLayout
- Android:控件布局(相对布局)RelativeLayout
- Android 相对布局:RelativeLayout
- android 相对布局RelativeLayout
- 排序模板
- Matlab R2017a 中文版破解安装图文教程(附)下载
- Java笔记之集合框架类
- latex图像注释位置
- 解决android
- Android Studio如何把约束布局(ConstraintLayout)改为相对布局(RelativeLayout)
- 【网络编程】说说Redis的服务端设计
- Fedora 26里面的dnf故障
- uurlib.riquest获取网页编码
- ubuntu 16.04 阿里云更新源
- ZooKeeper(2)配置伪分布模式
- Tomcat8.0最简单的详细配置
- 单链表
- 彻底理解ldpi、mdpi、hdpi、xhdpi、xxhdpi