Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expandeble list view Always scroll to bottom issue

I created simple Application, I have Expandable List View which display the dictionary words.

This Expandable list view works almost properly but when I touch to any of the word, It scrolls to bottom. Any help will be appreciated.

This is my Xml File

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <RelativeLayout
        android:id="@+id/dicrellis"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true">

        <ExpandableListView
            android:id="@+id/expandable_list"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:cacheColorHint="#00000000"           
            android:transcriptMode="alwaysScroll"/>

    </RelativeLayout>

</RelativeLayout>

and this my java Code...

mExpandableList = (ExpandableListView)findViewById(R.id.expandable_list);
mExpandableList.setAdapter(new MyCustomAdapter(Dictionary.this,arrayParents));
mExpandableList.setOnItemClickListener(this);
like image 821
MukeshThakur Avatar asked Apr 19 '13 04:04

MukeshThakur


Video Answer


1 Answers

Try this solution.

  <ExpandableListView
  android:id="@+id/expandable_list"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:cacheColorHint="#00000000"           
  android:transcriptMode="normal"/>

Just replace android:transcriptMode="alwaysScroll" from this android:transcriptMode="normal"

like image 163
Alpan Avatar answered Nov 15 '22 04:11

Alpan