안드로이드 개발 질문/답변
(글 수 45,052)
다음코드는 액티비티의 시작점인 onCreate메서드인데여, 이 메서드를 활용해서
외부레이아웃을 액티비티에 바인딩하고
사용된 위젯에 "Hello Android"출력하는 코드 좀 알려주세요. 기본 onCreate()함수는 다음과 같습니다.
@Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
//
}
<main.xml>
<?xml version=“1.0” encoding=“utf-8”?>
<LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”
android:orientation=“vertical”
android:layout_width=“fill_parent”
android:layout_height=“fill_parent”>
<TextView android:id="@+id/txtContent"
android:layout_width=“fill_parent”
android:layout_height=“wrap_content”
/>
</LinearLayout>