본문 바로가기

IT/Android

안드로이드 리스트뷰오른쪽에 빨리 이동할수있는 텀브넣기

xml 에서 ListView를 생성하고 아래 노란부분을 설정 해 주면 됩니다.

 

<?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">
    <ListView
        android:id="@id/android:list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:fastScrollEnabled="true" />
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        style="@android:style/ButtonBar">
        <Button
            android:id="@+id/browse_button_home"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/browse_home"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_weight="1"
            android:drawableLeft="@drawable/ic_menu_home" />
        <Button
            android:id="@+id/browse_button_close"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/browse_close"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_weight="1"
            android:drawableLeft="@drawable/ic_menu_close_clear_cancel" />
    </LinearLayout>
</LinearLayout>