将Android Studio默认布局ConstraintLayout切换成LinearLayout
将Android Studio默认布局ConstraintLayout切换成LinearLayout
找到安装AS路径:
Android Studio\plugins\android\lib\templates\activities\common\root\res\layout
下面的simple.xml.ftl文件用记事本打开
上面显示为扁平化布局的默认代码,要将其修改为线性布局
将所有代码改成:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
/> </LinearLayout>
重开AS即可
将Android Studio默认布局ConstraintLayout切换成LinearLayout的更多相关文章
- 修改Android Studio默认的API Level(SDK版本)
原文:修改Android Studio默认的API Level(SDK版本) Android Studio(2.1.2)新建工程的时候只会让你选择最低支持的SDK版本,默认的目标编译SDK版本会以系统 ...
- 设置Android Studio工程布局文件的默认布局
每次创建新的工程后,布局文件的的布局总是ConstraintLayout,如何更改? 进入Android Studio安装目录,用文本编辑器打开文件plugins\android\lib\templa ...
- Android studio 基本布局-底部按钮
在使用Android studio 的时候,准备弄的基本的布局出来,底部按钮,按了中间会显示. 来上代码: 页面menu_main.xml 这里弄控件的浮动耗费了点我的时间.原因是因为对其各种问题, ...
- Android基础之布局ConstraintLayout
Google I/O 2016 上发布了 ConstraintLayout,据说很强大,那就一探究竟吧! gradle配置 compile 'com.android.support.constrain ...
- Android Studio 1.1.0 切换主题和绑定 代码提示 快捷键
这篇文章用于给刚从eclipse 转用 Android Studio 1.1.0的同学看的. 所以经常会更新的. 至于为什么要转Android Studio 1.1.0呢,就自己想吧.没有人强逼的. ...
- Android Studio 默认keystore 以及自定义keystore
我们使用Android Studio 运行或测试我们的app 它使用一个默认的debug.keystore进行签名. 这个默认签名(keystore)是不需要密码的,它的默认位置在 $HOME/.a ...
- Android Studio 默认 debug.keystore , apk打包,keystore.jks文件生成,根据keystore密钥获取SHA1安全码
参考资料: https://blog.csdn.net/nimasike/article/details/51457229 https://www.cnblogs.com/zhangqie/p/643 ...
- Android studio简单布局之view基本属性
本人属于自学上路,目前是在入门阶段,所以有些内容实质性比较少,请各位大佬多多包涵. 视图view的基本属性: layout_margin:定义视图与周围视图之间的空白距离 layout_padding ...
- Android Studio 默认的快捷键
参考资料: 1.http://stormzhang.com/devtools/2014/12/09/android-studio-tutorial3/ Action Mac OSX Win/Linux ...
随机推荐
- 跟踪 Ring3 - Ring0 的运行流程
理论知识 SYSENTER 指令是在 Inter Pentium(R) Ⅱ 处理器上作为"高速系统调用"功能的一部分被首次引用的. SYSENTER 指令进行过专门的优化,能够以最 ...
- linux下时间有关的函数和结构体
1.时间类型.Linux下常用的时间类型有6个:time_t,struct timeb, struct timeval,struct timespec,clock_t, struct tm. (1) ...
- auto_ptr,unique_ptr,shared_ptr,weak_ptr
http://mojijs.com/2016/08/218129/index.html http://www.cnblogs.com/lanxuezaipiao/p/4132096.html
- MySQL登陆小问题
root用户创建用户 CREATE USER gechong IDENTIFIED BY 'gechong'; 登录数据库时提示错误: C:\Users\gechong>mysql -u gec ...
- Java ReEntrantLock (Java代码实战-001)
Lock类也可以实现线程同步,而Lock获得锁需要执行lock方法,释放锁需要执行unLock方法 Lock类可以创建Condition对象,Condition对象用来使线程等待和唤醒线程,需要注意的 ...
- Java通过在主循环中判断Boolean来停止线程
Java代码: package Threads; /** * Created by Frank */ public class StopBoolean extends Thread { // 确保变化 ...
- V-rep学习笔记:Geometric Constraint Solver(几何约束求解)
The geometric constraint solver is slower and less precise at solving kinematic problems, but might ...
- isset、empty、var==null、is_null、var===null详细理解
//isset: 判断变量是否被初始化 //它并不会判断变量是否为空,并且可能用来判断数组中元素是否被定义 //听说在数组用isset与array_key_exists高出4倍 $a = " ...
- 【TP5.0】model的操作方法
tp5 中 model 的新增方法 //默认主键为自动识别,如果需要指定,可以设置属性: namespace app\index\model; use think\Model; class User ...
- Oracle的悲观锁和乐观锁
为了得到最大的性能,一般数据库都有并发机制,不过带来的问题就是数据访问的冲突.为了解决这个问题,大多数数据库用的方法就是数据的锁定. 数据的锁定分为两种方法,第一种叫做悲观锁,第二种叫做乐观锁.什么叫 ...