홍드로이드의 야매코딩

#30 안드로이드 스튜디오 랠러티브 레이아웃 (Relative Layout) 예제 [ 홍드로이드 ] 본문

Android Java

#30 안드로이드 스튜디오 랠러티브 레이아웃 (Relative Layout) 예제 [ 홍드로이드 ]

홍드로이드 2020. 6. 30. 16:26




<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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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">
 
 
    <TextView
        android:id="@+id/tv_1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="20sp"
        android:textColor="#3267FF"
        android:text="홍드로이드 덥다."/>
 
    <TextView
        android:id="@+id/tv_2"
        android:layout_centerInParent="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="칼퇴하고싶다"/>
 
 
    <TextView
        android:id="@+id/tv_3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/tv_2"
        android:layout_centerInParent="true"
        android:textSize="20sp"
        android:textColor="#3267FF"
        android:text="홍드로이드 덥다."/>
 
 
    <TextView
        android:id="@+id/tv_4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:textSize="20sp"
        android:textColor="#3267FF"
        android:text="홍드로이드 덥다."/>
 
 
    <TextView
        android:id="@+id/tv_5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:textSize="20sp"
        android:textColor="#3267FF"
        android:text="홍드로이드 덥다."/>
 
 
 
</RelativeLayout>
cs


Comments