Android Studio修改创建新布局时默认根布局

将Android Studio默认布局ConstraintLayout切换成LinearLayout

打开设置, Editor> File and Code Templates > Other > layoutResourceFile.xml

备注:创建时提示根布局仍然为ConstraintLayout,不用管这个,实际创建的是根据模板来的

示例模板

复制代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">
    
    <
    
</LinearLayout>
相关推荐
nono牛3 分钟前
深入理解gatekeeperd 与 android.hardware.gatekeeper@1.0-service调用规则
android
lxysbly6 分钟前
红白机模拟器安卓版带金手指
android
·云扬·15 分钟前
【实操教程】Excel文件转CSV并导入MySQL的完整步骤
android·mysql·excel
触想工业平板电脑一体机17 分钟前
【触想智能】工业触控一体机在船舶海运设备上应用的特点和具体场景分析
android·网络·计算机外设·电脑·智能电视
Change_JW20 分钟前
reserved mem addr & size
android
汤面不加鱼丸22 分钟前
android实践:生成.9.png图片
android
叶羽西29 分钟前
下载Android源代码
android
nono牛35 分钟前
android.hardware.gatekeeper@1.0-service 与 gatekeeperd 区别
android
hui函数9 小时前
如何解决 PyCharm 控制台 pip install 报错 UnicodeDecodeError/GBK 路径编码问题
ide·pycharm·pip
&岁月不待人&10 小时前
⏺ Android 录屏缩放异常排查:Pixel 3 XL 上的完美风暴
android