Modify URL and webview

This commit is contained in:
misaochan 2016-08-05 18:34:20 +12:00
parent d44d3d84c3
commit 498873adae
2 changed files with 11 additions and 11 deletions

View file

@ -3,6 +3,7 @@ package fr.free.nrw.commons.auth;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.webkit.WebView;
import fr.free.nrw.commons.R;
@ -13,6 +14,11 @@ public class SignupActivity extends Activity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_signup);
Log.d("SignupActivity", "Signup Activity started");
WebView myWebView = (WebView) findViewById(R.id.webview);
//myWebView.loadUrl("https://commons.wikimedia.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page");
myWebView.loadUrl("https://commons.m.wikimedia.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes");
//Problem: display not good on large screen. Use mobile page?
//After Create Account button is pressed within WebView, it brings user to https://commons.wikimedia.org/wiki/Main_Page. So can we just override that URL?
}
}

View file

@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="fr.free.nrw.commons.auth.SignupActivity">
</RelativeLayout>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>