Layout

Similar documents
2_안드로이드UI

50_1953.pdf

Microsoft PowerPoint - 4주차_Android_UI구현.ppt [호환 모드]

Microsoft PowerPoint - DoItAndroid_PART02_01_기본위젯과레이아웃_Rev.1.0 [호환 모드]

step 1-1

04-다시_고속철도61~80p

- 이 문서는 삼성전자의 기술 자산으로 승인자만이 사용할 수 있습니다 Part Picture Description 5. R emove the memory by pushing the fixed-tap out and Remove the WLAN Antenna. 6. INS

Dialog Box 실행파일을 Web에 포함시키는 방법

2009년 상반기 사업계획

슬라이드 제목 없음

975_983 특집-한규철, 정원호

00.1

Contents v 학습목표 뷰와레이아웃에대해이해하고, 레이아웃을활용, 관리하는여러가지기법들에대하여알아본다. v 내용 뷰 (View) 리니어레이아웃 (Linear Layout)

04_오픈지엘API.key

휠세미나3 ver0.4

11¹Ú´ö±Ô

Microsoft PowerPoint - ch03ysk2012.ppt [호환 모드]

Something that can be seen, touched or otherwise sensed

<B3EDB9AEC1FD5F3235C1FD2E687770>

PowerSHAPE 따라하기 Calculate 버튼을 클릭한다. Close 버튼을 눌러 미러 릴리프 페이지를 닫는다. D 화면을 보기 위하여 F 키를 누른다. - 모델이 다음과 같이 보이게 될 것이다. 열매 만들기 Shape Editor를 이용하여 열매를 만들어 보도록

ePapyrus PDF Document

Microsoft PowerPoint - 7-Work and Energy.ppt

Microsoft PowerPoint - 06-IPAddress [호환 모드]

H3050(aap)

歯kjmh2004v13n1.PDF

4 CD Construct Special Model VI 2 nd Order Model VI 2 Note: Hands-on 1, 2 RC 1 RLC mass-spring-damper 2 2 ζ ω n (rad/sec) 2 ( ζ < 1), 1 (ζ = 1), ( ) 1

( )부록

<3130C0E5>

- 2 -

Page 2 of 6 Here are the rules for conjugating Whether (or not) and If when using a Descriptive Verb. The only difference here from Action Verbs is wh

K7VT2_QIG_v3


Jwplayer 요즘 웹에서 동영상 재생을 목적으로 많이 쓰이는 jwplayer의 설치와 사용하기 입니다. jwplayer홈페이지 : 위의 홈페이지에 가시면 JWplayer를 다운 받으실 수 있습니다. 현재 5.1버전

Microsoft PowerPoint - 27.pptx

리니어레이아웃 - 2 -

<32B1B3BDC32E687770>

IKC43_06.hwp

0125_ 워크샵 발표자료_완성.key

thesis

2009년 국제법평론회 동계학술대회 일정

이장에서다룰내용 테두리를제어하는스타일시트 외부여백 (Margin) 과내부여백 (Padding) 관련속성 위치관련속성 2

#Ȳ¿ë¼®

LIDAR와 영상 Data Fusion에 의한 건물 자동추출

Solaris Express Developer Edition

슬라이드 1

13ÀåÃß°¡ºÐ

Page 2 of 5 아니다 means to not be, and is therefore the opposite of 이다. While English simply turns words like to be or to exist negative by adding not,

PowerPoint 프레젠테이션

3항사가 되기 위해 매일매일이 시험일인 듯 싶다. 방선객으로 와서 배에서 하루 남짓 지내며 지내며 답답함에 몸서리쳤던 내가 이제는 8개월간의 승선기간도 8시간같이 느낄 수 있을 만큼 항해사로써 체질마저 변해가는 듯해 신기하기도 하고 한편으론 내가 생각했던 목표를 향해

Hi-MO 애프터케어 시스템 편 5. 오비맥주 카스 카스 후레쉬 테이블 맥주는 천연식품이다 편 처음 스타일 그대로, 부탁 케어~ Hi-MO 애프터케어 시스템 지속적인 모발 관리로 끝까지 스타일이 유지되도록 독보적이다! 근데 그거 아세요? 맥주도 인공첨가물이


May 2014 BROWN Education Webzine vol.3 감사합니다. 그리고 고맙습니다. 목차 From Editor 당신에게 소중한 사람은 누구인가요? Guidance 우리 아이 좋은 점 칭찬하기 고맙다고 말해주세요 Homeschool [TIP] Famil

Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer

본문01

03장

Journal of Educational Innovation Research 2018, Vol. 28, No. 3, pp DOI: NCS : * A Study on

사용시 기본적인 주의사항 경고 : 전기 기구를 사용할 때는 다음의 기본적인 주의 사항을 반드시 유의하여야 합니다..제품을 사용하기 전에 반드시 사용법을 정독하십시오. 2.물과 가까운 곳, 욕실이나 부엌 그리고 수영장 같은 곳에서 제품을 사용하지 마십시오. 3.이 제품은

지능정보연구제 16 권제 1 호 2010 년 3 월 (pp.71~92),.,.,., Support Vector Machines,,., KOSPI200.,. * 지능정보연구제 16 권제 1 호 2010 년 3 월


11¹ÚÇý·É

CD-RW_Advanced.PDF

Product A4

<32382DC3BBB0A2C0E5BED6C0DA2E687770>

Vertical Probe Card Technology Pin Technology 1) Probe Pin Testable Pitch:03 (Matrix) Minimum Pin Length:2.67 High Speed Test Application:Test Socket

저작자표시 - 비영리 - 변경금지 2.0 대한민국 이용자는아래의조건을따르는경우에한하여자유롭게 이저작물을복제, 배포, 전송, 전시, 공연및방송할수있습니다. 다음과같은조건을따라야합니다 : 저작자표시. 귀하는원저작자를표시하여야합니다. 비영리. 귀하는이저작물을영리목적으로이용할

PowerPoint Presentation

歯1.PDF

<C1DF3320BCF6BEF7B0E8C8B9BCAD2E687770>

DocsPin_Korean.pages

예제 1.1 ( 관계연산자 ) >> A=1:9, B=9-A A = B = >> tf = A>4 % 4 보다큰 A 의원소들을찾을경우 tf = >> tf = (A==B) % A

목차 제 1 장 inexio Touch Driver소개 소개 및 주요 기능 제품사양... 4 제 2 장 설치 및 실행 설치 시 주의사항 설치 권고 사양 프로그램 설치 하드웨

장양수

Columns 8 through while expression {commands} 예제 1.2 (While 반복문의이용 ) >> num=0


슬라이드 1

Let G = (V, E) be a connected, undirected graph with a real-valued weight function w defined on E. Let A be a set of E, possibly empty, that is includ

원고스타일 정의

WIDIN - Toolholding Catalogue.pdf

Orcad Capture 9.x

Week3

DBPIA-NURIMEDIA

Going Home - Korean

chap 5: Trees

¹Ìµå¹Ì3Â÷Àμâ

퇴좈저널36호-4차-T.ps, page Preflight (2)

[ 영어영문학 ] 제 55 권 4 호 (2010) ( ) ( ) ( ) 1) Kyuchul Yoon, Ji-Yeon Oh & Sang-Cheol Ahn. Teaching English prosody through English poems with clon

2011년 10월 초판 c 2011 Sony Corporation. All rights reserved. 서면 허가 없이 전체 또는 일부를 복제하는 것을 금합니다. 기능 및 규격은 통보 없이 변경될 수 있습니다. Sony와 Sony 로고는 Sony의 상표입니다. G L

Grouping Selectors To minimize the code, you can group selectors.

슬라이드 제목 없음

(JBE Vol. 21, No. 1, January 2016) (Regular Paper) 21 1, (JBE Vol. 21, No. 1, January 2016) ISSN 228

INDUCTION MOTOR 표지.gul

목차 BUG 문법에맞지않는질의문수행시, 에러메시지에질의문의일부만보여주는문제를수정합니다... 3 BUG ROUND, TRUNC 함수에서 DATE 포맷 IW 를추가지원합니다... 5 BUG ROLLUP/CUBE 절을포함하는질의는 SUBQUE

17-221~235설계01철도사장교1.ps

Buy one get one with discount promotional strategy

전용]

MS-SQL SERVER 대비 기능

300 구보학보 12집. 1),,.,,, TV,,.,,,,,,..,...,....,... (recall). 2) 1) 양웅, 김충현, 김태원, 광고표현 수사법에 따른 이해와 선호 효과: 브랜드 인지도와 의미고정의 영향을 중심으로, 광고학연구 18권 2호, 2007 여름

DBPIA-NURIMEDIA

VOL /2 Technical SmartPlant Materials - Document Management SmartPlant Materials에서 기본적인 Document를 관리하고자 할 때 필요한 세팅, 파일 업로드 방법 그리고 Path Type인 Ph

안드로이드기본 11 차시어댑터뷰 1 학습목표 어댑터뷰가무엇인지알수있다. 리스트뷰와스피너를사용하여데이터를출력할수있다. 2 확인해볼까? 3 어댑터뷰 1) 학습하기 어댑터뷰 - 1 -

Transcription:

Layout Bok, Jong Soon Jongsoon.bok@gmail.com www.javaexpert.co.kr

Layout ViewGroup Is a special view Can contain other views (called children.) Is the base class for layouts and views containers. Also defines the ViewGroup.LayoutParams class Serves as the base class for layouts parameters.

Layout (Cont.)

Layout (Cont.) ViewGroup.LayoutParams android:layout_width android:layout_height Constant Value Description fill_parent -1 The view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by match_parent. match_parent -1 wrap_content -2 The view should be as big as its parent (minus padding). Introduced in API Level 8. The view should be only big enough to enclose its content (plus padding).

Layout (Cont.) View 의계층구조 ViewGroup ViewGroup View View View View View

Layout (Cont.) Layout 종류 클래스 LinearLayout 개요 수평방향또는수직방향에자식뷰를배치. 자식뷰가화면에포함될수없는경우에는스크롤바가표시 AbsoluteLayout 픽셀단위로자식뷰의위치를절대좌표로지정 RelativeLayout 자식뷰간의상대관계나부모뷰간의관계로뷰를배치 FrameLayout TableLayout 왼쪽상단을기준으로뷰를배치하는가장기본적인레이아웃 테이블형식으로뷰를배치함. 보통내부에테이블행레이아웃을지정

Layout (Cont.) ViewGroup 의공통속성 Attribute android:layout_height Description Specifies the basic height of the view. android:layout_margin Specifies extra space on the left, top, right and bottom sides of this view. android:layout_marginbottom Specifies extra space on the bottom side of this view. android:layout_marginleft android:layout_marginright android:layout_margintop android:layout_width Specifies extra space on the left side of this view. Specifies extra space on the right side of this view. Specifies extra space on the top side of this view. Specifies the basic width of the view.

Layout (Cont.) Padding Is defined as space between the edges of the view and the view's content. A views size will include it's padding. If a background is provided, the padding will initially be set to that (0 if the drawable does not have padding). Explicitly setting a padding value will override the corresponding padding found in the background.

Layout (Cont.) Padding Attribute Value Description android:padding 0x010100d5 Sets the padding, in pixels, of all four edges. android:paddingbottom 0x010100d9 Sets the padding, in pixels, of the bottom edge. android:paddingleft 0x010100d6 Sets the padding, in pixels, of the left edge. android:paddingright 0x010100d8 Sets the padding, in pixels, of the right edge. android:paddingtop 0x010100d7 Sets the padding, in pixels, of the top edge.

LinearLayout Arranges its children in a single column or a single row. The direction of the row can be set by calling setorientation().

LinearLayout (Cont.) You can also specify gravity. Specifies the alignment of all the child elements by calling setgravity() Specify that specific children grow to fill up any remaining space in the layout by setting the weight member of LinearLayout.LayoutParams. The default orientation is horizontal.

LinearLayout (Cont.) android:orientation Should the layout be a column or a row? Use "horizontal" for a row, "vertical" for a column. The default is horizontal. Constant Value Description horizontal 0 Defines an horizontal widget. vertical 1 Defines a vertical widget.

LinearLayout (Cont.) android:weight Indicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LinearLayout.LayoutParams. Specify 0 if the view should not be stretched. Otherwise the extra pixels will be pro-rated among all views whose weight is greater than 0.

LinearLayout (Cont.) android:gravity Standard gravity constant that a child can supply to its parent. Defines how to place the view, both its x- and y- axis, within its parent view group. Constant Value Description top 0x30 Push object to the top of its container, not changing its size. bottom 0x50 Push object to the bottom of its container, not changing its size. left 0x03 Push object to the left of its container, not changing its size. right 0x05 Push object to the right of its container, not changing its size.

LinearLayout (Cont.) android:gravity Constant Value Description center_vertical 0x10 Place object in the vertical center of its container, not changing its size. fill_vertical 0x70 Grow the vertical size of the object if needed so it completely fills its container. center_horizontal 0x01 Place object in the horizontal center of its container, not changing its size. fill_horizontal 0x07 Grow the horizontal size of the object if needed so it completely fills its container.

LinearLayout (Cont.) android:gravity Constant Value Description center 0x11 Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. fill 0x77 Grow the horizontal and vertical size of the object if needed so it completely fills its container. start 0x00800003 Push object to the beginning of its container, not changing its size. end 0x00800005 Push object to the end of its container, not changing its size.

Lab1:LinearLayout

Lab2:LinearLayout

Lab3:LinearLayout

Lab4:LinearLayout 장용식 김관옥 성낙현공저, Step by Step 안드로이드앱개발 ( 서울 :INFINITY BOOKS, 2011), pp.174-183.

Lab5:LinearLayout 장용식 김관옥 성낙현공저, Step by Step 안드로이드앱개발 ( 서울 :INFINITY BOOKS, 2011), pp.184-195.

Lab6:LinearLayout 유동근 박정민공저, 200 개예제로배우는 Android API 핵심원리안드로이드 API 바이블 ( 서울 : 정보문화사, 2010), p.606.

FrameLayout Is designed to block out an area on the screen to display a single item. Should be used to hold a single child view. Child View 들을겹쳐서그리고자할때사용 탭형태로화면여러개를겹쳐놓고실행중에화면스위치가가능하다.

FrameLayout (Cont.) Can add multiple children. Can control their position by assigning gravity to each child, using the android:layout_gravity attribute. Child views are drawn in a stack, with the most recently added child on top. The size is the size of its largest child (plus padding), visible or not (if the FrameLayout's parent permits).

FrameLayout (Cont.) android:foreground Defines the drawable to draw over the content. This can be used as an overlay. Resource ID로설정 Child View 보다위에이미자가그려짐 속성값은 drawable-hdpi 폴더에있는이미지의 ID 값

FrameLayout (Cont.) android:foregroundgravity Defines the gravity to apply to the foreground drawable. The gravity defaults to fill. Must be one or more (separated by ' ') of the following constant values. Constant Value Description top 0x30 Push object to the top of its container, not changing its size. bottom 0x50 Push object to the bottom of its container, not changing its size. left 0x03 Push object to the left of its container, not changing its size. right 0x05 Push object to the right of its container, not changing its size.

FrameLayout (Cont.) android:foregroundgravity Constant Value Description center_vertical 0x10 Place object in the vertical center of its container, not changing its size. center_horizontal 0x01 Place object in the horizontal center of its container, not changing its size. fill_vertical 0x70 Grow the vertical size of the object if needed so it completely fills its container. fill_horizontal 0x07 Grow the horizontal size of the object if needed so it completely fills its container. center 0x11 Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. fill 0x77 Grow the horizontal and vertical size of the object if needed so it completely fills its container.

Lab7:FrameLayout 손수국 조승호공저, 안드로이드프로그래밍의이해와실제 ( 경기 : 생능출판사, 2010), pp.173-174.

AbsoluteLayout Lets you specify exact locations (x/y coordinates) of its children. Is less flexible and harder to maintain than other types of layouts without absolute positioning.

Lab8:AbsoluteLayout 손수국 조승호공저, 안드로이드프로그래밍의이해와실제 ( 경기 : 생능출판사, 2010), p.165.

RelativeLayout Displays child View elements in relative positions. The position of a View can be specified as relative to sibling elements or in positions relative to the RelativeLayout area.

RelativeLayout (Cont.) A RelativeLayout is a very powerful utility for designing a user interface. If you find yourself using several nested LinearLayout groups, you may be able to replace them with a single RelativeLayout.

RelativeLayout (Cont.) Property Description layout_above Positions the bottom edge of this view above the given anchor view ID. layout_alignbaseline Positions the baseline of this view on the baseline of the given anchor view ID. layout_alignbottom Makes the bottom edge of this view match the bottom edge of the given anchor view ID. layout_alignleft Makes the left edge of this view match the left edge of the given anchor view ID. layout_alignparentbottom If true, makes the bottom edge of this view match the bottom edge of the parent. layout_alignparentleft If true, makes the left edge of this view match the left edge of the parent.

RelativeLayout (Cont.) Property layout_alignparentright layout_alignparenttop layout_alignright layout_aligntop layout_alignwithparentifm issing layout_below Description If true, makes the right edge of this view match the right edge of the parent. If true, makes the top edge of this view match the top edge of the parent. Makes the right edge of this view match the right edge of the given anchor view ID. Makes the top edge of this view match the top edge of the given anchor view ID. If set to true, the parent will be used as the anchor when the anchor cannot be be found for layout_toleftof, layout_torightof, etc. Positions the top edge of this view below the given anchor view ID.

RelativeLayout (Cont.) Property layout_centerhorizonta l layout_centerinparent layout_centervertical layout_toleftof layout_torightof Description If true, centers this child horizontally within its parent. If true, centers this child horizontally and vertically within its parent. If true, centers this child vertically within its parent. Positions the right edge of this view to the left of the given anchor view ID. Positions the left edge of this view to the right of the given anchor view ID.

Lab9:RelativeLayout 진성주 최종열 백정현 신중훈공저, 제대로된안드로이드앱개발을위한안드로이드프로그래밍 ( 경기 : 북스홀릭, 2011), p.107.

Lab10:RelativeLayout

TableLayout Arranges its children into rows and columns. Consists of a number of TableRow objects, each defining a row. TableRow 클래스는수평방향의선형레이아웃에해당되며, 이러한 TableRow 들이수직방향으로나열된것이 TableLayout 이다. Containers do not display border lines for their rows, columns, or cells.

TableLayout 기본적으로 TableRow 객체를만들어서사용 열이개수는안드로이드가자동으로결정 Each row has zero or more cells. Each cell can hold one View object. 가장많은셀이있는행을기준으로열의개수를결정 A table can leave cells empty. Cells can span columns, as they can in HTML.

TableLayout (Cont.) The width of a column is defined by the row with the widest cell in that column. The children of this cannot specify the layout_width attribute. Width is always MATCH_PARENT. The layout_height attribute can be defined by a child. The layout_height s default value is WRAP_CONTENT. If the child is a TableRow, then the height is always WRAP_CONTENT.

TableLayout (Cont.) Cells must be added to a row in increasing column order, both in code and XML. Column numbers are zero-based. If you don't specify a column number for a child cell, it will autoincrement to the next available column. If you skip a column number, it will be considered an empty cell in that row.

TableLayout (Cont.) 속성값의미 collapsecolumns 0 부터시작하는열의번호를쉼표로구분 shrinkcolumns stretchcolumns 0 부터시작하는열의번호를쉼표로구분 0 부터시작하는열의번호를쉼표로구분 열들을숨김 텍스트가길때는접어서표시 열의폭을넓힘 layout_column 0 부터시작뷰가표시될열번호 layout_span 양수 뷰가차지할열들의 개수

Lab11 진성주 최종열 백정현 신중훈공저, 제대로된안드로이드앱개발을위한안드로이드프로그래밍 ( 경기 : 북스홀릭, 2011), p.109.

Lab12

Lab13 한동호, 단계별예제로배우는안드로이드프로그래밍 ( 경기 : 제이펍, 2011), p.98.

Lab14

Lab15 유동근 박정민공저, 200 개예제로배우는 Android API 핵심원리안드로이드 API 바이블 ( 서울 : 정보문화사, 2010), p.648.

Lab16 유동근 박정민공저, 200 개예제로배우는 Android API 핵심원리안드로이드 API 바이블 ( 서울 : 정보문화사, 2010), p.636.

Lab17 유동근 박정민공저, 200 개예제로배우는 Android API 핵심원리안드로이드 API 바이블 ( 서울 : 정보문화사, 2010), p.638.

Lab18 유동근 박정민공저, 200 개예제로배우는 Android API 핵심원리안드로이드 API 바이블 ( 서울 : 정보문화사, 2010), p.640.

TabLayout (TabHost) Container for a tabbed window view. Holds two children A set of tab labels that the user clicks to select a specific tab. A FrameLayout object that displays the contents of that page.

TabLayout (Cont.) To create a tabbed UI, you need to use a TabHost and a TabWidget. The TabHost must be the root node for the layout Contains both the TabWidget for displaying the tabs A FrameLayout for displaying the tab content.

Lab19

Lab20 진성주 최종열 백정현 신중훈공저, 제대로된안드로이드앱개발을위한안드로이드프로그래밍 ( 경기 : 북스홀릭, 2011), p.114.

Lab21