dea*_*sin 38 android progressdialog google-signin
基本上,Android 谷歌登录在用户按下登录按钮之后和谷歌完成登录过程之前闪烁一个小的空白框.这一切都发生得非常快,但我想摆脱白盒子.我假设这个白框是尝试显示进度条的失败.
编辑:添加正在发生的事情的图形重新创建...
我在三星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();
Run Code Online (Sandbox Code Playgroud)
和登录功能......
private void gSignIn() {
Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
startActivityForResult(signInIntent, RC_SIGN_IN);
}
Run Code Online (Sandbox Code Playgroud)
理想情况下,我想恢复正常的进度条行为.
这是我的傻瓜......
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'
}
Run Code Online (Sandbox Code Playgroud)
不确定尝试一下:它只是您在清单中应用于该活动的标签,请从该活动中删除它
android:label="@string/app_name"
Run Code Online (Sandbox Code Playgroud)
或者检查您的布局文件是否存在一些可见的空视图。谢谢。
| 归档时间: |
|
| 查看次数: |
1178 次 |
| 最近记录: |