Skip to content
This repository was archived by the owner on Feb 14, 2020. It is now read-only.

Commit 1ba7e4f

Browse files
committed
Correction to fullscreen dialog
1 parent 1014e09 commit 1ba7e4f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

library/src/main/java/com/parse/twitter/OAuth1FlowDialog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import android.os.Bundle;
1818
import android.support.v7.app.AppCompatDialog;
1919
import android.view.View;
20+
import android.view.Window;
2021
import android.webkit.WebView;
2122
import android.webkit.WebViewClient;
2223
import android.widget.ProgressBar;
@@ -52,6 +53,7 @@ public void onCancel(DialogInterface dialog) {
5253
@Override
5354
protected void onCreate(Bundle savedInstanceState) {
5455
super.onCreate(savedInstanceState);
56+
requestWindowFeature(Window.FEATURE_NO_TITLE);
5557
setContentView(R.layout.parse_twitter_dialog_login);
5658
webView = findViewById(R.id.webView);
5759
progress = findViewById(R.id.progress);
@@ -60,7 +62,6 @@ protected void onCreate(Bundle savedInstanceState) {
6062
webView.setHorizontalScrollBarEnabled(false);
6163
webView.setWebViewClient(new OAuth1WebViewClient());
6264
webView.getSettings().setJavaScriptEnabled(true);
63-
webView.setVisibility(View.INVISIBLE);
6465
webView.loadUrl(requestUrl);
6566
}
6667

@@ -116,7 +117,6 @@ public void onPageStarted(WebView view, String url, Bitmap favicon) {
116117
public void onPageFinished(WebView view, String url) {
117118
super.onPageFinished(view, url);
118119
progress.setVisibility(View.GONE);
119-
webView.setVisibility(View.VISIBLE);
120120
}
121121
}
122122
}

library/src/main/res/layout/parse_twitter_dialog_login.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
android:layout_width="match_parent"
44
android:layout_height="match_parent">
55

6+
<!--Forces full screen content-->
7+
<View
8+
android:layout_width="match_parent"
9+
android:layout_height="match_parent" />
10+
611
<WebView
712
android:id="@+id/webView"
813
android:layout_width="match_parent"
9-
android:layout_height="match_parent"
10-
android:layout_margin="16dp"/>
14+
android:layout_height="match_parent" />
1115

1216
<ProgressBar
1317
android:id="@+id/progress"
1418
android:layout_width="wrap_content"
1519
android:layout_height="wrap_content"
16-
android:layout_gravity="center"
17-
android:background="@android:color/white"
18-
android:padding="16dp" />
20+
android:layout_gravity="center" />
1921

2022
</FrameLayout>

0 commit comments

Comments
 (0)