
지금 여기예요
4
165
액티비티 생명주기
스톱워치 레이아웃 코드 갱신하기
다음은 레이아웃
XML
코드입니다. 타이머를 표시하는 한 개의
텍스트 뷰와 스톱워치를 제어하는 세 개의 버튼이 있습니다. 현재
activity
_
stopwatch
.
xml
의
XML
코드를 다음처럼 바꿉니다.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp"
tools:context=".StopwatchActivity">
<TextView
android:id="@+id/time_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"