Skip to content

Commit

Permalink
add method set text color
Browse files Browse the repository at this point in the history
  • Loading branch information
FarshidRoohi committed May 16, 2019
1 parent cd43ec4 commit 3ce3690
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
}
}
10 changes: 10 additions & 0 deletions pinview/src/main/java/com/goodiebag/pinview/Pinview.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 3ce3690

Please sign in to comment.