Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0-rc1'
classpath 'com.android.tools.build:gradle:2.2.2'
}
}

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

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:appcompat-v7:25.0.0'
compile project(':pinentry')
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=philio
POM_DEVELOPER_NAME=Phil Bayfield

ANDROID_BUILD_MIN_SDK_VERSION=7
ANDROID_BUILD_TARGET_SDK_VERSION=23
ANDROID_BUILD_TOOLS_VERSION=23.0.2
ANDROID_BUILD_SDK_VERSION=23
ANDROID_BUILD_MIN_SDK_VERSION=9
ANDROID_BUILD_TARGET_SDK_VERSION=25
ANDROID_BUILD_TOOLS_VERSION=25.0.0
ANDROID_BUILD_SDK_VERSION=25
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 Apr 25 23:18:24 BST 2016
#Sun Nov 06 04:41:09 SGT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
17 changes: 11 additions & 6 deletions pinentry/src/main/java/me/philio/pinentry/PinEntryView.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.content.ContextCompat;
import android.text.Editable;
import android.text.InputFilter;
import android.text.InputType;
Expand Down Expand Up @@ -151,16 +152,20 @@ public PinEntryView(Context context, AttributeSet attrs, int defStyle) {
// Text colour, default to android:textColorPrimary from theme
TypedValue textColor = new TypedValue();
theme.resolveAttribute(android.R.attr.textColorPrimary, textColor, true);
digitTextColor = array.getColor(R.styleable.PinEntryView_digitTextColor,
textColor.resourceId > 0 ? getResources().getColor(textColor.resourceId) :
textColor.data);
digitTextColor = array.getColor(R.styleable.PinEntryView_digitTextColor, -1);

if (!isInEditMode() && digitTextColor == -1) {
digitTextColor = ContextCompat.getColor(context, textColor.resourceId);
}

// Accent colour, default to android:colorAccent from theme
TypedValue accentColor = new TypedValue();
theme.resolveAttribute(R.attr.colorAccent, accentColor, true);
this.accentColor = array.getColor(R.styleable.PinEntryView_pinAccentColor,
accentColor.resourceId > 0 ? getResources().getColor(accentColor.resourceId) :
accentColor.data);
this.accentColor = array.getColor(R.styleable.PinEntryView_pinAccentColor, -1);

if (!isInEditMode() && this.accentColor == -1) {
this.accentColor = ContextCompat.getColor(context, textColor.resourceId);
}

// Mask character
String maskCharacter = array.getString(R.styleable.PinEntryView_mask);
Expand Down