-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from FarshidRoohi/master
fixed issues and customize pinView method
- Loading branch information
Showing
8 changed files
with
187 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 14 additions & 3 deletions
17
example/src/main/java/com/goodiebag/pinview/example/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
package com.goodiebag.pinview.example; | ||
|
||
import android.support.v7.app.AppCompatActivity; | ||
import android.graphics.Color; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.widget.Toast; | ||
|
||
import com.goodiebag.pinview.Pinview; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
private Pinview pinview1; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
pinview1= (Pinview) findViewById(R.id.pinview1); | ||
|
||
Pinview pinview1 = findViewById(R.id.pinview1); | ||
pinview1.setPinViewEventListener(new Pinview.PinViewEventListener() { | ||
@Override | ||
public void onDataEntered(Pinview pinview, boolean fromUser) { | ||
Toast.makeText(MainActivity.this, pinview.getValue(), Toast.LENGTH_SHORT).show(); | ||
} | ||
}); | ||
|
||
|
||
// pinView Customize | ||
Pinview pinview5 = findViewById(R.id.pinview5); | ||
pinview5.setCursorShape(R.drawable.example_cursor); | ||
// pinview5.setCursorColor(Color.BLUE); | ||
pinview5.setTextSize(12); | ||
pinview5.setTextColor(Color.BLACK); | ||
pinview5.showCursor(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
|
||
<solid android:color="#009688"/> | ||
|
||
<size android:width="2dp"/> | ||
<gradient | ||
android:angle="90" | ||
android:endColor="#9C27B0" | ||
android:startColor="#2196F3"/> | ||
<corners android:radius="2dp"/> | ||
|
||
|
||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri May 04 13:07:43 IST 2018 | ||
#Thu May 16 12:53:08 IRDT 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.