I have a question about creating an Android studio project.

Asked 2 years ago, Updated 2 years ago, 28 views

What changed while updating the Android studio is Previously, when you create a project, the default layout was automatically set to a relatively layout, but when you update it,

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"    
    xmlns:tools="http://schemas.android.com/tools"    
    android:layout_width="match_parent"    
    android:layout_height="match_parent"   
    tools:context="com.example.map_test.MainActivity">

It changed to Constraint Layout I want to change this part like before, is it possible? Instead of creating a project and fixing the code, I want to change the layout that is set when creating the project in the first place.

android

2022-09-22 20:28

1 Answers

With Android Studio updated to 2.3, Constraint Layout became the default view group for layout design. We recommend using ConstraintLayout when creating (complex) layouts to improve performance, as shown below. (https://developer.android.com/studio/write/layout-editor.html)

To improve layout performance, you must convert the previous layout to ConstraintLayout. Android Studio has a built-in converter to help you:

I couldn't find any changes to the setting of the Android studio itself, but please note that the Root element can be set when creating the layout file as shown below.


2022-09-22 20:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.