diff --git a/advancedtoolbar/advancedtoolbar.iml b/advancedtoolbar/advancedtoolbar.iml
index 9b8e20a..848fb42 100644
--- a/advancedtoolbar/advancedtoolbar.iml
+++ b/advancedtoolbar/advancedtoolbar.iml
@@ -12,7 +12,10 @@
+
+
+ generateDebugAndroidTestSources
generateDebugSources
@@ -48,13 +51,7 @@
-
-
-
-
-
-
-
+
@@ -62,6 +59,7 @@
+
@@ -69,13 +67,7 @@
-
-
-
-
-
-
-
+
@@ -84,10 +76,12 @@
+
+
@@ -98,11 +92,11 @@
-
-
+
+
+
+
-
-
-
+
\ No newline at end of file
diff --git a/advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/Util/TitleStorage.java b/advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/Util/TitleStorage.java
index a727150..8306fbe 100644
--- a/advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/Util/TitleStorage.java
+++ b/advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/Util/TitleStorage.java
@@ -1,5 +1,8 @@
package com.hkm.advancedtoolbar.Util;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+
import java.util.ArrayList;
/**
@@ -29,6 +32,10 @@ public ArrayList getHistory() {
return items;
}
+ public String getCurrentTitle() {
+ return items.get(items.size() - 1);
+ }
+
public String popback() {
if (items.size() > 0) {
String takenout = items.remove(items.size() - 1);
@@ -41,4 +48,28 @@ public String popback() {
return "";
}
}
+
+ public final static String
+ STEPS = "BB_HISTORY_STEPS",
+ IS_LOGOSHOWN = "BB_LOGO_SHOWN",
+ IS_BACKSHOWN = "BB_BACK_SHOWN",
+ IS_SEARCHSHOWN = "BB_SEARCH_SHOWN",
+ IS_TITLESHOWN = "BB_TITLE_SHOWN",
+ STRINGARRAY = "BB_HISTORY_TITLES";
+
+ public final void onStateInstaceState(Bundle out) {
+ out.putStringArrayList(STRINGARRAY, items);
+ out.putInt(STEPS, getHistorySteps());
+ }
+
+
+ public final void onRestoreInstanceState(@Nullable Bundle input) {
+ if (input == null) return;
+ try {
+ items.clear();
+ items.addAll(input.getStringArrayList(STRINGARRAY));
+ } catch (ClassCastException e) {
+ } catch (NullPointerException e) {
+ }
+ }
}
diff --git a/advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/V5/BeastBar.java b/advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/V5/BeastBar.java
index 7a94bc0..7cecb5c 100644
--- a/advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/V5/BeastBar.java
+++ b/advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/V5/BeastBar.java
@@ -451,7 +451,13 @@ public boolean isCompanyLogoShown() {
return isCompanyLogoShown;
}
+ public boolean isTitleShown() {
+ return isTitleShown;
+ }
+ public boolean isSearchButtonShown() {
+ return isSearchButtonShown;
+ }
public BeastBar setBackIconFunc(@Nullable final onButtonPressListener func) {
if (func == null) {
@@ -588,4 +594,32 @@ public void onAnimationStart(Animation animation) {
public TitleStorage getTitleStorageInstance() {
return mTitle;
}
+
+
+ public final void onStateInstaceState(Bundle out) {
+ if (mTitle != null) mTitle.onStateInstaceState(out);
+ out.putBoolean(TitleStorage.IS_LOGOSHOWN, isCompanyLogoShown);
+ out.putBoolean(TitleStorage.IS_SEARCHSHOWN, isSearchButtonShown);
+ out.putBoolean(TitleStorage.IS_TITLESHOWN, isTitleShown);
+ out.putBoolean(TitleStorage.IS_BACKSHOWN, isBackButtonShown);
+ }
+
+
+ public final void onRestoreInstanceState(@Nullable Bundle input) {
+ if (input == null) return;
+ if (mTitle != null) mTitle.onRestoreInstanceState(input);
+ isTitleShown = input.getBoolean(TitleStorage.IS_TITLESHOWN, isTitleShown);
+ isCompanyLogoShown = input.getBoolean(TitleStorage.IS_LOGOSHOWN, isCompanyLogoShown);
+ isSearchButtonShown = input.getBoolean(TitleStorage.IS_SEARCHSHOWN, isSearchButtonShown);
+ isBackButtonShown = input.getBoolean(TitleStorage.IS_BACKSHOWN, isBackButtonShown);
+
+ /**
+ * there we can only take care of two features in this library
+ */
+ if (isTitleShown && mTitle != null) setActionTitle(mTitle.getCurrentTitle());
+
+ if (isCompanyLogoShown) showMainLogo();
+
+
+ }
}
diff --git a/build.gradle b/build.gradle
index f117200..4a3e0b1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.0.0'
+ classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.novoda:bintray-release:0.3.4'
}
}
diff --git a/gradle.properties b/gradle.properties
index 102b7b0..6b60cea 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,11 +1,11 @@
-VERSION_NAME=0.8.1
-VERSION_CODE=91
+VERSION_NAME=0.9.1
+VERSION_CODE=96
ANDROID_BUILD_MIN_SDK_VERSION=17
ANDROID_BUILD_TARGET_SDK_VERSION=22
ANDROID_BUILD_SDK_VERSION=23
ANDROID_BUILD_TOOLS_VERSION=23.0.3
-ANDROID_SUPPORT_LIBRARY=23.3.0
+ANDROID_SUPPORT_LIBRARY=23.4.0
POM_DESCRIPTION=It is a customized toolbar or actionbar for Android V21, V19, or V23
POM_URL=https://github.com/jjhesk/ToolBarLib
POM_SCM_URL=https://github.com/jjhesk/ToolBarLib