안드로이드 layout - 예제:계산기
내 공부/안드로이드

계산기 Layout - Linear Layout



---가장 큰 레이아웃--- android:layout_width="match_parent"

                            android:layout_height="match_parent" 를 기본으로 한다.

                            android:orientation="vertical

----TextView ---- android:layout_width="match_parent"

                       android:layout_height="wrap_content"

                       android:orientation="horizontal"

                       android:layout_weight="5"  

----BUTTON----- android:layout_width="match_parent"

                       android:layout_height="wrap_content"

                       android:orientation="horizontal"

                       android:layout_weight="1"        

// 각 horizontal라인마다 차지하는 비율을 말한다.

// 아래 sample에서는 textview의 LinearLayout weight은 4~5, Button 한 줄의 LinearLayout weight은 1로 한다.






'내 공부 > 안드로이드' 카테고리의 다른 글

Android Listener 개념 이해  (0) 2015.02.09
Android Application 타이틀바 제거  (0) 2015.02.09
Android Splash screen  (0) 2015.02.02
안드로이드 JAVA Listener 사용  (0) 2015.01.29
안드로이드 기본  (2) 2015.01.27