Skip to content

Commit 532c9f2

Browse files
committed
- minSdk update to 14.
1 parent 345a3e8 commit 532c9f2

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ android {
55
buildToolsVersion "26.0.0"
66
defaultConfig {
77
applicationId "iammert.com.expandablelayout"
8-
minSdkVersion 15
8+
minSdkVersion 14
99
targetSdkVersion 26
1010
versionCode 1
1111
versionName "1.0"
@@ -31,6 +31,5 @@ dependencies {
3131
})
3232
compile 'com.android.support:appcompat-v7:26.+'
3333
testCompile 'junit:junit:4.12'
34-
compile 'com.android.support.constraint:constraint-layout:1.0.2'
3534
compile project(':expandablelib')
3635
}

app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="iammert.com.expandablelayout">
44

5-
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher"
6-
android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round"
7-
android:supportsRtl="true" android:theme="@style/AppTheme">
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme">
812
<activity android:name=".MainActivity">
913
<intent-filter>
1014
<action android:name="android.intent.action.MAIN" />

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import android.view.View;
66
import android.widget.TextView;
77

8+
import iammert.com.expandablelib.ExpandCollapseListener;
89
import iammert.com.expandablelib.ExpandableLayout;
910
import iammert.com.expandablelib.Section;
1011

@@ -36,12 +37,18 @@ public void render(View view, Fruit model, boolean isExpanded) {
3637
sectionLinearLayout.addSection(getSection());
3738
sectionLinearLayout.addSection(getSection());
3839

39-
sectionLinearLayout.setExpandListener((parentIndex, parent, view) -> {
40-
view.findViewById(R.id.arrow).setBackgroundResource(R.drawable.arrow_up);
40+
sectionLinearLayout.setExpandListener(new ExpandCollapseListener.ExpandListener<FruitCategory>() {
41+
@Override
42+
public void onExpanded(int parentIndex, FruitCategory parent, View view) {
43+
44+
}
4145
});
4246

43-
sectionLinearLayout.setCollapseListener((parentIndex, parent, view) -> {
44-
view.findViewById(R.id.arrow).setBackgroundResource(R.drawable.arrow_down);
47+
sectionLinearLayout.setCollapseListener(new ExpandCollapseListener.CollapseListener<FruitCategory>() {
48+
@Override
49+
public void onCollapsed(int parentIndex, FruitCategory parent, View view) {
50+
51+
}
4552
});
4653

4754
}

expandablelib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ android {
77

88

99
defaultConfig {
10-
minSdkVersion 15
10+
minSdkVersion 14
1111
targetSdkVersion 26
1212
versionCode 1
1313
versionName "1.0"

0 commit comments

Comments
 (0)