Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid NPE

  • Loading branch information...
commit 8e0777a84dd65209cc73377b588a829092f01ae3 1 parent f7ce059
Alexander Blom lexs authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 facebook/src/com/facebook/android/FbDialog.java
9 facebook/src/com/facebook/android/FbDialog.java
View
@@ -47,6 +47,7 @@
import com.facebook.android.Facebook.DialogListener;
public class FbDialog extends Dialog {
+ private static final boolean SHOW_CLOSE_BUTTON = false;
static final int FB_BLUE = 0xFF6D84B4;
static final float[] DIMENSIONS_DIFF_LANDSCAPE = {20, 60};
@@ -82,8 +83,7 @@ protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
mContent = new FrameLayout(getContext());
- boolean shouldCreateCrossImage = false;
- if(shouldCreateCrossImage) {
+ if(SHOW_CLOSE_BUTTON) {
/* Create the 'x' image, but don't add to the mContent layout yet
* at this point, we only need to know its drawable width and height
* to place the webview
@@ -301,7 +301,10 @@ public void onPageFinished(WebView view, String url) {
*/
mContent.setBackgroundColor(Color.TRANSPARENT);
mWebView.setVisibility(View.VISIBLE);
- mCrossImage.setVisibility(View.VISIBLE);
+
+ if (SHOW_CLOSE_BUTTON) {
+ mCrossImage.setVisibility(View.VISIBLE);
+ }
}
catch(Exception e) {
e.printStackTrace();
Please sign in to comment.
Something went wrong with that request. Please try again.