안드로이드 개발 질문/답변
(글 수 45,052)
위 저장 취소 버튼은 항상 떠있는데 무엇으로 구현하는지 궁금합니다.
특별한 위젯이 있는것 같기도 하고 엑티비티에 속해있는것 같기도 한데 아닌것 같네요.
레이아웃중에 있을것 같은데요..
답변 부탁드립니다.
2010.09.28 15:44:15
내용이 성의가 없어보여 간단하게 레이아웃 구성 해 봤습니다. android:layout_weight 속성으로 우선순위 조정 한 부분을 주의해서 보시면 될듯 합니다.
<?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">
<ScrollView android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_weight="2">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트1" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트2" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트3" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트4" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트5" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트6" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트7" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트8" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트9" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="텍스트10" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<Button android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="버튼1"
android:layout_weight="1" />
<Button android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="버튼2"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>



