当我启动我的应用的登录活动时,它会出现应出现的内容,但文本框除外,它们没有可见的提示。此外,当用户键入文本框时,文本是不可见的(可能与文本框的背景颜色相同)
继承我的onCreate():
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
// Start the authentication UI
AuthUIConfiguration config = new AuthUIConfiguration.Builder()
.userPools(true)
.backgroundColor(Color.rgb(0x36, 0x89, 0x56))
.isBackgroundColorFullScreen(true)
.build();
SignInActivity.startSignInActivity(this, config);
LoginActivity.this.finish();
final IdentityManager identityManager = AWSProvider.getInstance().getIdentityManager();
// Set up the callbacks to handle the authentication response
identityManager.login(this, new DefaultSignInResultHandler() {
@Override
public void onSuccess(Activity activity, IdentityProvider identityProvider) {
Toast.makeText(LoginActivity.this,
String.format("Logged in as %s", identityManager.getCachedUserID()),
Toast.LENGTH_LONG).show();
// Go to the main activity
final Intent intent = new Intent(activity, RangingActivity.class)
.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
activity.startActivity(intent);
activity.finish();
}
@Override
public boolean onCancel(Activity activity) {
return false;
}
});
}
以下是我参与活动所需的资源:
https://docs.aws.amazon.com/aws-mobile/latest/developerguide/add-aws-mobile-user-sign-in.html https://docs.aws.amazon.com/aws-mobile/latest/developerguide/add-aws-mobile-user-sign-in-customize.html
由于