99偷拍视频精品区一区二,口述久久久久久久久久久久,国产精品夫妇激情啪发布,成人永久免费网站在线观看,国产精品高清免费在线,青青草在线观看视频观看,久久久久久国产一区,天天婷婷久久18禁,日韩动漫av在线播放直播

Android仿微信公眾號文章頁面加載進度條的實現方法-創新互聯

這篇文章將為大家詳細講解有關Android仿微信公眾號文章頁面加載進度條的實現方法,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。

目前創新互聯公司已為超過千家的企業提供了網站建設、域名、虛擬空間、網站托管運營、企業網站設計、渝水網站維護等服務,公司將堅持客戶導向、應用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協力一起成長,共同發展。

詳細實現步驟如下 :

1、自定義一個ProgressWebView 繼續 Webview

@SuppressWarnings("deprecation")
public class ProgressWebView extends WebView {

 private ProgressBar progressbar;

 public ProgressWebView(Context context) {
 super(context);
 init(context);
 }

 private void init(Context context) {
 progressbar = new ProgressBar(context, null,
  android.R.attr.progressBarStyleHorizontal);
 progressbar.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
  6, 0, 0));
 progressbar.setProgressDrawable(this.getResources().getDrawable(
  R.drawable.btn_progress_webview));
 addView(progressbar);
 setWebChromeClient(new WebChromeClient());
 }

 public ProgressWebView(Context context, AttributeSet attrs) {
 super(context, attrs);
 init(context);
 }

 public class WebChromeClient extends android.webkit.WebChromeClient {
 @Override
 public void onProgressChanged(WebView view, int newProgress) {
  if (newProgress == 100) {
  progressbar.setVisibility(GONE);
  } else {
  if (progressbar.getVisibility() == GONE)
   progressbar.setVisibility(VISIBLE);
  progressbar.setProgress(newProgress);
  }
  super.onProgressChanged(view, newProgress);
 }

 }

 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
 LayoutParams lp = (LayoutParams) progressbar.getLayoutParams();
 lp.x = l;
 lp.y = t;
 progressbar.setLayoutParams(lp);
 super.onScrollChanged(l, t, oldl, oldt);
 }
}

本文名稱:Android仿微信公眾號文章頁面加載進度條的實現方法-創新互聯
鏈接地址:http://www.yijiale78.com/article30/dddhpo.html

成都網站建設公司_創新互聯,為您提供面包屑導航微信小程序域名注冊外貿網站建設網站內鏈標簽優化

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

h5響應式網站建設