Android - 扩展面板包含创建流程,并允许对元素进行轻量级编辑。
扩展面板包含创建流程,并允许轻量级地编辑元素。
您可以使用 app:expansion_expanded="false" 来修改标签的默认展开状态。可以通过 .toggle() 以编程方式切换布局。使用 .setEnable(true/false) 来启用/禁用展开。# 监听器 只需将监听器添加到 ExpansionLayout (不是标题!) 即可跟踪展开布局的状态。```java
ExpansionLayout expansionLayout = findViewById(...);
expansionLayout.addListener(new ExpansionLayout.Listener() {
@Override
public void onExpansionChanged(ExpansionLayout expansionLayout, boolean expanded) {
}
});
# 只打开一个 可以设置多个展开布局,以在任何时刻只打开 1 个。
final ExpansionLayoutCollection expansionLayoutCollection = new ExpansionLayoutCollection();
expansionLayoutCollection.add(ex1);
expansionLayoutCollection.add(ex2);
expansionLayoutCollection.openOnlyOne(true);
<com.GitHub.florent37.expansionpanel.viewgroup.ExpansionsViewGroupLinearLayout> android:layout_width="match_parent" android:layou
[ ](https://bintray.com/florent37/maven/expansionpanel/_latestVersion)暂无开放 Issues,或尚未同步最近议题。