PinlockView not Displayed in custom Dialog
i tried to put the PinlockView in a dialog . but it the dialog showed up blank.
Dialog Layout : `<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#ffffffff">
<com.andrognito.pinlockview.PinLockView
android:id="@+id/pin_lock_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>`
Method to Display it : public void showDialog(Activity activity) { final Dialog dialog = new Dialog(activity); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setCancelable(false); dialog.setContentView(R.layout.pindialogue);
final PinLockView mPinLockView = (PinLockView) dialog.findViewById(R.id.pin_lock_view);
mPinLockView.setPinLength(4);
mPinLockView.setPinLockListener(new PinLockListener() {
@Override
public void onComplete(String pin) {
if (pin.equals("1234")) {
dialog.hide();
}
else {
YoYo.with(Techniques.Shake).duration(700).playOn(mPinLockView);
}
}
@Override
public void onEmpty() {
}
@Override
public void onPinChange(int pinLength, String intermediatePin) {
}
});
dialog.show();
}
Same here,@farabiabdelwahe did you solved the problem?
Works good for me with Material-dialogs