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>

相关推荐

  1. 修改添加数据界面的布局

    2023-12-30 06:10:02       27 阅读
  2. 【Qt-布局

    2023-12-30 06:10:02       59 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-30 06:10:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-30 06:10:02       106 阅读
  3. 在Django里面运行非项目文件

    2023-12-30 06:10:02       87 阅读
  4. Python语言-面向对象

    2023-12-30 06:10:02       96 阅读

热门阅读

  1. Leetcode.2735 收集巧克力

    2023-12-30 06:10:02       82 阅读
  2. 第7章 1 异常处理

    2023-12-30 06:10:02       57 阅读
  3. Dubbo相关面试题及答案

    2023-12-30 06:10:02       51 阅读
  4. 第一章 施工组织与目标控制

    2023-12-30 06:10:02       42 阅读
  5. Oracle T4-4小型机上配置Ldom部署rac

    2023-12-30 06:10:02       50 阅读
  6. 通过数字证书对PDF电子文件进行数字签名/盖章

    2023-12-30 06:10:02       54 阅读
  7. PDF模板填充,基于IText5

    2023-12-30 06:10:02       51 阅读