gpt4 book ai didi

Android Google Sign In 在用户登录时闪烁一个小的空白框

转载 作者:IT王子 更新时间:2023-10-29 00:07:03 26 4
gpt4 key购买 nike

基本上,Android Google Sign In 会在用户按下登录按钮之后和 Google 完成登录过程之前闪烁一个小的空白框。这一切都发生得很快,但我想摆脱白盒子。我认为这个白框是显示进度条的失败尝试。

编辑:添加正在发生的事情的图形重新创建...

Representation

我正在三星 Tab 3 上进行测试。

此问题不包括用户首次登录或访问权限被撤销后的情况。

  GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestIdToken(getString(R.string.google_server_client_id))
.build();

// google login stuff
googlebutton = (com.google.android.gms.common.SignInButton) findViewById(R.id.googlebutton);
googlebutton.setOnClickListener(this);
googlebutton.setStyle(SignInButton.SIZE_STANDARD, SignInButton.COLOR_LIGHT);
// Build GoogleApiClient with access to basic profile
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.build();

还有登录功能……

private void gSignIn() {
Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
startActivityForResult(signInIntent, RC_SIGN_IN);
}

理想情况下,我想恢复正常的进度条行为。

这是我的毕业典礼...

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '23.0.0'

defaultConfig {
applicationId "xxxxxxxxx"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-plus:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
//compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.android.support:design:23.0.1'
}

最佳答案

试试这个不确定:它只是你在 list 中应用到那个 Activity 的一个标签,从该 Activity 中删除它

android:label="@string/app_name"

或者检查你的布局文件是否存在一些可见的空 View 。谢谢。

关于Android Google Sign In 在用户登录时闪烁一个小的空白框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34599990/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com