Browse Source

Login page fixes with keyboard

master
preyearegmi 6 years ago
parent
commit
a1f8f8c251
  1. 14
      app/src/main/java/com/gmeremit/online/gmeremittance_native/loginV2/view/LoginV2Activity.java
  2. 36
      app/src/main/res/layout/activity_login_v2.xml

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

@ -22,6 +22,7 @@ import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import com.gmeremit.online.gmeremittance_native.R;
@ -45,7 +46,7 @@ public class LoginV2Activity extends BaseActivity implements View.OnClickListene
EditText usernameId;
// @BindView(R.id.passwordId)
EditText passwordId;
// EditText passwordId;
@BindView(R.id.btn_submit)
Button loginBtn;
@ -83,6 +84,9 @@ public class LoginV2Activity extends BaseActivity implements View.OnClickListene
@BindView(R.id.keypadBallon)
RelativeLayout ballonView;
@BindView(R.id.scrollView)
ScrollView scrollView;
public String loginButtonText;
@ -198,7 +202,7 @@ public class LoginV2Activity extends BaseActivity implements View.OnClickListene
break;
case R.id.btn_submit:
if (presenter.validateAll(usernameId.getText().toString(), passwordId.getText().toString())) {
if (presenter.validateAll(usernameId.getText().toString(),"123")){
hideKeyBoard();
rootView.clearFocus();
morphButtonIntoProgressBar();
@ -274,7 +278,7 @@ public class LoginV2Activity extends BaseActivity implements View.OnClickListene
mIsMorphingInProgress = false;
// ViewCompat.setTranslationZ(progressbar_login, 100);
progressbar_login.setVisibility(View.VISIBLE);
presenter.loginUser(usernameId.getText().toString(), passwordId.getText().toString());
presenter.loginUser(usernameId.getText().toString(), "123");
}
});
mMorphingAnimatorSet.start();
@ -355,6 +359,10 @@ public class LoginV2Activity extends BaseActivity implements View.OnClickListene
if (securityKeyboardManager != null && !securityKeyboardManager.isKeyboardVisible()) {
hideKeyBoard();
securityKeyboardManager.showKeyboard();
scrollView.postDelayed(()->{
scrollView.smoothScrollTo(0,rootView.getBottom());
},250);
}
}

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

@ -190,27 +190,29 @@
</LinearLayout>
</ScrollView>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:src="@drawable/login_footer_image"/>
<FrameLayout
<!--<ImageView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_alignParentBottom="true"-->
<!--android:src="@drawable/login_footer_image"/>-->
android:id="@+id/keypadContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
</FrameLayout>
<RelativeLayout
android:id="@+id/keypadBallon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true" />
</RelativeLayout>
<FrameLayout
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>
Loading…
Cancel
Save