expandablelistview - Android extendablelistveiw child element in foreground -


i'm not sure extendable list best solution thing came mind.

here problem:

i want create list , when click on element 1 (or maybe there'll multiple) element'll appear , push down other elements below it. how extendable list works, here comes problem want child element in front of group elements , have no idea how it. here picture maybe can understand better: enter image description here

as gavriel requested:

main:

<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:fitssystemwindows="true"     tools:context="com.example.lalala.listview.mainactivity">      <expandablelistview         android:id="@+id/extd_list"         android:layout_height="match_parent"         android:layout_width="match_parent"/>  </android.support.design.widget.coordinatorlayout> 

group:

<?xml version="1.0" encoding="utf-8"?> <android.support.percent.percentrelativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:orientation="horizontal"     android:padding="8dp"     android:background="#000000">       <textview         android:id="@+id/left_text"         android:layout_width="0dp"         android:layout_height="wrap_content"         app:layout_widthpercent="75%"         android:textsize="17dp"         android:textcolor="#f9f93d" />       <textview         android:id="@+id/right_text"         android:layout_width="0dp"         android:layout_height="wrap_content"         app:layout_widthpercent="25%"         android:layout_torightof="@+id/left_text"         android:textsize="17dp"         android:textcolor="#f9f93d" />   </android.support.percent.percentrelativelayout> 

expanded child:

<?xml version="1.0" encoding="utf-8"?> <android.support.percent.percentrelativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="55dip"     android:orientation="vertical" >       <textview         android:id="@+id/extended_item"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:textsize="17dip"         android:paddingtop="20dp"         android:paddingbottom="20dp" />  </android.support.percent.percentrelativelayout> 

what did in similar situation copy expandablelistview's layout xml project, , modify according needs, , create myexpandablelistview extends expandablelistview uses version of layout , doesn't change else. hope helps.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -