I've integrated the Facebook Android SDK with my application.
I want to remove the title bar from all screens in the app, including the screen in which the FB login dialog appears.
I've used the following code in the manifest.
<activity android:name=".FacebookScreen"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"></activity>
FB Login code:
if (!facebook.isSessionValid()) {
facebook.authorize(FacebookScreen.this.getParent(),
new String[] { "publish_stream" },
Facebook.FORCE_DIALOG_AUTH,
new DialogListener() {
public void onCancel() {
// Function to handle cancel event
}
@Override
public void onComplete(Bundle values) {
// Function to handle complete event
new MyAsyncTask().execute();
}
@Override
public void onError(DialogError error) {
// Function to handle error
Log.i("Login DialogError", error.getMessage());
}
@Override
public void onFacebookError(FacebookError fberror) {
// Function to handle Facebook errors
Log.i("Login Error", fberror.getMessage());
}
});
}
But still, I can see the default title bar appearing, when the FB Login dialog appears.
I tried to add the following line of code inside the onCreate method in com.facebook.LoginActivity
requestWindowFeature(Window.FEATURE_NO_TITLE);
But that doesn't help either. How to remove that?