Skip to content

Instantly share code, notes, and snippets.

@rashiq
Last active December 18, 2015 23:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rashiq/5862471 to your computer and use it in GitHub Desktop.
Save rashiq/5862471 to your computer and use it in GitHub Desktop.
Use this theme to "holofy" the WebDialog in the Facebook SDK
<style name="FbDialog" parent="@android:style/Theme.Holo.Light">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
</style>
/* Change this line inside the WebDialog.java class:
https://github.com/facebook/facebook-android-sdk/blob/master/facebook/src/com/facebook/widget/WebDialog.java#L60
to the code block below.
*/
public static final int DEFAULT_THEME;
static {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
DEFAULT_THEME = R.style.FbDialog;
} else {
DEFAULT_THEME = android.R.style.Theme_Translucent_NoTitleBar;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment