리니어 레이아웃으로리스트의 아이템을 만들었는데요
아래와 같은 소스입니다.
전체를 Relative로 감싸면 레이아웃 맨 아래에 밑줄을 쫙 그어서 divider 역할을 할 수 있었는데요
Linear 레이아웃으로 감싸면서.. 맨밑에 line 이미지 뷰를 못넣게 됐어요..
방법좀 알려주세요 리니어로 꾸미는데 맨밑에 라인까지 넣기!
<?xml version="1.0" encoding="utf-8"?>
android:layout_width="match_parent"
android:layout_height="@dimen/dimen_talkerList_hight"
android:clickable="true"
android:orientation="horizontal"
android:divider="@drawable/list_line" >
<ImageView
android:id="@+id/is_online"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:layout_marginLeft="@dimen/dimen_talkerList_padding_hor" />
<LinearLayout
android:id="@+id/user_info"
android:layout_width="@dimen/dimen_talkerList_talker_name_width"
android:layout_height="@dimen/dimen_talkerList_hight"
android:gravity="center_vertical"
android:orientation="vertical" >
<TextView
android:id="@+id/talker_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/talker_name"
android:textColor="@color/color_000174239"
android:textSize="@dimen/font_size_40pt" />
<TextView
android:id="@+id/state"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:text="@string/state_disconnected"
android:textColor="#666666"
android:textSize="@dimen/font_size_21pt" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_marginRight="@dimen/dimen_buttons_padding_hor" >
<ImageView
android:id="@+id/message_button"
android:layout_width="@dimen/dimen_msg_button_width_size"
android:layout_height="@dimen/dimen_call_msg_button_size"
android:layout_alignParentRight="true"
android:background="@drawable/btn_message" />
<ImageView
android:id="@+id/call_button"
android:layout_width="@dimen/dimen_call_msg_button_size"
android:layout_height="@dimen/dimen_call_msg_button_size"
android:layout_marginRight="@dimen/dimen_buttons_padding_hor"
android:layout_toLeftOf="@id/message_button"
android:background="@drawable/btn_call" />
<Button
android:id="@+id/whisper_button"
android:layout_width="@dimen/dimen_whisper_button_width"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/selector_whisper_button_bg"
android:minHeight="@dimen/dimen_button_height"
android:text="@string/whisper"
android:textColor="@color/color_255255255"
android:textSize="@dimen/font_size_35pt" />
</RelativeLayout>
<ImageView
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="@drawable/list_line" />
</LinearLayout>
구성입니다.