From 532c9f2198685f0be9d4911e14957d5d256c69cc Mon Sep 17 00:00:00 2001 From: mertsimsek Date: Mon, 31 Jul 2017 11:38:49 +0300 Subject: [PATCH] - minSdk update to 14. --- app/build.gradle | 3 +-- app/src/main/AndroidManifest.xml | 10 +++++++--- .../com/expandablelayout/MainActivity.java | 15 +++++++++++---- expandablelib/build.gradle | 2 +- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index adf1671..3614e76 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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" @@ -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') } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d6d0054..ee69f7e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,9 +2,13 @@ - + diff --git a/app/src/main/java/iammert/com/expandablelayout/MainActivity.java b/app/src/main/java/iammert/com/expandablelayout/MainActivity.java index 73b3239..cf229ee 100644 --- a/app/src/main/java/iammert/com/expandablelayout/MainActivity.java +++ b/app/src/main/java/iammert/com/expandablelayout/MainActivity.java @@ -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; @@ -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() { + @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() { + @Override + public void onCollapsed(int parentIndex, FruitCategory parent, View view) { + + } }); } diff --git a/expandablelib/build.gradle b/expandablelib/build.gradle index 9320a0f..3282f74 100644 --- a/expandablelib/build.gradle +++ b/expandablelib/build.gradle @@ -7,7 +7,7 @@ android { defaultConfig { - minSdkVersion 15 + minSdkVersion 14 targetSdkVersion 26 versionCode 1 versionName "1.0"