728x90
반응형
Android Kotlin 기초 - LinearLayout
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="horizontal"
android:weightSum="1"
android:gravity="center_horizontal">
<!-- android:gravity="center_horizontal" -->
<!-- android:gravity="center" -->
<!-- android:gravity="center_vertical" -->
<View
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#F44336" />
<View
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#FFEB3B" />
<View
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#3F51B5" />
</LinearLayout>
728x90
반응형