Hello to all,
I implemented A list expandable via the Object expandablelistview That and
the idea was to ADD A shot SIA group That the children of ALL group to
display an icon to allow the setting of THESE Components.
The two taken individually controls work PROPERLY, but if Active SIA
expandablelistview and SlidingPaneLayout, the event onTouch IS intercepted
solo From slidingPanel.
This XML house with expandable list
[XML]android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_home"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_home"
app:menu="@menu/activity_home_drawer"
android:background="@color/colorWhite"
app:itemIconTint="@color/colorAccent"
app:itemTextColor="@color/colorPrimary"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:paddingTop="60dp">
<ExpandableListView
android:id="@+id/expandableListViewHome"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:indicatorLeft="@null"
android:divider="@android:color/darker_gray"
android:dividerHeight="0.5dp"
android:clickable="true"
android:focusableInTouchMode="true"
android:focusable="true"
>
</ExpandableListView>
</LinearLayout>
</android.support.v4.widget.DrawerLayout>[/XML]
This is the layout that allows me to draw the expandable list group
[XML]<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1"
android:clickable="true"
android:background="@color/colorGroupList">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingRight="60dp"
android:layout_weight="1"
android:clickable="true"
android:focusableInTouchMode="true"
android:focusable="true">
<android.support.v4.widget.SlidingPaneLayout
android:id="@+id/slidingPanel"
android:layout_width="match_parent"
android:layout_height="60dp"
android:contextClickable="false">
<TextView
android:layout_width="60dp"
android:layout_height="60dp"
android:background="#CC0000FF"
android:text="Pane 2"
/>
<LinearLayout
android:id="@+id/llygrp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="16dp"
>
<TextView
android:id="@+id/iconWifi"
android:layout_width="28dp"
android:layout_height="25dp"
android:layout_gravity="center"
android:text="@string/icon_fa_wifi"
android:textSize="25dp"
android:textColor="@color/colorBlackBeninca"
/>
<TextView
android:id="@+id/listTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Wireless"
android:textSize="@dimen/txt_size"
android:paddingLeft="5dp"
android:layout_weight="1"
android:textColor="@color/colorBlackBeninca"
android:layout_marginRight="5dp"
android:layout_marginLeft="5dp"
/>
</LinearLayout>
</android.support.v4.widget.SlidingPaneLayout>
</LinearLayout>
<TextView
android:id="@+id/iconIndicator"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_gravity="center"
android:text="@string/icon_next"
android:textSize="25dp"
android:textColor="@color/colorBlackBeninca"
android:clickable="true"
/>
</LinearLayout>
</LinearLayout>[/XML]
As you can see I have added one SlidingPaneLayout that allows me to show a
texview for component setting. the click, however, is only collected from
slidingPanel, accordingly expandable list does not expand or collapse. I
have also attempted to reduce the slidingPanel width so as to be able to
click the elements below but do not get any results.
At a time when going to comment on the subject slidingPanel, everything
goes back to work.
Same behavior I get if I insert the slidingPanel in the children of the list
, the father can collapse and expand it, the children begin to ignore any
event Touch.
Do you have any idea? It needs some more information?
IN Network I found several examples with a listview + swipe, but none with a
expandiblelistview.
Thanks so much.
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/1b281080-a9ee-44e9-b7bb-b9438ec99fed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.