Skip to content

Commit

Permalink
Update v1.6.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
AAkira committed Sep 12, 2016
1 parent 1c439dd commit 7b4ae8c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,29 @@ add `xmlns:app="http://schemas.android.com/apk/res-auto"`

You should use the ExpandableLinearLayout if child views may change a size.
For example, it gets and sets values from a server.
And you should use this in recycler view.

#### Code

```java

// resize expandable layout

ExpandableLinearLayout expandableLayout
= (ExpandableLinearLayout) findViewById(R.id.expandableLayout);

child.setText("Sets text from a server");
expandableLayout.initLayout(true); // Recalculate size of children
```
expandableLayout.initLayout(); // Recalculate size of children

The `initLayout()` is deprecated in v1.5.0.
The argument of `isMaintain` flag doesn't work.
I'll fix it in [v1.5.1](https://github.com/AAkira/ExpandableLayout/issues/66)
// recycler view
// you must set a ViewHolder#setIsRecyclable(false) and ExpandableLinearLayout#setInRecyclerView(true)

@Override
public void onBindViewHolder(final ViewHolder holder, final int position) {
holder.setIsRecyclable(false);
holder.expandableLinearLayout.setInRecyclerView(true);
}
```

### ExpandableWeightLayout

Expand Down Expand Up @@ -259,7 +268,7 @@ buildscript {
}
dependencies {
compile 'com.github.aakira:expandable-layout:1.5.1@aar'
compile 'com.github.aakira:expandable-layout:1.6.0@aar'
}
```

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ COMPILE_SDK_VERSION=23
BUILD_TOOLS_VERSION=22.0.1
MIN_SDK_VERSION=11
TARGET_SDK_VERSION=23
VERSION_CODE=10
VERSION_NAME=1.5.1
VERSION_CODE=11
VERSION_NAME=1.6.0
SUPPORT_TEST_VERSION=0.4.1
HAMCREST_VERSION=1.3
ESPRESSO_VERSION=2.2.1
Expand Down

0 comments on commit 7b4ae8c

Please sign in to comment.