buyishi

每次创建新的工程后,布局文件的的布局总是ConstraintLayout,如何更改?

进入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"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="Hello World" />
</LinearLayout>

保存更改,以后创建的新工程里的默认布局就是LinearLayout

分类:

技术点:

相关文章:

  • 2021-08-09
  • 2021-11-30
  • 2022-01-06
  • 2021-10-02
  • 2021-08-14
  • 2022-12-23
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
  • 2021-05-04
  • 2021-04-01
相关资源
相似解决方案