开发者

Expandable ListView [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_StackOverflow中文版 Closed 11 years ago.

How we can create Expandable ListView with group icon on Right.have any one implement it...


<ExpandableListView android:id="@+id/Exlist"
    android:childDivider="#00000000" android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:groupIndicator="transparent Image"
    android:scrollbars="none" android:listSelector="#00000000"
     android:cacheColorHint="#00000000"
    android:layout_marginBottom="10dip" />

Above code "android:groupIndicator="transparent image"" becuase remove left side group indicator icon.

Now used below XML for Group Indicator file.

group.xml

  <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<RelativeLayout android:id="@+id/rlheaderName"
    android:layout_width="fill_parent" android:layout_height="wrap_content"
    android:background="@drawable/main_down">
    <TextView android:id="@+id/headerName"
        android:layout_marginLeft="5dip" android:layout_centerVertical="true"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:textColor="#6e6e6e" android:textStyle="bold"></TextView>
    <TextView android:id="@+id/headerCount"
        android:layout_marginLeft="10dip" android:layout_centerVertical="true"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:textColor="#6e6e6e" android:layout_toRightOf="@+id/headerName"></TextView>
</RelativeLayout>
  </LinearLayout>

Above file "android:background="@drawable/main_down"" main_down used as arrow in rightside.

so you problem solved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜