Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Use fullscreen theme for FBDialog if the context activity is fullscreen. #256

wants to merge 2 commits into from

2 participants


This makes the user experience more seamless.


This pull request was raised against a previous version of the Facebook SDK for Android.

In 2012, the SDK had a significant rewrite and relaunch, and we are closing issues and pull requests that predate that v3.0 release.

If you think this pull request is still relevant, please refactor it to apply to the supported SDK (currently v3.6). For more information, please see our Android developer center at

Many thanks for using the Facebook Platform, and your support of this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 1 deletion.
  1. +13 −1 facebook/src/com/facebook/android/
14 facebook/src/com/facebook/android/
@@ -16,6 +16,7 @@
import android.content.Context;
@@ -30,6 +31,7 @@
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
+import android.view.WindowManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
@@ -59,10 +61,20 @@
private FrameLayout mContent;
public FbDialog(Context context, String url, DialogListener listener) {
- super(context,;
+ super(context, isFullScreenActivity(context)
+ ?
+ :;
mUrl = url;
mListener = listener;
+ private static boolean isFullScreenActivity(Context context) {
+ if (!(context instanceof Activity)) return false;
+ Window window = ((Activity) context).getWindow();
+ if (window == null) return false;
+ WindowManager.LayoutParams params = window.getAttributes();
+ return (params.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0;
+ }
protected void onCreate(Bundle savedInstanceState) {
Something went wrong with that request. Please try again.