Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 프로그래머스코테
- 백준구현문제
- 몽고DB
- HTML5
- css기초
- 백준알고리즘
- 포이마웹
- 알고리즘
- JS
- 백준
- dp알고리즘
- 백준골드
- 코테
- 익스프레스
- 백준nodejs
- 백준js
- 프로그래머스JS
- js코테
- HTML
- JS프로그래머스
- 안드로이드 스튜디오
- 리액트커뮤니티
- 리액트댓글기능
- 자바스크립트
- CSS
- 프로그래머스
- 리액트
- 백준구현
- 코딩테스트
- 다이나믹프로그래밍
Archives
- Today
- Total
개발새발 로그
안드로이드 스튜디오 고급위젯 간단하게 다루기 본문
오늘은 안드로이드 스튜디오에서 제공되는 고급 위젯을 간단하게 배워보겠습니다!
아날로그시계와 디지털시계
<?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"
tools:context=".MainActivity"
android:orientation="vertical">
<AnalogClock
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<DigitalClock
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"/>
</LinearLayout>
크로노미터(Chronometer)
- 타이머 형식의 위젯
- 일반적으로 시간을 측정할 때 많이 사용함
<?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"
tools:context=".MainActivity"
android:orientation="vertical">
<Chronometer
android:id="@+id/chronometer1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:format="시간 측정: %s"
android:gravity="center"
android:textSize="30dp"
/>
</LinearLayout>
타임 피커,캘린더뷰
- 타임 피커(TimePicker) : 시간을 표시, 조절
- 데이트 피커(DatePicker)와 캘린더뷰(CalendarView) : 날짜를 표시, 조절
<?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"
tools:context=".MainActivity"
android:orientation="vertical">
<TimePicker
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:timePickerMode="spinner"/>
<DatePicker
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:datePickerMode="spinner"/>
</LinearLayout>
728x90
반응형
LIST
'안드로이드' 카테고리의 다른 글
안드로이드 스튜디오-오류 (0) | 2022.05.20 |
---|---|
안드로이드 스튜디오 고급위젯 간단하게 다루기 - 날짜/시간 예약 앱 만들기 (0) | 2022.05.20 |
안드로이드 스튜디오-그리드 레이아웃으로 간이 계산기 만들기 (0) | 2022.05.17 |
안드로이드 스튜디오 레이아웃 익히기-프레임 레이아웃 (0) | 2022.05.17 |
안드로이드 스튜디오 레이아웃 익히기-그리드 레이아웃 (0) | 2022.05.15 |