Я хочу добавить прогресс в webView, но когда я попытался добавить индикатор выполнения, следуя this и this, но это настолько запутанно, что я не могу недооценить, что я новичок.Как добавить индикатор выполнения в tab2 webView
я хочу, чтобы добавить индикатор прогресса в моей TAB2 деятельности
package com.freerechargeapp.weebly.free_recharge_app;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
public class tab2 extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.tab2, container, false);
WebView webView = (WebView) view.findViewById(R.id.webview1);
webView.loadUrl("http://google.com");
return view;
}
}
вот мой tab2.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview1"
android:layout_height="match_parent"
android:layout_width="match_parent"
/>
<ProgressBar
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:id="@+id/progressBar1"/>
</RelativeLayout>
</LinearLayout>
http://javatechig.com/android/progressbar-while-loading-webv iew –
Пожалуйста, следуйте выше URL –
@IntelliJAmiya Это слишком запутанно, я новичок, я не могу этого понять. – Stevenjobs