You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
550 lines
22 KiB
550 lines
22 KiB
package ru.defend.defdevteam.tstu;
|
|
|
|
import android.annotation.TargetApi;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import android.support.annotation.NonNull;
|
|
import android.support.design.widget.FloatingActionButton;
|
|
import android.support.design.widget.Snackbar;
|
|
import android.util.Log;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.support.design.widget.NavigationView;
|
|
import android.support.v4.view.GravityCompat;
|
|
import android.support.v4.widget.DrawerLayout;
|
|
import android.support.v7.app.ActionBarDrawerToggle;
|
|
import android.support.v7.app.AppCompatActivity;
|
|
import android.support.v7.widget.Toolbar;
|
|
import android.view.Menu;
|
|
import android.view.MenuItem;
|
|
import android.view.ViewGroup;
|
|
import android.webkit.ValueCallback;
|
|
import android.webkit.WebSettings;
|
|
import android.webkit.WebView;
|
|
import android.webkit.WebViewClient;
|
|
import android.widget.ArrayAdapter;
|
|
import android.widget.Chronometer;
|
|
import android.widget.ListView;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.TextView;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.regex.Matcher;
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
public class WebActivity extends AppCompatActivity
|
|
implements NavigationView.OnNavigationItemSelectedListener {
|
|
|
|
|
|
public WebView browser;
|
|
public WebSettings browserSet;
|
|
static public String AuthURL, MainURL, AdditionalURL ,JournalURL, RateValueURL, GroupRateURL,
|
|
FacultyRateURL, siteBuf;
|
|
static public String MainHTML, AdditionalHTML, JournalHTML, RateValueHTML, GroupRateHTML,
|
|
FacultyRateHTML;
|
|
boolean authBegin,taskFinished = false;
|
|
public TextView studentName, studentGroup, studentRate, positionGroup,
|
|
positionFaculty, newsTextView;
|
|
public RelativeLayout profileLayout, journalLayout, gRateLayout,
|
|
fRateLayout, aboutLayout, progressLayout, newsLayout;
|
|
public Toolbar myToolbar;
|
|
public Chronometer timer;
|
|
static public List<groupList> group, faculty, subs;
|
|
Intent MainA;
|
|
FeedController feedController;
|
|
|
|
|
|
public class groupList {
|
|
public String name, rate;
|
|
public groupList(String name, String rate){
|
|
this.name = name;
|
|
this.rate = rate;
|
|
}
|
|
}
|
|
|
|
public class groupAdapter extends ArrayAdapter<groupList> {
|
|
public groupAdapter(Context context){
|
|
super(context, android.R.layout.simple_list_item_2, group);
|
|
}
|
|
|
|
@Override
|
|
public View getView(int position, View convertView, ViewGroup parent){
|
|
groupList group = getItem(position);
|
|
|
|
if (convertView == null){
|
|
convertView = LayoutInflater.from(getContext()).inflate(android.R.layout.simple_list_item_2, null);
|
|
}
|
|
|
|
((TextView) convertView.findViewById(android.R.id.text1)).setText(group.name);
|
|
((TextView) convertView.findViewById(android.R.id.text2)).setText(group.rate);
|
|
|
|
return convertView;
|
|
}
|
|
|
|
}
|
|
|
|
public class subsAdapter extends ArrayAdapter<groupList> {
|
|
public subsAdapter(Context context) {
|
|
super(context, android.R.layout.simple_selectable_list_item);
|
|
}
|
|
|
|
@NonNull
|
|
@Override
|
|
public View getView(int position, View convertView, ViewGroup parent) {
|
|
groupList group = getItem(position);
|
|
|
|
if(convertView == null){
|
|
convertView = LayoutInflater.from(getContext()).inflate(android.R.layout.simple_selectable_list_item, null);
|
|
}
|
|
((TextView) convertView.findViewById(android.R.id.text1)).setText(group.name);
|
|
return convertView;
|
|
}
|
|
}
|
|
|
|
public class facultyAdapter extends ArrayAdapter<groupList> {
|
|
public facultyAdapter(Context context){
|
|
super(context, android.R.layout.simple_list_item_2, faculty);
|
|
}
|
|
|
|
@Override
|
|
public View getView(int position, View convertView, ViewGroup parent){
|
|
groupList group = getItem(position);
|
|
|
|
if (convertView == null){
|
|
convertView = LayoutInflater.from(getContext()).inflate(android.R.layout.simple_list_item_2, null);
|
|
}
|
|
|
|
((TextView) convertView.findViewById(android.R.id.text1)).setText(group.name);
|
|
((TextView) convertView.findViewById(android.R.id.text2)).setText(group.rate);
|
|
|
|
return convertView;
|
|
}
|
|
|
|
}
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
setContentView(R.layout.cabinet);
|
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
|
setSupportActionBar(toolbar);
|
|
|
|
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
|
fab.setOnClickListener(new View.OnClickListener() {
|
|
@Override
|
|
public void onClick(View view) {
|
|
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
|
|
.setAction("Action", null).show();
|
|
}
|
|
});
|
|
|
|
final DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
|
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
|
|
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
|
|
// toolbar.setNavigationOnClickListener(
|
|
// new View.OnClickListener() {
|
|
// @Override
|
|
// public void onClick(View view) {
|
|
// Log.d("Toolbar","Hmmm...");
|
|
// if(drawer.isDrawerOpen(GravityCompat.START)){
|
|
// drawer.openDrawer(GravityCompat.START);
|
|
// }
|
|
// }
|
|
// });
|
|
toggle.syncState();
|
|
|
|
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
|
|
navigationView.setNavigationItemSelectedListener(this);
|
|
|
|
MainA = getIntent();
|
|
|
|
|
|
|
|
browser = (WebView) findViewById(R.id.webView);
|
|
browser.setWebViewClient(new MyWebViewClient());
|
|
browserSet = browser.getSettings();
|
|
browserSet.setJavaScriptEnabled(true);
|
|
studentName = (TextView) findViewById(R.id.studentName);
|
|
studentRate = (TextView) findViewById(R.id.studentRate);
|
|
studentGroup = (TextView) findViewById(R.id.studentGroup);
|
|
positionFaculty = (TextView) findViewById(R.id.positionFaculty);
|
|
newsTextView = (TextView) findViewById(R.id.newsTextView);
|
|
positionGroup = (TextView) findViewById(R.id.positionGroup);
|
|
profileLayout = (RelativeLayout) findViewById(R.id.profileLayout);
|
|
journalLayout = (RelativeLayout) findViewById(R.id.journalList);
|
|
gRateLayout = (RelativeLayout) findViewById(R.id.gRateLayout);
|
|
fRateLayout = (RelativeLayout) findViewById(R.id.fRateLayout);
|
|
aboutLayout = (RelativeLayout) findViewById(R.id.aboutLayout);
|
|
progressLayout = (RelativeLayout) findViewById(R.id.progressLayout);
|
|
newsLayout = (RelativeLayout) findViewById(R.id.newsLayout);
|
|
progressLayout.setVisibility(View.VISIBLE);
|
|
profileLayout.setVisibility(View.VISIBLE);
|
|
myToolbar = (Toolbar) findViewById(R.id.toolbar);
|
|
setSupportActionBar(myToolbar);
|
|
navigationView.getMenu().getItem(1).setChecked(true);
|
|
myToolbar.setTitle(R.string.title_profile);
|
|
|
|
|
|
feedController = new FeedController(this, 1);
|
|
|
|
AuthURL = "http://web-iais.admin.tstu.ru:7777/zion/f?p=stud_main";
|
|
loadSite();
|
|
|
|
}
|
|
|
|
@Override
|
|
public void onBackPressed() {
|
|
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
|
if (drawer.isDrawerOpen(GravityCompat.START)) {
|
|
drawer.closeDrawer(GravityCompat.START);
|
|
} else {
|
|
super.onBackPressed();
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public boolean onCreateOptionsMenu(Menu menu) {
|
|
getMenuInflater().inflate(R.menu.cabinet, menu);
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
// Handle action bar item clicks here. The action bar will
|
|
// automatically handle clicks on the Home/Up button, so long
|
|
// as you specify a parent activity in AndroidManifest.xml.
|
|
int id = item.getItemId();
|
|
|
|
//noinspection SimplifiableIfStatement
|
|
if (id == R.id.action_settings) {
|
|
return true;
|
|
}
|
|
|
|
return super.onOptionsItemSelected(item);
|
|
}
|
|
|
|
@Override
|
|
public boolean onNavigationItemSelected(MenuItem item) {
|
|
int id = item.getItemId();
|
|
newsLayout.setVisibility(View.INVISIBLE);
|
|
profileLayout.setVisibility(View.INVISIBLE);
|
|
journalLayout.setVisibility(View.INVISIBLE);
|
|
gRateLayout.setVisibility(View.INVISIBLE);
|
|
fRateLayout.setVisibility(View.INVISIBLE);
|
|
aboutLayout.setVisibility(View.INVISIBLE);
|
|
if(!taskFinished) {
|
|
progressLayout.setVisibility(View.VISIBLE);
|
|
}
|
|
switch (id) {
|
|
case R.id.nav_newsfeed:
|
|
progressLayout.setVisibility(View.INVISIBLE);
|
|
newsLayout.setVisibility(View.VISIBLE);
|
|
myToolbar.setTitle(R.string.title_newsfeed);
|
|
break;
|
|
case R.id.nav_profile:
|
|
profileLayout.setVisibility(View.VISIBLE);
|
|
myToolbar.setTitle(R.string.title_profile);
|
|
break;
|
|
case R.id.nav_journal:
|
|
journalLayout.setVisibility(View.VISIBLE);
|
|
myToolbar.setTitle(R.string.title_journal);
|
|
break;
|
|
case R.id.nav_grouprate:
|
|
gRateLayout.setVisibility(View.VISIBLE);
|
|
myToolbar.setTitle(R.string.title_grouprate);
|
|
break;
|
|
case R.id.nav_facultyrate:
|
|
fRateLayout.setVisibility(View.VISIBLE);
|
|
myToolbar.setTitle(R.string.title_globalrate);
|
|
break;
|
|
case R.id.nav_aboutapp:
|
|
progressLayout.setVisibility(View.INVISIBLE);
|
|
aboutLayout.setVisibility(View.VISIBLE);
|
|
myToolbar.setTitle(R.string.title_about_dev);
|
|
break;
|
|
case R.id.nav_changeacc:
|
|
finish();
|
|
break;
|
|
}
|
|
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
|
drawer.closeDrawer(GravityCompat.START);
|
|
return true;
|
|
}
|
|
|
|
|
|
|
|
public static StringBuffer removeUTFCharacters(String data){
|
|
Pattern p = Pattern.compile("\\\\u(\\p{XDigit}{4})");
|
|
Matcher m = p.matcher(data);
|
|
StringBuffer buf = new StringBuffer(data.length());
|
|
while (m.find()) {
|
|
String ch = String.valueOf((char) Integer.parseInt(m.group(1), 16));
|
|
m.appendReplacement(buf, Matcher.quoteReplacement(ch));
|
|
}
|
|
m.appendTail(buf);
|
|
return buf;
|
|
}
|
|
|
|
public void loadSite () {
|
|
browser.loadUrl(AuthURL);
|
|
}
|
|
|
|
public String cutLine(String a, String b, String Line){
|
|
if(Line.contains(a)) Line = Line.substring(Line.indexOf(a)+ a.length());
|
|
if(Line.contains(b)) {
|
|
if(b == ""){
|
|
return Line;
|
|
}
|
|
Line = Line.substring(0, Line.indexOf(b));
|
|
return Line;
|
|
} else {
|
|
return "";
|
|
}
|
|
}
|
|
|
|
public String cutLine(String a, String b, String Line, boolean hard){
|
|
if ((!Line.contains(a)) || (a.equals("")) ) return "";
|
|
if ((!Line.contains(b)) || (b.equals("")) ) return "";
|
|
Line = Line.substring(Line.indexOf(a)+ a.length());
|
|
Line = Line.substring(0, Line.indexOf(b));
|
|
return Line;
|
|
}
|
|
|
|
|
|
// НЕИЗВЕСТНОЕ ИСКЛЮЧЕНИЕ
|
|
public void unknownState(int currentState){
|
|
Log.e("unknownState","Не удалось получить ссылки на странице студента");
|
|
Log.e("unknownState",browser.getUrl());
|
|
finish();
|
|
}
|
|
// АВТОРИЗАЦИЯ
|
|
public boolean Auth () {
|
|
authBegin = true;
|
|
String login = MainA.getStringExtra("login");
|
|
String password = MainA.getStringExtra("pass");
|
|
Log.i("Auth|Login", login);
|
|
Log.i("Auth|Password", password);
|
|
//console("Auth|Password",MainActivity.password.getText().toString());
|
|
//browser.loadUrl("javascript:apex.submit({request:'LOGIN',set:{'P101_USERNAME':'s75389','P101_PASSWORD':'v97KFxmP'}});");
|
|
browser.loadUrl("javascript:apex.submit({request:'LOGIN',set:{'P101_USERNAME':'"+login+"','P101_PASSWORD':'"+password+"'}});");
|
|
return true;
|
|
}
|
|
|
|
public byte sessionState () {
|
|
if(taskFinished) return 127;
|
|
Intent intent = new Intent();
|
|
Log.i("sessionActive","Checking session");
|
|
String a = cutLine("http://web-iais.admin.tstu.ru:7777/zion/f?p=503:",":",browser.getUrl());
|
|
switch (a){
|
|
case "LOGIN_DESKTOP":
|
|
Log.i("sessionActive","Окно авторизации");
|
|
//MainActivity.error.setText("Конец сессии авторизации");
|
|
finish();
|
|
return 0;
|
|
case "er":
|
|
Log.i("sessionActive","Окно авторизации");
|
|
//MainActivity.error.setText("Ошибка авторизации");
|
|
finish();
|
|
return 1;
|
|
case "1":
|
|
Log.i("sessionActive","Страница студента");
|
|
intent.putExtra("error","Вход производился успешно");
|
|
MainURL = browser.getUrl();
|
|
taskGenerator(2);
|
|
return 2;
|
|
case "40":
|
|
Log.i("sessionActive","Страница - Успеваемость");
|
|
taskGenerator(3);
|
|
return 3;
|
|
case "41":
|
|
Log.i("sessionActive","Страница - Журналы|Главная");
|
|
taskGenerator(4);
|
|
return 4;
|
|
case "43":
|
|
Log.i("sessionActive","Страница - Рейтинг|Главная");
|
|
String s = cutLine("","503:",MainURL) + "503:43:" + cutLine(":1:","",MainURL)+":";
|
|
if(cutLine(s,":NO:",browser.getUrl()).equals("RATE_GROUP")) {
|
|
taskGenerator(6);
|
|
return 6;
|
|
}
|
|
if(cutLine(s,":NO:",browser.getUrl()).equals("RATE_INST")) {
|
|
taskGenerator(7);
|
|
return 7;
|
|
}
|
|
taskGenerator(5);
|
|
return 5;
|
|
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
// Контент генератор
|
|
public void taskGenerator(int state){
|
|
if (!isFinishing())
|
|
switch (state){
|
|
case 2:
|
|
MainHTML = siteBuf;
|
|
String studNameGroup = cutLine("<span id=\\\"P1_STUD\\\" class=\\\"display_only\\\" style=\\\"font-size: 120%; font-family:Verdana, Arial, Helvetica, sans-serif; color: #0000FF; font-weight:bold\\\">",
|
|
"</span>",
|
|
MainHTML);
|
|
studentName.setText(cutLine(""," /",studNameGroup));
|
|
studentGroup.setText("Группа: " + cutLine("/ ","",studNameGroup));
|
|
browser.loadUrl("javascript:apex.submit('T_ЗАНЯТИЯ/ОЦЕНКИ');");
|
|
break;
|
|
case 3:
|
|
AdditionalHTML = siteBuf;
|
|
JournalURL = "http://web-iais.admin.tstu.ru:7777/zion/" +
|
|
cutLine("<td headers=\\\"BRS\\\"><a href=\\\"","\" title=\\\"Просмотр журналов\\\">",AdditionalHTML);
|
|
RateValueURL = "http://web-iais.admin.tstu.ru:7777/zion/" +
|
|
cutLine("<td headers=\\\"RTG\\\"><a href=\\\"","\\\" title=\\\"Просмотр успеваемости\\\">",AdditionalHTML);
|
|
browser.loadUrl(JournalURL);
|
|
break;
|
|
case 4:
|
|
JournalHTML = siteBuf;
|
|
browser.loadUrl(RateValueURL);
|
|
break;
|
|
case 5:
|
|
RateValueHTML = siteBuf;
|
|
String rate = cutLine("<td align=\\\"center\\\" headers=\\\"STUDRATE\\\">","</td>",RateValueHTML);
|
|
studentRate.setText("Балл: " + rate);
|
|
GroupRateURL = "http://web-iais.admin.tstu.ru:7777/zion/" + cutLine("><td headers=\\\"GROUP_NAME\\\"><a href=\\\"","\\\">",RateValueHTML);
|
|
FacultyRateURL = "http://web-iais.admin.tstu.ru:7777/zion/" + cutLine("<td headers=\\\"INST\\\"><a href=\\\"","\\\">", RateValueHTML);
|
|
browser.loadUrl(GroupRateURL);
|
|
break;
|
|
case 6:
|
|
GroupRateHTML = siteBuf;
|
|
fillGroup();
|
|
browser.loadUrl(FacultyRateURL);
|
|
break;
|
|
case 7:
|
|
FacultyRateHTML = siteBuf;
|
|
fillFaculty();
|
|
fillAll();
|
|
taskFinished = true;
|
|
progressLayout.setVisibility(View.INVISIBLE);
|
|
break;
|
|
}
|
|
|
|
}
|
|
|
|
public void fillGroup(){
|
|
group = new ArrayList<groupList>();
|
|
String n,r;
|
|
String gr = siteBuf;
|
|
gr = cutLine("<h1>Рейтинг в группе</h1>", "", gr);
|
|
int i = 0;
|
|
while ( !(cutLine("<tr><td align=\\\"center\\\" headers=\\\"ROWNUM\\\">","</tr>",gr,true) == "")){
|
|
Integer s = Integer.valueOf(cutLine("<td align=\\\"center\\\" headers=\\\"ROWNUM\\\">","</td>",gr));
|
|
if(s == (i+1)) {
|
|
n = cutLine("<td headers=\\\"STUDNAME\\\">", "</td>", gr);
|
|
if (!(cutLine("<font color=\\\"red\\\"><b>", "</b></font>", n) == ""))
|
|
n = cutLine("<font color=\\\"red\\\"><b>", "</b></font>",n);
|
|
r = cutLine("<td align=\\\"center\\\" headers=\\\"STUDRATE\\\">", "</td>", gr);
|
|
r += " | Группа: " + cutLine("<td headers=\\\"GROUP_NAME\\\">","</td>", gr, true);
|
|
group.add(new groupList(n,"Общий балл: " + r));
|
|
i++;
|
|
}
|
|
gr = cutLine("</td></tr>\\n", "", gr);
|
|
}
|
|
ArrayAdapter<groupList> groupL = new groupAdapter(this);
|
|
ListView groupList = (ListView) findViewById(R.id.groupList);
|
|
groupList.setAdapter(groupL);
|
|
}
|
|
|
|
public void fillFaculty(){
|
|
faculty = new ArrayList<groupList>();
|
|
String n,r;
|
|
String fr = siteBuf;
|
|
fr = cutLine("<h1>Рейтинг в институте/факультете</h1>", "", fr);
|
|
int i = 0;
|
|
while ( !(cutLine("<tr><td align=\\\"center\\\" headers=\\\"ROWNUM\\\">","</tr>",fr,true) == "")){
|
|
Integer s = Integer.valueOf(cutLine("<td align=\\\"center\\\" headers=\\\"ROWNUM\\\">","</td>",fr));
|
|
if(s == (i+1)) {
|
|
n = cutLine("<td headers=\\\"STUDNAME\\\">", "</td>", fr);
|
|
if (!(cutLine("<font color=\\\"red\\\"><b>", "</b></font>", n) == ""))
|
|
n = cutLine("<font color=\\\"red\\\"><b>", "</b></font>",n);
|
|
r = cutLine("<td align=\\\"center\\\" headers=\\\"STUDRATE\\\">", "</td>", fr);
|
|
r += " | Группа: " + cutLine("<td headers=\\\"GROUP_NAME\\\">","</td>", fr, true);
|
|
faculty.add(new groupList(n,"Общий балл: " + r));
|
|
i++;
|
|
}
|
|
fr = cutLine("</td></tr>\\n", "", fr);
|
|
}
|
|
ArrayAdapter<groupList> facultyL = new facultyAdapter(this);
|
|
ListView facultyList = (ListView) findViewById(R.id.facultyList);
|
|
facultyList.setAdapter(facultyL);
|
|
}
|
|
|
|
|
|
//TODO: Переделать к хуям позор ниже
|
|
public void fillAll(){
|
|
String s;
|
|
String s2 = GroupRateHTML;
|
|
s = cutLine("<tr>","</tr>",GroupRateHTML);
|
|
s = cutLine("<font","</font>",s);
|
|
while (s.equals("")) {
|
|
s2 = cutLine("</tr>","",s2);
|
|
s = cutLine("<tr>","</tr>",s2);
|
|
s = cutLine("<font","</font>",s);
|
|
}
|
|
s2 = cutLine("<td align=\\\"center\\\" headers=\\\"ROWNUM\\\">","</td>",s2);
|
|
Log.i("GroupPos",s2);
|
|
positionGroup.setText("Место в группе: " + s2);
|
|
s = "";
|
|
s2 = FacultyRateHTML;
|
|
s = cutLine("<tr>","</tr>",FacultyRateHTML);
|
|
s = cutLine("<font","</font>",s);
|
|
while (s.equals("")) {
|
|
s2 = cutLine("</tr>","",s2);
|
|
s = cutLine("<tr>","</tr>",s2);
|
|
s = cutLine("<font","</font>",s);
|
|
}
|
|
s2 = cutLine("<td align=\\\"center\\\" headers=\\\"ROWNUM\\\">","</td>",s2);
|
|
Log.i("FacultyPos",s2);
|
|
positionFaculty.setText("Место в институте: " + s2);
|
|
}
|
|
|
|
public void buttonRefresh (View v) {
|
|
getHTML();
|
|
}
|
|
|
|
public void buttonLogout (View v) {
|
|
finish();
|
|
}
|
|
|
|
@TargetApi(19)
|
|
public void getHTML(){
|
|
|
|
browser.evaluateJavascript("javascript:document.documentElement.outerHTML;", new ValueCallback<String>() {
|
|
@Override
|
|
public void onReceiveValue(String s) {
|
|
siteBuf = s;
|
|
encodeHTML();
|
|
if(!authBegin) Auth();
|
|
else sessionState();
|
|
}
|
|
});
|
|
}
|
|
|
|
public void encodeHTML(){
|
|
if(siteBuf != null){
|
|
siteBuf = removeUTFCharacters(siteBuf).toString();
|
|
Log.d("Response html","Загружена страница "+cutLine("<title>","</title>",siteBuf));
|
|
Log.i("encodeHTML",siteBuf);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
private class MyWebViewClient extends WebViewClient {
|
|
@Override
|
|
public void onPageFinished(WebView view, String url) {
|
|
getHTML();
|
|
Log.i("onPageFinished",browser.getUrl());
|
|
}
|
|
}
|
|
}
|
|
|