Browse Source

Keyboard fixes overall app

master
preyearegmi 6 years ago
parent
commit
babc5b2fde
  1. 17
      app/src/main/java/com/gmeremit/online/gmeremittance_native/changepasswordV2/view/ChangePasswordV2Activity.java
  2. 6
      app/src/main/java/com/gmeremit/online/gmeremittance_native/loginV2/view/LoginV2Activity.java
  3. 11
      app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/view/RegisterV2Activity.java
  4. 32
      app/src/main/res/layout/activity_change_password_v2.xml
  5. 15
      app/src/main/res/layout/activity_login_v2.xml
  6. 24
      app/src/main/res/layout/activity_register_v2.xml

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);
}
}

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

@ -343,9 +343,9 @@ public class LoginV2Activity extends BaseActivity implements View.OnClickListene
if (securityKeyboardManager != null && !securityKeyboardManager.isKeyboardVisible()) {
hideKeyBoard();
securityKeyboardManager.showKeyboard();
// scrollView.postDelayed(()->{
// scrollView.smoothScrollTo(0,rootView.getBottom());
// },250);
scrollView.postDelayed(()->{
scrollView.smoothScrollTo(0,rootView.getBottom());
},250);
}
}

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);
}

32
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>
<RelativeLayout
android:id="@+id/keypadBallon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<RelativeLayout
android:id="@+id/keypadBallon"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>

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

@ -6,7 +6,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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"
@ -26,7 +27,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
@ -219,16 +220,10 @@
</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"

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>
Loading…
Cancel
Save