Browse Source

Updated with keypad popup from keypa branch

master
preyearegmi 6 years ago
parent
commit
7bd31c9e83
  1. 2
      app/src/main/AndroidManifest.xml
  2. 17
      app/src/main/java/com/gmeremit/online/gmeremittance_native/changepasswordV2/view/ChangePasswordV2Activity.java
  3. 1
      app/src/main/java/com/gmeremit/online/gmeremittance_native/loginV2/view/LoginV2Activity.java
  4. 11
      app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/view/RegisterV2Activity.java
  5. 4
      app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionpasspromt/TransactionPasswordPromptActivity.java
  6. 15
      app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/security/securitykeypad/SecurityKeypadRequestParamBuilder.java
  7. 26
      app/src/main/res/layout/activity_change_password_v2.xml
  8. 27
      app/src/main/res/layout/activity_login_v2.xml
  9. 24
      app/src/main/res/layout/activity_register_v2.xml
  10. 22
      app/src/main/res/layout/activity_transaction_password_prompt.xml

2
app/src/main/AndroidManifest.xml

@ -271,7 +271,7 @@
android:name=".loginV2.view.LoginV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".registerV2.view.RegisterV2Activity"
android:screenOrientation="portrait"

17
app/src/main/java/com/gmeremit/online/gmeremittance_native/changepasswordV2/view/ChangePasswordV2Activity.java

@ -67,6 +67,16 @@ public class ChangePasswordV2Activity extends BaseActivity implements ChangePass
@BindView(R.id.scrollView)
ScrollView scrollView;
@BindView(R.id.newPasswordText)
TextView newPasswordText;
@BindView(R.id.confirmPasswordText)
TextView confirmPasswordText;
@BindView(R.id.currentPasswordText)
TextView currentPasswordText;
@BindView(R.id.rootViewChangePassword)
View rootView;
@ -104,6 +114,7 @@ public class ChangePasswordV2Activity extends BaseActivity implements ChangePass
try {
securityKeyboardCurrentPasswordManager = new SecurityKeyboardManager(this);
SecurityKeypadRequestParamBuilder request = new SecurityKeypadRequestParamBuilder(this);
request.disableKeyPadEffect(false);
request.setHintString("Password");
securityKeyboardCurrentPasswordManager.bindWithSecurityWidgetView(securityKeyboardCurrentPasswordView)
@ -276,7 +287,7 @@ public class ChangePasswordV2Activity extends BaseActivity implements ChangePass
hideKeyBoard();
securityKeyboardCurrentPasswordManager.showKeyboard();
scrollView.postDelayed(()->{
scrollView.smoothScrollTo(0, securityKeyboardCurrentPasswordView.getBottom());
scrollView.smoothScrollTo(0, currentPasswordText.getTop());
},250);
}
}
@ -337,7 +348,7 @@ public class ChangePasswordV2Activity extends BaseActivity implements ChangePass
hideKeyBoard();
securityKeyboardNewPasswordManager.showKeyboard();
scrollView.postDelayed(()->{
scrollView.smoothScrollTo(0, securityKeyboardNewPassword.getBottom());
scrollView.smoothScrollTo(0, newPasswordText.getTop());
},250);
}
@ -399,7 +410,7 @@ public class ChangePasswordV2Activity extends BaseActivity implements ChangePass
hideKeyBoard();
securityKeyboardConfirmPasswordManager.showKeyboard();
scrollView.postDelayed(()->{
scrollView.smoothScrollTo(0, securityKeyboardConfirmPassword.getBottom());
scrollView.smoothScrollTo(0, confirmPasswordText.getTop());
},250);
}
}

1
app/src/main/java/com/gmeremit/online/gmeremittance_native/loginV2/view/LoginV2Activity.java

@ -126,6 +126,7 @@ public class LoginV2Activity extends BaseActivity implements View.OnClickListene
securityKeyboardManager = new SecurityKeyboardManager(this);
SecurityKeypadRequestParamBuilder request = new SecurityKeypadRequestParamBuilder(this);
request.setHintString("Password");
request.disableKeyPadEffect(false);
securityKeyboardManager.bindWithSecurityWidgetView(securityKeyboardView)
.setBallonView(ballonView)

11
app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/view/RegisterV2Activity.java

@ -83,6 +83,12 @@ public class RegisterV2Activity extends BaseActivity implements RegisterV2Presen
@BindView(R.id.scrollView)
ScrollView scrollView;
@BindView(R.id.passwordText)
TextView passwordTextView;
@BindView(R.id.confirmPasswordText)
TextView confirmPasswordTextView;
@BindView(R.id.rootViewRegister)
View rootView;
@ -140,6 +146,7 @@ public class RegisterV2Activity extends BaseActivity implements RegisterV2Presen
securityKeyboardConfirmPasswordManager = new SecurityKeyboardManager(this);
SecurityKeypadRequestParamBuilder request = new SecurityKeypadRequestParamBuilder(this);
request.setHintString("Password");
request.disableKeyPadEffect(false);
securityKeyboardConfirmPasswordManager.bindWithSecurityWidgetView(securityKeyboardConfirmPasswordView)
.setBallonView(ballonView)
@ -353,7 +360,7 @@ public class RegisterV2Activity extends BaseActivity implements RegisterV2Presen
hideKeyBoard();
securityKeyboardPasswordManager.showKeyboard();
scrollView.postDelayed(()->{
scrollView.smoothScrollTo(0, securityKeyboardPasswordView.getBottom());
scrollView.smoothScrollTo(0, passwordTextView.getTop());
},250);
}
@ -418,7 +425,7 @@ public class RegisterV2Activity extends BaseActivity implements RegisterV2Presen
hideKeyBoard();
securityKeyboardConfirmPasswordManager.showKeyboard();
scrollView.postDelayed(()->{
scrollView.smoothScrollTo(0, securityKeyboardConfirmPasswordView.getBottom());
scrollView.smoothScrollTo(0, confirmPasswordTextView.getTop());
},250);
}

4
app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionpasspromt/TransactionPasswordPromptActivity.java

@ -10,6 +10,7 @@ import android.support.v4.view.GestureDetectorCompat;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.FrameLayout;
@ -42,7 +43,7 @@ public class TransactionPasswordPromptActivity extends BaseActivity implements S
RelativeLayout ballonView;
@BindView(R.id.rootView)
LinearLayout rootView;
View rootView;
@BindView(R.id.passwordErrorTxt)
@ -88,6 +89,7 @@ public class TransactionPasswordPromptActivity extends BaseActivity implements S
securityKeyboardManager = new SecurityKeyboardManager(this);
SecurityKeypadRequestParamBuilder request = new SecurityKeypadRequestParamBuilder(this);
request.setHintString("Password");
request.disableKeyPadEffect(false);
securityKeyboardManager.bindWithSecurityWidgetView(securityKeyboardView)
.setBallonView(ballonView)

15
app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/security/securitykeypad/SecurityKeypadRequestParamBuilder.java

@ -22,6 +22,7 @@ public class SecurityKeypadRequestParamBuilder
byte[] secureKey;
private final Context context;
private boolean shouldDisableKeypadEffect;
public SecurityKeypadRequestParamBuilder(Context context)
{
@ -65,6 +66,12 @@ public class SecurityKeypadRequestParamBuilder
return this;
}
public SecurityKeypadRequestParamBuilder disableKeyPadEffect(boolean action)
{
this.shouldDisableKeypadEffect=action;
return this;
}
public int getDefaultKeyboardType()
{
return keyPadType;
@ -80,6 +87,7 @@ public class SecurityKeypadRequestParamBuilder
textType= TransKeyActivity.mTK_TYPE_TEXT_PASSWORD_LAST_IMAGE;
this.maxLength=16;
this.keyPadType=mTK_TYPE_KEYPAD_QWERTY_LOWER;
this.shouldDisableKeypadEffect=true;
}
@ -174,7 +182,6 @@ public class SecurityKeypadRequestParamBuilder
newIntent.putExtra(TransKeyActivity.mTK_PARAM_MIN_LENGTH_MESSAGE, "최소 글자 2글자 미만입니다");
newIntent.putExtra(TransKeyActivity.mTK_PARAM_INPUT_MINLENGTH, 0);
newIntent.putExtra(TransKeyActivity.mTK_PARAM_ALERTDIALOG_TITLE, "mTranskey alert");
newIntent.putExtra(TransKeyActivity.mTK_PARAM_DISABLE_BUTTON_EFFECT, true);
// newIntent.putExtra(TransKeyActivity.mTK_PARAM_QWERTY_BUTTON_MARGIN, 1f);
newIntent.putExtra(TransKeyActivity.mTK_PARAM_NUMBER_BUTTON_MARGIN, 0.44f);
@ -212,8 +219,10 @@ public class SecurityKeypadRequestParamBuilder
newIntent.putExtra(TransKeyActivity.mTK_PARAM_LANGUAGE, TransKeyActivity. mTK_Language_English);
newIntent.putExtra(TransKeyActivity.mTK_PARAM_PLAY_RES_BUTTON_SOUND, true);
newIntent.putExtra (TransKeyActivity.mTK_PARAM_QWERTY_HEIGHT, (float).95);
newIntent.putExtra(TransKeyActivity.mTK_PARAM_QWERTY_BUTTON_MARGIN, 1.5f);
newIntent.putExtra (TransKeyActivity.mTK_PARAM_QWERTY_HEIGHT, 1f);
newIntent.putExtra(TransKeyActivity.mTK_PARAM_QWERTY_BUTTON_MARGIN, 1f);
newIntent.putExtra(TransKeyActivity.mTK_PARAM_DISABLE_BUTTON_EFFECT, this.shouldDisableKeypadEffect);
return newIntent;
}

26
app/src/main/res/layout/activity_change_password_v2.xml

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rootViewChangePassword"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/rootViewChangePassword"
android:background="@color/background_gray"
>
android:background="@color/background_gray">
<include layout="@layout/layout_sendmoney_toolbar"/>
<RelativeLayout
android:layout_width="match_parent"
@ -19,7 +20,7 @@
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
android:layout_marginStart="5dp"
@ -41,6 +42,7 @@
android:layout_gravity="center"/>
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/currentPasswordText"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -63,6 +65,7 @@
/>
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/newPasswordText"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -85,6 +88,7 @@
/>
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/confirmPasswordText"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -124,14 +128,12 @@
android:id="@+id/keypadContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
</FrameLayout>
/>
</LinearLayout>
<RelativeLayout
android:id="@+id/keypadBallon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
/>
</RelativeLayout>
</LinearLayout>

27
app/src/main/res/layout/activity_login_v2.xml

@ -1,9 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rootViewLogin"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:focusableInTouchMode="true"
@ -15,13 +22,12 @@
android:layout_height="0dp"
android:layout_weight="1"
android:background="#fff"
tools:context="com.gmeremit.online.gmeremittance_native.sign_in.view.LoginView">
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
@ -214,19 +220,14 @@
</RelativeLayout>
<FrameLayout
android:background="@android:color/transparent"
android:id="@+id/keypadContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
</FrameLayout>
android:layout_height="wrap_content" />
</LinearLayout>
<RelativeLayout
android:id="@+id/keypadBallon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
/>
</LinearLayout>
</RelativeLayout>

24
app/src/main/res/layout/activity_register_v2.xml

@ -1,9 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:id="@+id/rootViewRegister"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#fff">
@ -24,7 +28,7 @@
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
@ -89,6 +93,7 @@
/>
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/passwordText"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -111,6 +116,7 @@
/>
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/confirmPasswordText"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -233,16 +239,12 @@
<FrameLayout
android:id="@+id/keypadContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
</FrameLayout>
android:layout_height="wrap_content" />
</LinearLayout>
<RelativeLayout
android:id="@+id/keypadBallon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
/>
</LinearLayout>
</RelativeLayout>

22
app/src/main/res/layout/activity_transaction_password_prompt.xml

@ -1,10 +1,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/rootView"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="true"
android:fitsSystemWindows="true"
android:orientation="vertical">
<!--<FrameLayout-->
<!--android:layout_height="?actionBarSize"-->
@ -55,26 +57,22 @@
android:paddingBottom="2dp"
android:paddingTop="2dp" />
<RelativeLayout
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
android:layout_weight="1"/>
<FrameLayout
android:id="@+id/keypadContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom">
</FrameLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/keypadBallon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
android:layout_height="match_parent"
/>
</RelativeLayout>
</LinearLayout>
Loading…
Cancel
Save