Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Set Log Lenght
Browse files Browse the repository at this point in the history
  • Loading branch information
cash-it committed Mar 3, 2020
1 parent 0783a88 commit 66751ec
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 14 deletions.
Binary file modified .gradle/5.4.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/5.4.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/5.4.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified .gradle/5.4.1/javaCompile/taskHistory.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

keyboardCashit= findViewById(R.id.keyboard);
keyboardCashit= findViewById(R.id.keyboard);
keyboardCashit.KeyboardBuilder("Lupa kata sandi?",true,6,true);
keyboardCashit.setClickListener(new KeyboardCashit.OnClickListener() {
@Override
Expand All @@ -34,7 +34,7 @@ public void onForgotClick() {

keyboardCashit.onCompletePIN(new KeyboardCashit.CompleteListener() {
@Override
public void ComlpletePIN() {
public void CompletePIN() {
// Toast.makeText(MainActivity.this,keyboardCashit.getInputText(),Toast.LENGTH_LONG).show();
Log.d("MainActivity", "ComlpletePIN: " + keyboardCashit.getInputText());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

public class KeyboardCashit extends LinearLayout implements View.OnClickListener {

public TextView mPasswordField;
public TextView txt_forgotpass;
public ImageView img_showpassword,img_finger;
public OnClickListener clickListener;
public CompleteListener completeListener;
private TextView mPasswordField;
private TextView txt_forgotpass;
private ImageView img_showpassword,img_finger;
private OnClickListener clickListener;
private CompleteListener completeListener;

public KeyboardCashit(Context context) {
super(context);
Expand All @@ -38,12 +38,12 @@ public KeyboardCashit(Context context, AttributeSet attrs, int defStyleAttr) {
init();
}

public void init() {
private void init() {
inflate(getContext(), R.layout.keyboard, this);
initViews();
}

public void initViews() {
private void initViews() {
mPasswordField = $(R.id.password_field);
img_showpassword = $(R.id.img_showpassword);
txt_forgotpass = $(R.id.txt_forgotpass);
Expand Down Expand Up @@ -97,7 +97,7 @@ public interface OnClickListener {
}

public interface CompleteListener{
void ComlpletePIN();
void CompletePIN();
}


Expand Down Expand Up @@ -211,7 +211,7 @@ public void KeyboardBuilder(){
}


private void BuilderKeyboard(final int lenght){
private void BuilderKeyboard(final int maxLenght){

img_finger.setOnClickListener(new View.OnClickListener() {
@Override
Expand Down Expand Up @@ -254,9 +254,11 @@ public void afterTextChanged(Editable editable) {
}else{
mPasswordField.setBackground(getResources().getDrawable(R.drawable.ck_edittext_style_default));
}
if(lenght == editable.length())
completeListener.ComlpletePIN();
Log.d("KeyboardCashit", "afterTextChanged: "+editable.length()+" "+mPasswordField.length());
if(maxLenght == editable.length()) {

completeListener.CompletePIN();
Log.d("KeyboardCashit", "afterTextChanged: " + editable.length()+" "+mPasswordField.getText().toString());
}
}
});

Expand Down

0 comments on commit 66751ec

Please sign in to comment.