コード例 #1
0
  private void loadDataByNetworkType() {

    if (NetWorkUtil.isNetWorkConnected(mActivity)) {
      loadData();
    } else {
      loadCache();
    }
  }
コード例 #2
0
 public PictureAdapter(
     Activity activity,
     LoadResultCallBack loadResultCallBack,
     LoadFinishCallBack loadFinisCallBack,
     Picture.PictureType type) {
   mActivity = activity;
   mType = type;
   mLoadFinisCallBack = loadFinisCallBack;
   mLoadResultCallBack = loadResultCallBack;
   pictures = new ArrayList<>();
   mRequestHandles = new ArrayList<>();
   isWifiConnected = NetWorkUtil.isWifiConnected(mActivity);
 }