fand ich eine Lösung.
Put etwa wie folgt in Ihrer Layout-Datei
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
android:id="@+id/expandableLayout4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/expandableButton4"
android:background="#ffcc80"
android:padding="16dp"
app:ael_duration="400"
app:ael_expanded="false"
app:ael_interpolator="accelerate"
app:ael_orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:text="Things to put in the expandable layout" />
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
In der Build gradle Datei
dependencies {
compile 'com.github.aakira:expandable-layout:[email protected]'}
Die Art und Weise onClick Zuhörer einzustellen für die Erweiterung des Layouts
public void expandableButton1(View view) {
expandableLayout1 = (ExpandableRelativeLayout) findViewById(R.id.expandableLayout1);
expandableLayout1.toggle(); // toggle expand and collapse
}
Weitere detaillierte Beschreibung: http://www.codeisall.com/android-expandable-layout/