Android/그림으로 쉽게 설명하는 안드로이드 프로그래밍 개정6판
그림으로 쉽게 설명하는 안드로이드 프로그래밍(개정6판) 연습문제 4장
starfish22
2022. 9. 15. 23:14
728x90
정답이 아닐 수 있습니다. 오류가 있으면 알려주세요ㅎ
1. 2번 ViewGroup
2. 1번 LinearLayout
3. 3번 FrameLayout
4. 2번 ContraintLayout
5. 3번 orientation
6. 뷰를 꽉 채운다.
7.
activity_main.xml
<?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"
android:orientation="vertical"
android:background="#6600CC"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="480dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="3"
android:background="#33CC33"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="4"
android:background="#990099">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:orientation="vertical"
android:background="#3366CC"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:orientation="vertical"
android:background="#FFCC00"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
결과
8. Pass,,,
728x90