Skip to content

Commit

Permalink
Data binding fixes clean (#712)
Browse files Browse the repository at this point in the history
* Fix Bottom Bar issues with Android Data Binding

* keep .idea

* travis changes
  • Loading branch information
Tushar-Acharya authored and yombunker committed Mar 24, 2017
1 parent df041f0 commit dbad9bb
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ captures/
.idea/libraries

# Keystore files
*.jks
*.jks
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android:
components:
- tools
- platform-tools
- build-tools-25.0.1
- build-tools-25.0.2
- android-25
- extra-android-m2repository

Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ android {
}
}
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:23.1.0'
resolutionStrategy.force "com.android.support:support-annotations:${rootProject.ext.supportLibraryVersion}"
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':bottom-bar')
compile 'com.android.support:appcompat-v7:' + rootProject.ext.supportLibraryVersion
compile 'com.android.support:design:' + rootProject.ext.supportLibraryVersion
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibraryVersion}"
compile "com.android.support:design:${rootProject.ext.supportLibraryVersion}"

androidTestCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'org.mockito:mockito-core:1.+'
androidTestCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile "com.google.dexmaker:dexmaker:1.2"
androidTestCompile "com.google.dexmaker:dexmaker-mockito:1.2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private void updateCustomTextAppearance() {
titleView.setTextAppearance(getContext(), titleTextAppearanceResId);
}

titleView.setTag(titleTextAppearanceResId);
titleView.setTag(R.id.bb_bottom_bar_appearance_id, titleTextAppearanceResId);
}

private void updateCustomTypeface() {
Expand Down Expand Up @@ -265,10 +265,10 @@ public void setBadgeHidesWhenActive(boolean hideWhenActive) {
}

int getCurrentDisplayedIconColor() {
Object tag = iconView.getTag();
Object tag = iconView.getTag(R.id.bb_bottom_bar_color_id);

if (tag instanceof Integer) {
return (int) iconView.getTag();
return (int) tag;
}

return 0;
Expand All @@ -283,10 +283,10 @@ int getCurrentDisplayedTitleColor() {
}

int getCurrentDisplayedTextAppearance() {
Object tag = titleView.getTag();
Object tag = titleView.getTag(R.id.bb_bottom_bar_appearance_id);

if (titleView != null && tag instanceof Integer) {
return (int) titleView.getTag();
return (int) tag;
}

return 0;
Expand Down Expand Up @@ -422,7 +422,7 @@ public void onAnimationUpdate(ValueAnimator valueAnimator) {
private void setColors(int color) {
if (iconView != null) {
iconView.setColorFilter(color);
iconView.setTag(color);
iconView.setTag(R.id.bb_bottom_bar_color_id, color);
}

if (titleView != null) {
Expand Down
5 changes: 5 additions & 0 deletions bottom-bar/src/main/res/values/ids.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="bb_bottom_bar_color_id" type="id"/>
<item name="bb_bottom_bar_appearance_id" type="id"/>
</resources>
7 changes: 3 additions & 4 deletions 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.2.3'
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0'
Expand All @@ -27,11 +27,10 @@ task clean(type: Delete) {

ext {
compileSdkVersion = 25
buildToolsVersion = "25.0.1"
buildToolsVersion = "25.0.2"
minSdkVersion = 11
targetSdkVersion = 25

supportLibraryVersion = "25.1.0"
supportLibraryVersion = "25.3.0"

junitVersion = "4.12"
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jan 09 17:20:00 EET 2017
#Sat Mar 25 00:47:49 IST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

0 comments on commit dbad9bb

Please sign in to comment.