과제를 내주신 우여飛님의 게시글 주소는
http://blog.naver.com/urchoco/100150581102
이렇게 출력하라는 과제가 주어졌는데요,
저는 총 6명의 인원정보를 출력하지 않고, 저의 자기소개에 대한 3줄을 만들었습니다.
그리고 빨, 초, 파 가 아닌 보, 주, 핑 으로 하였습니다.
소스 풀이
Main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
>
<TextView
android:text="@string/member1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
<TextView
android:text="@string/member2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
<TextView
android:text="@string/member3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
>
<TextView
android:text="@string/color1"
android:gravity="center_horizontal"
android:background="#8000FF"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
<TextView
android:text="@string/color2"
android:gravity="center_horizontal"
android:background="#FF8000"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
<TextView
android:text="@string/color3"
android:gravity="center_horizontal"
android:background="#FF00FF"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
</LinearLayout>
</LinearLayout>
String.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">youpd Project03</string>
<string name="menu_settings">Settings</string>
<string name="member1">유피디</string>
<string name="member2">광주광역시</string>
<string name="member3">네이트온 taeminimini@nate.com</string>
<string name="color1">보라색</string>
<string name="color2">주황색</string>
<string name="color3">핑크색</string>
</resources>
---------------------------------------------------------------------------------------
결과창
p.s 교훈을 느낀것이 있다-ㅅ-..
항상 > 또는 />를 해줘야 한다는것... 이거때매 엄청 고생했다;;
아무것도 모른채 왜 오류가 뜨냐고 막 성질낸....
- 혹시 실행을 해보실 분들을 위해 APK 와 어려워하시는 분들을 위해 프로젝트 파일을 올립니다. -
단, 프로젝트 파일을 함으로써 보면서 배우는것보다 배우는 속도가 느려질 수 있습니다.
다운로딩딩
'Android' 카테고리의 다른 글
안드로이드(Android) 프로젝트 네임설정 (0) | 2013.09.02 |
---|---|
안드로이드 에뮬레이터 명령어 (0) | 2013.09.02 |
우여飛의 안드로이드 어플 개발 강좌 #4 - 문제풀이 (1) | 2012.11.29 |
[i티거님강좌] 006: TextView, Button, ImageView, EditText (0) | 2012.11.29 |
유 피디의 안드로이드 개발일지 (0) | 2012.11.29 |