Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: facebook/facebook-android-sdk
base: master
...
head fork: ksperling/facebook-android-sdk
compare: dialog_fullscreen
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 13 additions and 1 deletion.
  1. +13 −1 facebook/src/com/facebook/android/FbDialog.java
View
14 facebook/src/com/facebook/android/FbDialog.java
@@ -16,6 +16,7 @@
package com.facebook.android;
+import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
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, android.R.style.Theme_Translucent_NoTitleBar);
+ super(context, isFullScreenActivity(context)
+ ? android.R.style.Theme_Translucent_NoTitleBar_Fullscreen
+ : android.R.style.Theme_Translucent_NoTitleBar);
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;
+ }
@Override
protected void onCreate(Bundle savedInstanceState) {

No commit comments for this range

Something went wrong with that request. Please try again.