Skip to content

Commit

Permalink
- minSdk update to 14.
Browse files Browse the repository at this point in the history
  • Loading branch information
iammert committed Jul 31, 2017
1 parent 345a3e8 commit 532c9f2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android {
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "iammert.com.expandablelayout"
minSdkVersion 15
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
Expand All @@ -31,6 +31,5 @@ dependencies {
})
compile 'com.android.support:appcompat-v7:26.+'
testCompile 'junit:junit:4.12'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile project(':expandablelib')
}
10 changes: 7 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="iammert.com.expandablelayout">

<application android:allowBackup="true" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:theme="@style/AppTheme">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
15 changes: 11 additions & 4 deletions app/src/main/java/iammert/com/expandablelayout/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.view.View;
import android.widget.TextView;

import iammert.com.expandablelib.ExpandCollapseListener;
import iammert.com.expandablelib.ExpandableLayout;
import iammert.com.expandablelib.Section;

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

sectionLinearLayout.setExpandListener((parentIndex, parent, view) -> {
view.findViewById(R.id.arrow).setBackgroundResource(R.drawable.arrow_up);
sectionLinearLayout.setExpandListener(new ExpandCollapseListener.ExpandListener<FruitCategory>() {
@Override
public void onExpanded(int parentIndex, FruitCategory parent, View view) {

}
});

sectionLinearLayout.setCollapseListener((parentIndex, parent, view) -> {
view.findViewById(R.id.arrow).setBackgroundResource(R.drawable.arrow_down);
sectionLinearLayout.setCollapseListener(new ExpandCollapseListener.CollapseListener<FruitCategory>() {
@Override
public void onCollapsed(int parentIndex, FruitCategory parent, View view) {

}
});

}
Expand Down
2 changes: 1 addition & 1 deletion expandablelib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {


defaultConfig {
minSdkVersion 15
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
Expand Down

0 comments on commit 532c9f2

Please sign in to comment.