Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
39649508
Commit
39649508
authored
Jul 01, 2018
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add delay to webview load
parent
4750bea1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/LoginActivity.java
.../main/java/in/ac/iitb/gymkhana/iitbapp/LoginActivity.java
+9
-2
No files found.
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/LoginActivity.java
View file @
39649508
...
@@ -66,10 +66,12 @@ public class LoginActivity extends AppCompatActivity {
...
@@ -66,10 +66,12 @@ public class LoginActivity extends AppCompatActivity {
WebView
webview
=
(
WebView
)
findViewById
(
R
.
id
.
login_webview
);
WebView
webview
=
(
WebView
)
findViewById
(
R
.
id
.
login_webview
);
webview
.
loadUrl
(
"file:///android_asset/login.html"
);
webview
.
loadUrl
(
"file:///android_asset/login.html"
);
webview
.
getSettings
().
setJavaScriptEnabled
(
true
);
webview
.
getSettings
().
setDomStorageEnabled
(
true
);
webview
.
setWebViewClient
(
new
WebViewClient
()
{
webview
.
setWebViewClient
(
new
WebViewClient
()
{
@Override
@Override
public
boolean
shouldOverrideUrlLoading
(
WebView
view
,
String
url
)
{
public
boolean
shouldOverrideUrlLoading
(
final
WebView
view
,
final
String
url
)
{
/* Capture redirect */
/* Capture redirect */
if
(
url
.
startsWith
(
redirectUri
))
{
if
(
url
.
startsWith
(
redirectUri
))
{
/* Show progress dialog */
/* Show progress dialog */
...
@@ -94,7 +96,12 @@ public class LoginActivity extends AppCompatActivity {
...
@@ -94,7 +96,12 @@ public class LoginActivity extends AppCompatActivity {
}
}
/* Load URL */
/* Load URL */
view
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
view
.
loadUrl
(
url
);
view
.
loadUrl
(
url
);
}
},
500
);
return
false
;
return
false
;
}
}
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment