简体   繁体   中英

Facebook SDK on Android : override or hide the progress dialog when I log in

I'm using the Facebook SDK 3.0 for Android with the uiHelper and the loginButton. When I press the login button a progress dialog is displayed. Is it possible to custom it or replace it with another dialog ? How ? I'm pretty sure that's possible, Candy crush do it ... Moreover, I try to log user without the uiHelper but with the traditionnal method : session.openForRead(new Session.OpenRequest(this).setCallback(statusCallback)); I've the same issue, I don't understand how this progress dialog is displayed.

Thank you all !

you can go directly to the Facebook Library project added to your Project , Go inside the code and change it .

this is an example from WebDialog Class , i simply removed the show method of the ProgressDialog:

    @Override
    public void onPageStarted(WebView view, String url, Bitmap favicon) {
        Utility.logd(LOG_TAG, "Webview loading URL: " + url);
        super.onPageStarted(view, url, favicon);
        if (!isDetached) {
            //spinner.show();
        }
    }

For facebook-android-sdk-4.4.1

It can be changed in com/facebook/login/loginFragment look for com_facebook_login_activity_progress_bar and set the visibility to GONE like this

R.id.com_facebook_login_activity_progress_bar).setVisibility(View.GONE);

您可以使用此答案隐藏Facebook进程对话框,然后在按下Facebook登录时实现自己的对话框。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM