안드로이드 개발 질문/답변
(글 수 45,052)

몇 일전에 이 listview의 높이에 관한 질문을 올렸는데요,
xml 파일을 봐야 알 것 같다고 하셔서 추가하여 올립니다!
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="vertical"
/>
<ImageButton android:id="@+id/order"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/order_order_button"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>이것이 메인이 되는 부분의 xml파일이고,
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="60px" android:padding="5px">
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/img" android:layout_alignParentLeft="true" /> <LinearLayout android:id="@+id/layout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_toRightOf="@id/img" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/text" android:layout_toRightOf="@id/img" android:layout_marginLeft="5dip" android:layout_marginTop="5dip" android:ellipsize="marquee"
/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/text_2" android:layout_alignBaseline="@id/text" android:layout_marginLeft="5dip" android:singleLine="true" android:ellipsize="marquee" android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/plus" android:layout_alignParentRight="true" android:background="@drawable/common_plus_button" /> <EditText android:layout_width="wrap_content" android:layout_height="fill_parent" android:id="@+id/edit" android:text="EditText" android:layout_alignParentTop="true" android:layout_toLeftOf="@id/plus" android:inputType="number" /> <ImageButton android:id="@+id/minus" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@+id/edit" android:background="@drawable/common_minus_button" /> </RelativeLayout>
이것이 listview의 각 행에 들어가는 부분입니다!
답변 부탁드립니다 : )




<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"2.android:layout_width="fill_parent"3.android:layout_height="60px"4.android:padding="5px">를 보면 처음부터 높이를 60으로 고정을 하고 패딩을5를 주었으니 그러니 당연히 그 안에 들어가는 View들도 높이가 50을 넘지 못합니다... 50을 넘는 것은 잘리게 되겠죠..