Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update new version :) #15

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
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
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
lt application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml
.idea/

# Keystore files
*.jks


12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 25
buildToolsVersion "25.0.2"

defaultConfig {
applicationId "com.andrognito.pinlockviewapp"
minSdkVersion 11
targetSdkVersion 23
minSdkVersion 17
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
Expand All @@ -20,8 +20,8 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile project(':pinlockview')
}
11 changes: 6 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.andrognito.pinlockviewapp">
<manifest package="com.andrognito.pinlockviewapp"
xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity android:name=".SampleActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".SampleActivity2">
</activity>
</application>

</manifest>
Binary file added app/src/main/assets/timeburnernormal.ttf
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package com.andrognito.pinlockviewapp;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

import com.andrognito.pinlockview.IndicatorDots;
import com.andrognito.pinlockview.PinLockListener;
Expand All @@ -16,6 +19,7 @@ public class SampleActivity extends AppCompatActivity {

private PinLockView mPinLockView;
private IndicatorDots mIndicatorDots;
private Button mBtnExample2;

private PinLockListener mPinLockListener = new PinLockListener() {
@Override
Expand All @@ -41,6 +45,7 @@ protected void onCreate(Bundle savedInstanceState) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_sample);

mBtnExample2 = (Button) findViewById( R.id.btn_goto_example2 );
mPinLockView = (PinLockView) findViewById(R.id.pin_lock_view);
mIndicatorDots = (IndicatorDots) findViewById(R.id.indicator_dots);

Expand All @@ -49,5 +54,13 @@ protected void onCreate(Bundle savedInstanceState) {

mPinLockView.setPinLength(6);
mPinLockView.setTextColor(getResources().getColor(R.color.white));

mBtnExample2.setOnClickListener( new View.OnClickListener(){
@Override
public void onClick( View v ){
Intent i = new Intent( SampleActivity.this, SampleActivity2.class );
startActivity( i );
}
} );
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package com.andrognito.pinlockviewapp;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;

import com.andrognito.pinlockview.IndicatorDots;
import com.andrognito.pinlockview.LeftButtonClickListener;
import com.andrognito.pinlockview.PinLockAdapter;
import com.andrognito.pinlockview.PinLockListener;
import com.andrognito.pinlockview.PinLockView;

public class SampleActivity2 extends AppCompatActivity {

public static final String TAG = "PinLockView";

private PinLockView mPinLockView;
private IndicatorDots mIndicatorDots;

private PinLockListener mPinLockListener = new PinLockListener() {
@Override
public void onComplete(String pin) {
Log.d(TAG, "Pin complete: " + pin);
}

@Override
public void onEmpty() {
Log.d(TAG, "Pin empty");
}

@Override
public void onPinChange(int pinLength, String intermediatePin) {
Log.d(TAG, "Pin changed, new length " + pinLength + " with intermediate pin " + intermediatePin);
}
};

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_sample2);

mPinLockView = (PinLockView) findViewById(R.id.pin_lock_view);
mIndicatorDots = (IndicatorDots) findViewById(R.id.indicator_dots);

mPinLockView.attachIndicatorDots(mIndicatorDots);
mPinLockView.setPinLockListener(mPinLockListener);
mPinLockView.setOnClickButtonLeftListener(new LeftButtonClickListener() {
@Override
public void onLeftButtonClicked(PinLockAdapter.LeftButtonViewHolder numberViewHolder) {

}
});

mPinLockView.setPinLength(6);
mPinLockView.setTextColor(getResources().getColor(R.color.white));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#50FFFFFF">
<item android:id="@android:id/mask" android:drawable="@drawable/selector_mask_oval"/>
<item android:drawable="@drawable/shape_button_passcode_background_normal" />
</ripple>

5 changes: 5 additions & 0 deletions app/src/main/res/drawable-v21/selector_mask_oval.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@android:color/black"/>
</shape>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/selector_button_passcode_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@drawable/shape_button_passcode_background_pressed" android:state_pressed="true" />

<item android:drawable="@drawable/shape_button_passcode_background_focused" android:state_focused="true" />

<item android:drawable="@drawable/shape_button_passcode_background_normal" />

</selector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke
android:width="1dp"
android:color="@color/white"/>

<stroke
android:width="1dp"
android:color="#ffe100" />

</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">

<stroke
android:width="1dp"
android:color="@color/white"/>
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">

<solid android:color="#80FFFFFF" />
<stroke
android:width="1dp"
android:color="@color/white"/>
</shape>
8 changes: 8 additions & 0 deletions app/src/main/res/drawable/shape_indicator_empty.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">

<stroke
android:width="2dp"
android:color="@color/white"/>
</shape>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/shape_indicator_select.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/white"/>
</shape>
Loading