Skip to content

Commit a5b2f05

Browse files
committed
- Make expand() collapse() methods public.
1 parent f7177a2 commit a5b2f05

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/src/main/java/iammert/com/expandablelayout/MainActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public void onCollapsed(int parentIndex, FruitCategory parent, View view) {
4848

4949
}
5050
});
51-
5251
}
5352

5453
public Section<FruitCategory, Fruit> getSection() {

expandablelib/src/main/java/iammert/com/expandablelib/ExpandableLayout.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public void onClick(View view) {
187187
addView(sectionLayout);
188188
}
189189

190-
private <P> void expand(@NonNull P parent) {
190+
public <P> void expand(@NonNull P parent) {
191191
for (int i = 0; i < sections.size(); i++) {
192192
if (parent.equals(sections.get(i).parent)) {
193193
ViewGroup sectionView = ((ViewGroup) getChildAt(i));
@@ -201,7 +201,7 @@ private <P> void expand(@NonNull P parent) {
201201
}
202202
}
203203

204-
private <P> void collapse(@NonNull P parent) {
204+
public <P> void collapse(@NonNull P parent) {
205205
for (int i = 0; i < sections.size(); i++) {
206206
if (parent.equals(sections.get(i).parent)) {
207207
ViewGroup sectionView = ((ViewGroup) getChildAt(i));

0 commit comments

Comments
 (0)