diff --git a/example/src/main/java/com/goodiebag/pinview/example/MainActivity.java b/example/src/main/java/com/goodiebag/pinview/example/MainActivity.java index 570d494..715de7d 100644 --- a/example/src/main/java/com/goodiebag/pinview/example/MainActivity.java +++ b/example/src/main/java/com/goodiebag/pinview/example/MainActivity.java @@ -1,5 +1,6 @@ package com.goodiebag.pinview.example; +import android.graphics.Color; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.Toast; @@ -26,6 +27,7 @@ public void onDataEntered(Pinview pinview, boolean fromUser) { pinview5.setCursorShape(R.drawable.example_cursor); // pinview5.setCursorColor(Color.BLUE); pinview5.setTextSize(12); + pinview5.setTextColor(Color.BLACK); pinview5.showCursor(true); } } diff --git a/pinview/src/main/java/com/goodiebag/pinview/Pinview.java b/pinview/src/main/java/com/goodiebag/pinview/Pinview.java index 44af77d..de6054a 100644 --- a/pinview/src/main/java/com/goodiebag/pinview/Pinview.java +++ b/pinview/src/main/java/com/goodiebag/pinview/Pinview.java @@ -689,6 +689,16 @@ public void setCursorColor(@ColorInt int color) { } } + public void setTextColor(@ColorInt int color) { + + if (editTextList == null || editTextList.isEmpty()) { + return; + } + for (EditText edt : editTextList) { + edt.setTextColor(color); + } + } + public void setCursorShape(@DrawableRes int shape) { if (editTextList == null || editTextList.isEmpty()) {