홍드로이드의 야매코딩

#28 안드로이드 스튜디오 리니어 레이아웃 ( LinearLayout ) 예제 [ 홍드로이드 ] 본문

Android Java

#28 안드로이드 스튜디오 리니어 레이아웃 ( LinearLayout ) 예제 [ 홍드로이드 ]

홍드로이드 2020. 6. 26. 15:27




<activity_main.xml>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
<?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:orientation="vertical"
    android:background="#536DFE"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
 
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal">
 
 
                <ImageView
                    android:layout_width="60dp"
                    android:layout_height="60dp"
                    android:src="@mipmap/ic_launcher_round" />
 
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:textColor="#ffffff"
                    android:textSize="20sp"
                    android:textStyle="bold"
                    android:gravity="center"
                    android:text="홍드로이드"/>
 
 
                <ImageView
                    android:layout_width="60dp"
                    android:layout_height="60dp"
                    android:src="@mipmap/ic_launcher_round"/>
 
 
        </LinearLayout>
 
 
</LinearLayout>
 
cs




 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 



Comments