Advertisement

ExpandableListView使用方法及心得

阅读量:

本部分内容将简要说明系统控件ExpandableListView的基本应用,重点探讨了如何利用系统功能实现二级菜单列表的展示,并对相关指示效果进行了学习与理解。

效果1:

如下所示,对指示器的排列位置进行了调整,由原先位于列表左侧更改为当前处于列表右侧。此调整主要通过设置android:layoutDirection属性来实现排列方式的改变,从而达到预期的显示效果。

复制代码
     <ExpandableListView

    
     android:layoutDirection="rtl"
    
     android:id="@+id/expandListView"
    
     android:layout_width="match_parent"
    
     android:layout_height="match_parent">
    
     </ExpandableListView>
    
  
    
 // item_parent
    
 <?xml version="1.0" encoding="utf-8"?

全部评论 (0)

还没有任何评论哟~