Skip to content

Commit

Permalink
update lib
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhesk committed Jun 3, 2016
1 parent 1e76012 commit 850604e
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 23 deletions.
32 changes: 13 additions & 19 deletions advancedtoolbar/advancedtoolbar.iml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
<afterSyncTasks>
<task>generateDebugAndroidTestSources</task>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
Expand Down Expand Up @@ -48,34 +51,23 @@
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/docs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
Expand All @@ -84,10 +76,12 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
Expand All @@ -98,11 +92,11 @@
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="actionitembadge-3.0.4" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-23.3.0" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-23.3.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.4.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.4.0" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-23.4.0" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-23.4.0" level="project" />
<orderEntry type="library" exported="" name="iconics-1.2.1" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.3.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.3.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.3.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.4.0" level="project" />
</component>
</module>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.hkm.advancedtoolbar.Util;

import android.os.Bundle;
import android.support.annotation.Nullable;

import java.util.ArrayList;

/**
Expand Down Expand Up @@ -29,6 +32,10 @@ public ArrayList<String> 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);
Expand All @@ -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) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();


}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 850604e

Please sign in to comment.