|
@@ -1,15 +1,25 @@
|
|
|
package com.sheep.gamegroup.view.activity;
|
|
package com.sheep.gamegroup.view.activity;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
import android.app.Activity;
|
|
|
|
|
+import android.content.Context;
|
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
|
|
|
+import android.content.pm.ActivityInfo;
|
|
|
|
|
+import android.graphics.PixelFormat;
|
|
|
import android.support.v4.widget.SwipeRefreshLayout;
|
|
import android.support.v4.widget.SwipeRefreshLayout;
|
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
|
|
+import android.util.Log;
|
|
|
|
|
+import android.view.KeyEvent;
|
|
|
|
|
+import android.view.MotionEvent;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
import android.view.ViewGroup;
|
|
|
|
|
+import android.view.WindowManager;
|
|
|
|
|
+import android.webkit.WebChromeClient;
|
|
|
|
|
+import android.webkit.WebSettings;
|
|
|
import android.webkit.WebView;
|
|
import android.webkit.WebView;
|
|
|
import android.webkit.WebViewClient;
|
|
import android.webkit.WebViewClient;
|
|
|
|
|
+import android.widget.FrameLayout;
|
|
|
import android.widget.ImageView;
|
|
import android.widget.ImageView;
|
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
@@ -28,6 +38,7 @@ import com.sheep.gamegroup.util.DataUtil;
|
|
|
import com.sheep.gamegroup.util.GlideImageLoader;
|
|
import com.sheep.gamegroup.util.GlideImageLoader;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.gamegroup.util.ListUtil;
|
|
import com.sheep.gamegroup.util.ListUtil;
|
|
|
|
|
+import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.gamegroup.util.SysAppUtil;
|
|
import com.sheep.gamegroup.util.SysAppUtil;
|
|
|
import com.sheep.gamegroup.helper.TaskHelper;
|
|
import com.sheep.gamegroup.helper.TaskHelper;
|
|
|
import com.sheep.gamegroup.util.TimeUtil;
|
|
import com.sheep.gamegroup.util.TimeUtil;
|
|
@@ -44,7 +55,6 @@ import org.afinal.simplecache.ApiKey;
|
|
|
import org.greenrobot.eventbus.EventBus;
|
|
import org.greenrobot.eventbus.EventBus;
|
|
|
import org.greenrobot.eventbus.Subscribe;
|
|
import org.greenrobot.eventbus.Subscribe;
|
|
|
|
|
|
|
|
-import java.lang.reflect.InvocationTargetException;
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Locale;
|
|
import java.util.Locale;
|
|
@@ -63,7 +73,7 @@ import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_SHARE;
|
|
|
* Created by realicing on 2018/5/10.
|
|
* Created by realicing on 2018/5/10.
|
|
|
* realicing@sina.com
|
|
* realicing@sina.com
|
|
|
*/
|
|
*/
|
|
|
-public class ActFindInformation extends BaseActivity implements Action1<Integer>{
|
|
|
|
|
|
|
+public class ActFindInformation extends BaseActivity implements Action1<Integer> {
|
|
|
@Override
|
|
@Override
|
|
|
protected int getLayoutId() {
|
|
protected int getLayoutId() {
|
|
|
return R.layout.net_empty_fresh_list;
|
|
return R.layout.net_empty_fresh_list;
|
|
@@ -71,6 +81,19 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
|
|
private int id;
|
|
private int id;
|
|
|
|
|
|
|
|
|
|
+ private int k;
|
|
|
|
|
+ int width;
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 视频全屏参数
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ protected final FrameLayout.LayoutParams COVER_SCREEN_PARAMS = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
|
|
|
|
+ private View customView;
|
|
|
|
|
+ private FrameLayout fullscreenContainer;
|
|
|
|
|
+ private WebChromeClient.CustomViewCallback customViewCallback;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@BindView(R.id.refresh)
|
|
@BindView(R.id.refresh)
|
|
|
SwipeRefreshLayout refresh;
|
|
SwipeRefreshLayout refresh;
|
|
|
@BindView(R.id.empty_view)
|
|
@BindView(R.id.empty_view)
|
|
@@ -79,7 +102,8 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
View check_net_ll;
|
|
View check_net_ll;
|
|
|
@BindView(R.id.view_list)
|
|
@BindView(R.id.view_list)
|
|
|
RecyclerView view_list;
|
|
RecyclerView view_list;
|
|
|
- WebView find_information_content_wb;
|
|
|
|
|
|
|
+ WebView webView;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void initView() {
|
|
public void initView() {
|
|
|
id = getIntent().getIntExtra("id", 0);
|
|
id = getIntent().getIntExtra("id", 0);
|
|
@@ -92,7 +116,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
public void onClick(View view) {
|
|
|
FIND_SHARE.onEvent("find_id", id);
|
|
FIND_SHARE.onEvent("find_id", id);
|
|
|
- Jump2View.getInstance().tryShare(ActFindInformation.this,"find_share_url", "find_id", id);
|
|
|
|
|
|
|
+ Jump2View.getInstance().tryShare(ActFindInformation.this, "find_share_url", "find_id", id);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -107,16 +131,17 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
|
|
view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
|
|
|
- view_list.setAdapter(new AdbCommonRecycler<String>(SheepApp.getInstance(), list){
|
|
|
|
|
|
|
+ view_list.setAdapter(new AdbCommonRecycler<String>(SheepApp.getInstance(), list) {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public int getItemViewType(int position) {
|
|
public int getItemViewType(int position) {
|
|
|
return position;
|
|
return position;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public int getViewIdByType(int type) {//type来源于 getItemViewType 返回的值
|
|
public int getViewIdByType(int type) {//type来源于 getItemViewType 返回的值
|
|
|
String item = list.get(type);
|
|
String item = list.get(type);
|
|
|
- switch (item){
|
|
|
|
|
|
|
+ switch (item) {
|
|
|
case "top":
|
|
case "top":
|
|
|
return R.layout.find_information_top;
|
|
return R.layout.find_information_top;
|
|
|
case "bottom":
|
|
case "bottom":
|
|
@@ -127,7 +152,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void convert(ViewHolder holder, final String item) {
|
|
public void convert(ViewHolder holder, final String item) {
|
|
|
- switch (item){
|
|
|
|
|
|
|
+ switch (item) {
|
|
|
case "top":
|
|
case "top":
|
|
|
loadTop(holder.itemView);
|
|
loadTop(holder.itemView);
|
|
|
break;
|
|
break;
|
|
@@ -135,39 +160,188 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
loadBottom((ViewGroup) holder.itemView);
|
|
loadBottom((ViewGroup) holder.itemView);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- }});
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ public void initWebView() {
|
|
|
|
|
+ WebChromeClient wvcc = new WebChromeClient();
|
|
|
|
|
+ WebSettings webSettings = webView.getSettings();
|
|
|
|
|
+ webSettings.setJavaScriptEnabled(true);
|
|
|
|
|
+ webSettings.setUseWideViewPort(true); // 关键点
|
|
|
|
|
+ webSettings.setAllowFileAccess(true); // 允许访问文件
|
|
|
|
|
+ webSettings.setSupportZoom(true); // 支持缩放
|
|
|
|
|
+ webSettings.setLoadWithOverviewMode(true);//是否支持全屏
|
|
|
|
|
+ webSettings.setDomStorageEnabled(true);
|
|
|
|
|
+ webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); // 加载缓存内容
|
|
|
|
|
+ getWindow().setFormat(PixelFormat.TRANSLUCENT);
|
|
|
|
|
+ webView.setWebChromeClient(wvcc);
|
|
|
|
|
+ WebViewClient wvc = new WebViewClient() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
|
|
|
+ // webView.loadUrl(url);
|
|
|
|
|
+ Jump2View.getInstance().goWeb(ActFindInformation.this, url);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ webView.setWebChromeClient(new WebChromeClient() {
|
|
|
|
|
+
|
|
|
|
|
+ /**视频播放相关的方法*
|
|
|
|
|
+ *
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public View getVideoLoadingProgressView() {
|
|
|
|
|
+ FrameLayout frameLayout = new FrameLayout(ActFindInformation.this);
|
|
|
|
|
+ frameLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
|
|
|
|
+ return frameLayout;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onShowCustomView(View view, CustomViewCallback callback) {
|
|
|
|
|
+ showCustomView(view, callback);
|
|
|
|
|
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);//设置横屏
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onHideCustomView() {
|
|
|
|
|
+ hideCustomView();
|
|
|
|
|
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);//设置竖屏
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ webView.setWebViewClient(wvc);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 视频播放全屏
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+ private void showCustomView(View view, WebChromeClient.CustomViewCallback callback) {
|
|
|
|
|
+ // if a view already exists then immediately terminate the new one
|
|
|
|
|
+ if (customView != null) {
|
|
|
|
|
+ callback.onCustomViewHidden();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ ActFindInformation.this.getWindow().getDecorView();
|
|
|
|
|
+
|
|
|
|
|
+ FrameLayout decor = (FrameLayout) getWindow().getDecorView();
|
|
|
|
|
+ fullscreenContainer = new FullscreenHolder(ActFindInformation.this);
|
|
|
|
|
+ fullscreenContainer.addView(view, COVER_SCREEN_PARAMS);
|
|
|
|
|
+ decor.addView(fullscreenContainer, COVER_SCREEN_PARAMS);
|
|
|
|
|
+ customView = view;
|
|
|
|
|
+ setStatusBarVisibility(false);
|
|
|
|
|
+ customViewCallback = callback;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 隐藏视频全屏
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ private void hideCustomView() {
|
|
|
|
|
+ if (customView == null) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ setStatusBarVisibility(true);
|
|
|
|
|
+ FrameLayout decor = (FrameLayout) getWindow().getDecorView();
|
|
|
|
|
+ decor.removeView(fullscreenContainer);
|
|
|
|
|
+ fullscreenContainer = null;
|
|
|
|
|
+ customView = null;
|
|
|
|
|
+ customViewCallback.onCustomViewHidden();
|
|
|
|
|
+ webView.setVisibility(View.VISIBLE);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 全屏容器界面
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ class FullscreenHolder extends FrameLayout {
|
|
|
|
|
+
|
|
|
|
|
+ public FullscreenHolder(Context ctx) {
|
|
|
|
|
+ super(ctx);
|
|
|
|
|
+ setBackgroundColor(ctx.getResources().getColor(android.R.color.black));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public boolean onTouchEvent(MotionEvent evt) {
|
|
|
|
|
+ switch (evt.getAction()) {
|
|
|
|
|
+ case MotionEvent.ACTION_POINTER_UP:
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void setStatusBarVisibility(boolean visible) {
|
|
|
|
|
+ int flag = visible ? 0 : WindowManager.LayoutParams.FLAG_FULLSCREEN;
|
|
|
|
|
+ getWindow().setFlags(flag, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
|
|
|
|
+ Log.i("bar------", visible + "");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public boolean onKeyUp(int keyCode, KeyEvent event) {
|
|
|
|
|
+ switch (keyCode) {
|
|
|
|
|
+ case KeyEvent.KEYCODE_BACK:
|
|
|
|
|
+/**回退键 事件处理 优先级:
|
|
|
|
|
+ 视频播放全屏 - 网页回退 - 关闭页面*/
|
|
|
|
|
+
|
|
|
|
|
+ if (customView != null) {
|
|
|
|
|
+ hideCustomView();
|
|
|
|
|
+ } else if (webView.canGoBack()) {
|
|
|
|
|
+ webView.goBack();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ finish();
|
|
|
|
|
+ }
|
|
|
|
|
+ return true;
|
|
|
|
|
+ default:
|
|
|
|
|
+ return super.onKeyUp(keyCode, event);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
private void loadTop(View itemView) {
|
|
private void loadTop(View itemView) {
|
|
|
- TextView find_information_name = (TextView)itemView.findViewById(R.id.find_information_name);
|
|
|
|
|
- TextView find_information_time = (TextView)itemView.findViewById(R.id.find_information_time);
|
|
|
|
|
- TextView find_information_look = (TextView)itemView.findViewById(R.id.find_information_look);
|
|
|
|
|
|
|
+ TextView find_information_name = (TextView) itemView.findViewById(R.id.find_information_name);
|
|
|
|
|
+ TextView find_information_time = (TextView) itemView.findViewById(R.id.find_information_time);
|
|
|
|
|
+ TextView find_information_look = (TextView) itemView.findViewById(R.id.find_information_look);
|
|
|
ViewUtil.setText(find_information_name, findItem.getTitle());
|
|
ViewUtil.setText(find_information_name, findItem.getTitle());
|
|
|
ViewUtil.setText(find_information_time, String.format(Locale.CHINA, "发布时间:%s", TimeUtil.TimeStamp2Date(findItem.getCreated_at(), "yyyy-MM-dd HH:mm")));
|
|
ViewUtil.setText(find_information_time, String.format(Locale.CHINA, "发布时间:%s", TimeUtil.TimeStamp2Date(findItem.getCreated_at(), "yyyy-MM-dd HH:mm")));
|
|
|
ViewUtil.setText(find_information_look, findItem.getClicks());
|
|
ViewUtil.setText(find_information_look, findItem.getClicks());
|
|
|
|
|
|
|
|
- find_information_content_wb = itemView.findViewById(R.id.find_information_content_wb);
|
|
|
|
|
- ViewUtil.loadDataWithBaseURL(find_information_content_wb, findItem.getContent());
|
|
|
|
|
- find_information_content_wb.setWebViewClient(new WebViewClient() {
|
|
|
|
|
|
|
+ webView = itemView.findViewById(R.id.find_information_content_wb);
|
|
|
|
|
+ initWebView();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ ViewUtil.loadDataWithBaseURL(webView, findItem.getContent());
|
|
|
|
|
+ LogUtil.logI("结果为——-----" + findItem.getContent());
|
|
|
|
|
+ /* webView.setWebViewClient(new WebViewClient() {
|
|
|
@Override
|
|
@Override
|
|
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
|
Jump2View.getInstance().goWeb(ActFindInformation.this, url);
|
|
Jump2View.getInstance().goWeb(ActFindInformation.this, url);
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ });*/
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
private TaskHelper taskHelper = new TaskHelper(this);
|
|
private TaskHelper taskHelper = new TaskHelper(this);
|
|
|
private ViewGroup bottomViewGroup;
|
|
private ViewGroup bottomViewGroup;
|
|
|
|
|
+
|
|
|
private void loadBottom(ViewGroup viewGroup) {
|
|
private void loadBottom(ViewGroup viewGroup) {
|
|
|
bottomViewGroup = viewGroup;
|
|
bottomViewGroup = viewGroup;
|
|
|
- if(taskHelper.hasTask()) {
|
|
|
|
|
|
|
+ if (taskHelper.hasTask()) {
|
|
|
taskHelper.loadTask(viewGroup.getChildAt(0));
|
|
taskHelper.loadTask(viewGroup.getChildAt(0));
|
|
|
} else {
|
|
} else {
|
|
|
viewGroup.getChildAt(0).setVisibility(View.GONE);
|
|
viewGroup.getChildAt(0).setVisibility(View.GONE);
|
|
|
}
|
|
}
|
|
|
viewGroup.getChildAt(1).setVisibility(taskHelper.hasTask() && findApp != null ? View.VISIBLE : View.GONE);
|
|
viewGroup.getChildAt(1).setVisibility(taskHelper.hasTask() && findApp != null ? View.VISIBLE : View.GONE);
|
|
|
- if(findApp != null) {
|
|
|
|
|
|
|
+ if (findApp != null) {
|
|
|
loadGame(viewGroup.getChildAt(2));
|
|
loadGame(viewGroup.getChildAt(2));
|
|
|
} else {
|
|
} else {
|
|
|
viewGroup.getChildAt(2).setVisibility(View.GONE);
|
|
viewGroup.getChildAt(2).setVisibility(View.GONE);
|
|
@@ -176,22 +350,22 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
|
|
private void loadGame(View itemView) {
|
|
private void loadGame(View itemView) {
|
|
|
itemView.setVisibility(View.VISIBLE);
|
|
itemView.setVisibility(View.VISIBLE);
|
|
|
- ImageView find_information_game_icon = (ImageView)itemView.findViewById(R.id.find_information_game_icon);
|
|
|
|
|
- TextView find_information_game_name = (TextView)itemView.findViewById(R.id.find_information_game_name);
|
|
|
|
|
- TextView find_information_game_surplus = (TextView)itemView.findViewById(R.id.find_information_game_surplus);
|
|
|
|
|
- TextView find_information_game_time = (TextView)itemView.findViewById(R.id.find_information_game_time);
|
|
|
|
|
- TextView find_information_game_task_center = (TextView)itemView.findViewById(R.id.find_information_game_task_center);
|
|
|
|
|
|
|
+ ImageView find_information_game_icon = (ImageView) itemView.findViewById(R.id.find_information_game_icon);
|
|
|
|
|
+ TextView find_information_game_name = (TextView) itemView.findViewById(R.id.find_information_game_name);
|
|
|
|
|
+ TextView find_information_game_surplus = (TextView) itemView.findViewById(R.id.find_information_game_surplus);
|
|
|
|
|
+ TextView find_information_game_time = (TextView) itemView.findViewById(R.id.find_information_game_time);
|
|
|
|
|
+ TextView find_information_game_task_center = (TextView) itemView.findViewById(R.id.find_information_game_task_center);
|
|
|
GlideImageLoader.setGameImage(find_information_game_icon, findApp.getIcon());
|
|
GlideImageLoader.setGameImage(find_information_game_icon, findApp.getIcon());
|
|
|
ViewUtil.setText(find_information_game_name, findApp.getName());
|
|
ViewUtil.setText(find_information_game_name, findApp.getName());
|
|
|
final boolean isNeedReservation = !findApp.isCanDonload();//这里认为只有两种状态:可下载与预约下载
|
|
final boolean isNeedReservation = !findApp.isCanDonload();//这里认为只有两种状态:可下载与预约下载
|
|
|
ViewUtil.setText(find_information_game_surplus);
|
|
ViewUtil.setText(find_information_game_surplus);
|
|
|
- if(isNeedReservation)
|
|
|
|
|
|
|
+ if (isNeedReservation)
|
|
|
ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "开放时间:%s", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy-MM-dd\u0020HH:mm")));
|
|
ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "开放时间:%s", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy-MM-dd\u0020HH:mm")));
|
|
|
else
|
|
else
|
|
|
- ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "厂商:%s\u0020包体大小:%sM", findApp.getManufacturer(),findApp.getPackage_size()));
|
|
|
|
|
|
|
+ ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "厂商:%s\u0020包体大小:%sM", findApp.getManufacturer(), findApp.getPackage_size()));
|
|
|
find_information_game_task_center.setVisibility(View.VISIBLE);
|
|
find_information_game_task_center.setVisibility(View.VISIBLE);
|
|
|
|
|
|
|
|
- updateView(this,findApp, find_information_game_task_center);
|
|
|
|
|
|
|
+ updateView(this, findApp, find_information_game_task_center);
|
|
|
|
|
|
|
|
itemView.setOnClickListener(new View.OnClickListener() {
|
|
itemView.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
@Override
|
|
@@ -207,23 +381,24 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private List<String> list = ListUtil.emptyList();
|
|
private List<String> list = ListUtil.emptyList();
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void initData() {
|
|
public void initData() {
|
|
|
empty_view.setVisibility(View.INVISIBLE);
|
|
empty_view.setVisibility(View.INVISIBLE);
|
|
|
SysAppUtil.checkNet(new Action1<Integer>() {
|
|
SysAppUtil.checkNet(new Action1<Integer>() {
|
|
|
@Override
|
|
@Override
|
|
|
public void call(Integer result) {
|
|
public void call(Integer result) {
|
|
|
- if(result != 0){//无网络
|
|
|
|
|
- if(check_net_ll != null)
|
|
|
|
|
|
|
+ if (result != 0) {//无网络
|
|
|
|
|
+ if (check_net_ll != null)
|
|
|
check_net_ll.setVisibility(View.VISIBLE);
|
|
check_net_ll.setVisibility(View.VISIBLE);
|
|
|
} else {
|
|
} else {
|
|
|
- if(check_net_ll != null)
|
|
|
|
|
|
|
+ if (check_net_ll != null)
|
|
|
check_net_ll.setVisibility(View.GONE);
|
|
check_net_ll.setVisibility(View.GONE);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
FindItem data = DataUtil.getInstance().getCacheResult(ApiKey.articlesItem(id), FindItem.class);
|
|
FindItem data = DataUtil.getInstance().getCacheResult(ApiKey.articlesItem(id), FindItem.class);
|
|
|
- if(data != null){
|
|
|
|
|
|
|
+ if (data != null) {
|
|
|
loadFindItem(data);
|
|
loadFindItem(data);
|
|
|
}
|
|
}
|
|
|
SheepApp.getInstance().getNetComponent().getApiService().getFindDetail(id)
|
|
SheepApp.getInstance().getNetComponent().getApiService().getFindDetail(id)
|
|
@@ -233,7 +408,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.articlesItem(id));
|
|
boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.articlesItem(id));
|
|
|
- if(isNewData) {
|
|
|
|
|
|
|
+ if (isNewData) {
|
|
|
FindItem data = baseMessage.getData(FindItem.class);
|
|
FindItem data = baseMessage.getData(FindItem.class);
|
|
|
loadFindItem(data);
|
|
loadFindItem(data);
|
|
|
}
|
|
}
|
|
@@ -248,17 +423,17 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void loadFindItem(FindItem data) {
|
|
private void loadFindItem(FindItem data) {
|
|
|
- if(data != null){
|
|
|
|
|
|
|
+ if (data != null) {
|
|
|
taskHelper.clear();
|
|
taskHelper.clear();
|
|
|
findItem = data;
|
|
findItem = data;
|
|
|
list.clear();
|
|
list.clear();
|
|
|
list.add("top");
|
|
list.add("top");
|
|
|
list.add("bottom");
|
|
list.add("bottom");
|
|
|
notifyDataSetChanged();
|
|
notifyDataSetChanged();
|
|
|
- if(findItem.getRelease_task_id() != 0){//包含任务
|
|
|
|
|
|
|
+ if (findItem.getRelease_task_id() != 0) {//包含任务
|
|
|
taskHelper.initAcceptedTask(ActFindInformation.this, findItem.getRelease_task_id());
|
|
taskHelper.initAcceptedTask(ActFindInformation.this, findItem.getRelease_task_id());
|
|
|
}
|
|
}
|
|
|
- if(findItem.getApplication_id() != 0){//包含游戏
|
|
|
|
|
|
|
+ if (findItem.getApplication_id() != 0) {//包含游戏
|
|
|
initFindApp(findItem.getApplication_id());
|
|
initFindApp(findItem.getApplication_id());
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -267,9 +442,10 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private FindApp findApp;
|
|
private FindApp findApp;
|
|
|
|
|
+
|
|
|
private void initFindApp(int application_id) {
|
|
private void initFindApp(int application_id) {
|
|
|
FindApp cacheResult = DataUtil.getInstance().getCacheResult(ApiKey.applications(id), FindApp.class);
|
|
FindApp cacheResult = DataUtil.getInstance().getCacheResult(ApiKey.applications(id), FindApp.class);
|
|
|
- if(cacheResult != null){
|
|
|
|
|
|
|
+ if (cacheResult != null) {
|
|
|
findApp = cacheResult;
|
|
findApp = cacheResult;
|
|
|
notifyDataSetChanged();
|
|
notifyDataSetChanged();
|
|
|
}
|
|
}
|
|
@@ -280,7 +456,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.applications(id));
|
|
boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.applications(id));
|
|
|
- if(isNewData) {
|
|
|
|
|
|
|
+ if (isNewData) {
|
|
|
findApp = baseMessage.getData(FindApp.class);
|
|
findApp = baseMessage.getData(FindApp.class);
|
|
|
notifyDataSetChanged();
|
|
notifyDataSetChanged();
|
|
|
} else {
|
|
} else {
|
|
@@ -298,7 +474,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
|
|
private FindItem findItem;
|
|
private FindItem findItem;
|
|
|
|
|
|
|
|
- private void notifyDataSetChanged(){
|
|
|
|
|
|
|
+ private void notifyDataSetChanged() {
|
|
|
CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty());
|
|
CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty());
|
|
|
refresh.setRefreshing(false);
|
|
refresh.setRefreshing(false);
|
|
|
view_list.getAdapter().notifyDataSetChanged();
|
|
view_list.getAdapter().notifyDataSetChanged();
|
|
@@ -306,19 +482,21 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
|
|
|
|
|
|
|
private Map<String, TextView> downLoadTextViewMap = new HashMap<>();
|
|
private Map<String, TextView> downLoadTextViewMap = new HashMap<>();
|
|
|
|
|
+
|
|
|
//获取任务对应的TextView来更新进度
|
|
//获取任务对应的TextView来更新进度
|
|
|
private TextView getTextViewByTask(DownloadTask task) {
|
|
private TextView getTextViewByTask(DownloadTask task) {
|
|
|
return getTextViewByKey(task.getKey());
|
|
return getTextViewByKey(task.getKey());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
private TextView getTextViewByKey(String key) {
|
|
private TextView getTextViewByKey(String key) {
|
|
|
- if(downLoadTextViewMap.containsKey(key))
|
|
|
|
|
|
|
+ if (downLoadTextViewMap.containsKey(key))
|
|
|
return downLoadTextViewMap.get(key);
|
|
return downLoadTextViewMap.get(key);
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//更新按钮状态与添加点击事件
|
|
//更新按钮状态与添加点击事件
|
|
|
private void updateView(Activity activity, FindApp findApp, TextView textView) {
|
|
private void updateView(Activity activity, FindApp findApp, TextView textView) {
|
|
|
- if(findApp.isCanDonload()){//可下载
|
|
|
|
|
|
|
+ if (findApp.isCanDonload()) {//可下载
|
|
|
downLoadTextViewMap.put(findApp.getDownload_link(), textView);
|
|
downLoadTextViewMap.put(findApp.getDownload_link(), textView);
|
|
|
downLoadTextViewMap.put(findApp.getPackage_name(), textView);
|
|
downLoadTextViewMap.put(findApp.getPackage_name(), textView);
|
|
|
findApp.getFindAppHelper().updateDownloadTaskView(activity, findApp, textView);
|
|
findApp.getFindAppHelper().updateDownloadTaskView(activity, findApp, textView);
|
|
@@ -329,79 +507,91 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
|
|
//下载状态监听
|
|
//下载状态监听
|
|
|
|
|
|
|
|
- @Download.onPre void onPre(DownloadTask task) {
|
|
|
|
|
|
|
+ @Download.onPre
|
|
|
|
|
+ void onPre(DownloadTask task) {
|
|
|
TextView textView = getTextViewByTask(task);
|
|
TextView textView = getTextViewByTask(task);
|
|
|
- if(textView != null) {
|
|
|
|
|
|
|
+ if (textView != null) {
|
|
|
textView.setText("准备下载中");
|
|
textView.setText("准备下载中");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Download.onTaskStart void taskStart(DownloadTask task) {
|
|
|
|
|
|
|
+ @Download.onTaskStart
|
|
|
|
|
+ void taskStart(DownloadTask task) {
|
|
|
TextView textView = getTextViewByTask(task);
|
|
TextView textView = getTextViewByTask(task);
|
|
|
- if(textView != null) {
|
|
|
|
|
|
|
+ if (textView != null) {
|
|
|
textView.setText("开始下载中");
|
|
textView.setText("开始下载中");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- @Download.onTaskResume void taskResume(DownloadTask task) {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @Download.onTaskResume
|
|
|
|
|
+ void taskResume(DownloadTask task) {
|
|
|
TextView textView = getTextViewByTask(task);
|
|
TextView textView = getTextViewByTask(task);
|
|
|
- if(textView != null) {
|
|
|
|
|
|
|
+ if (textView != null) {
|
|
|
textView.setText("恢复下载中");
|
|
textView.setText("恢复下载中");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
//在这里处理任务执行中的状态,如进度进度条的刷新
|
|
//在这里处理任务执行中的状态,如进度进度条的刷新
|
|
|
- @Download.onTaskRunning protected void running(DownloadTask task) {
|
|
|
|
|
|
|
+ @Download.onTaskRunning
|
|
|
|
|
+ protected void running(DownloadTask task) {
|
|
|
TextView textView = getTextViewByTask(task);
|
|
TextView textView = getTextViewByTask(task);
|
|
|
- if(textView != null) {
|
|
|
|
|
|
|
+ if (textView != null) {
|
|
|
textView.setText(String.format(Locale.CHINA, "%d%%", Math.abs(task.getPercent())));
|
|
textView.setText(String.format(Locale.CHINA, "%d%%", Math.abs(task.getPercent())));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Download.onTaskStop void taskStop(DownloadTask task) {
|
|
|
|
|
|
|
+ @Download.onTaskStop
|
|
|
|
|
+ void taskStop(DownloadTask task) {
|
|
|
TextView textView = getTextViewByTask(task);
|
|
TextView textView = getTextViewByTask(task);
|
|
|
- if(textView != null) {
|
|
|
|
|
|
|
+ if (textView != null) {
|
|
|
textView.setText(CommonUtil.CONTINUE_DOWNLOAD);
|
|
textView.setText(CommonUtil.CONTINUE_DOWNLOAD);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Download.onNoSupportBreakPoint void onNoSupportBreakPoint(DownloadTask task) {
|
|
|
|
|
|
|
+ @Download.onNoSupportBreakPoint
|
|
|
|
|
+ void onNoSupportBreakPoint(DownloadTask task) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Download.onTaskCancel void taskCancel(DownloadTask task) {
|
|
|
|
|
|
|
+ @Download.onTaskCancel
|
|
|
|
|
+ void taskCancel(DownloadTask task) {
|
|
|
TextView textView = getTextViewByTask(task);
|
|
TextView textView = getTextViewByTask(task);
|
|
|
- if(textView != null) {
|
|
|
|
|
|
|
+ if (textView != null) {
|
|
|
textView.setText("已经取消");
|
|
textView.setText("已经取消");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Download.onTaskFail void taskFail(DownloadTask task) {
|
|
|
|
|
|
|
+ @Download.onTaskFail
|
|
|
|
|
+ void taskFail(DownloadTask task) {
|
|
|
TextView textView = getTextViewByTask(task);
|
|
TextView textView = getTextViewByTask(task);
|
|
|
- if(textView != null) {
|
|
|
|
|
|
|
+ if (textView != null) {
|
|
|
textView.setText(CommonUtil.FAIL_DOWNLOAD);
|
|
textView.setText(CommonUtil.FAIL_DOWNLOAD);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Download.onTaskComplete void taskComplete(DownloadTask task) {
|
|
|
|
|
|
|
+ @Download.onTaskComplete
|
|
|
|
|
+ void taskComplete(DownloadTask task) {
|
|
|
TextView textView = getTextViewByTask(task);
|
|
TextView textView = getTextViewByTask(task);
|
|
|
- if(textView != null) {
|
|
|
|
|
|
|
+ if (textView != null) {
|
|
|
textView.setText(CommonUtil.START_INSTALL);
|
|
textView.setText(CommonUtil.START_INSTALL);
|
|
|
}
|
|
}
|
|
|
- if(findApp != null && TextUtils.equals(task.getKey(), findApp.getDownload_link()))
|
|
|
|
|
|
|
+ if (findApp != null && TextUtils.equals(task.getKey(), findApp.getDownload_link()))
|
|
|
findApp.updateState(DownloadTaskService.STATUS_FINISH);
|
|
findApp.updateState(DownloadTaskService.STATUS_FINISH);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@Subscribe
|
|
@Subscribe
|
|
|
public void onEventMainThread(Intent intent) {
|
|
public void onEventMainThread(Intent intent) {
|
|
|
- if(intent != null && intent.getAction() != null && intent.getDataString() != null && intent.getDataString().contains("package:")){
|
|
|
|
|
- String packageName = intent.getDataString().replace("package:","");
|
|
|
|
|
|
|
+ if (intent != null && intent.getAction() != null && intent.getDataString() != null && intent.getDataString().contains("package:")) {
|
|
|
|
|
+ String packageName = intent.getDataString().replace("package:", "");
|
|
|
|
|
|
|
|
TextView textView = getTextViewByKey(packageName);
|
|
TextView textView = getTextViewByKey(packageName);
|
|
|
- if(textView != null) {
|
|
|
|
|
- switch (intent.getAction()){
|
|
|
|
|
|
|
+ if (textView != null) {
|
|
|
|
|
+ switch (intent.getAction()) {
|
|
|
case ACTION_PACKAGE_ADDED:
|
|
case ACTION_PACKAGE_ADDED:
|
|
|
textView.setText(CommonUtil.GAME_OPEN);
|
|
textView.setText(CommonUtil.GAME_OPEN);
|
|
|
break;
|
|
break;
|
|
|
case ACTION_PACKAGE_REMOVED:
|
|
case ACTION_PACKAGE_REMOVED:
|
|
|
String path = PackageUtil.isExistsFile(packageName);
|
|
String path = PackageUtil.isExistsFile(packageName);
|
|
|
- if(TextUtils.isEmpty(path)) {
|
|
|
|
|
|
|
+ if (TextUtils.isEmpty(path)) {
|
|
|
textView.setText(CommonUtil.START_DOWNLOAD);
|
|
textView.setText(CommonUtil.START_DOWNLOAD);
|
|
|
} else {
|
|
} else {
|
|
|
textView.setText(CommonUtil.START_INSTALL);
|
|
textView.setText(CommonUtil.START_INSTALL);
|
|
@@ -410,14 +600,14 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(findApp != null && TextUtils.equals(packageName, findApp.getPackage_names())){
|
|
|
|
|
- switch (intent.getAction()){
|
|
|
|
|
|
|
+ if (findApp != null && TextUtils.equals(packageName, findApp.getPackage_names())) {
|
|
|
|
|
+ switch (intent.getAction()) {
|
|
|
case ACTION_PACKAGE_ADDED:
|
|
case ACTION_PACKAGE_ADDED:
|
|
|
findApp.updateState(DownloadTaskService.STATUS_INSTALLED);
|
|
findApp.updateState(DownloadTaskService.STATUS_INSTALLED);
|
|
|
break;
|
|
break;
|
|
|
case ACTION_PACKAGE_REMOVED:
|
|
case ACTION_PACKAGE_REMOVED:
|
|
|
String path = PackageUtil.isExistsFile(packageName);
|
|
String path = PackageUtil.isExistsFile(packageName);
|
|
|
- if(TextUtils.isEmpty(path)) {
|
|
|
|
|
|
|
+ if (TextUtils.isEmpty(path)) {
|
|
|
findApp.updateState(DownloadTaskService.STATUS_INIT);
|
|
findApp.updateState(DownloadTaskService.STATUS_INIT);
|
|
|
} else {
|
|
} else {
|
|
|
findApp.updateState(DownloadTaskService.STATUS_FINISH);
|
|
findApp.updateState(DownloadTaskService.STATUS_FINISH);
|
|
@@ -428,14 +618,17 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
protected void onResume() {
|
|
protected void onResume() {
|
|
|
super.onResume();
|
|
super.onResume();
|
|
|
taskHelper.onResume();
|
|
taskHelper.onResume();
|
|
|
Aria.download(this).unRegister();
|
|
Aria.download(this).unRegister();
|
|
|
try {
|
|
try {
|
|
|
- if(find_information_content_wb != null){
|
|
|
|
|
- find_information_content_wb.getClass().getMethod("onResume").invoke(find_information_content_wb, (Object[]) null);
|
|
|
|
|
|
|
+ if (webView != null) {
|
|
|
|
|
+ webView.resumeTimers();
|
|
|
|
|
+ webView.onResume();
|
|
|
|
|
+ webView.getClass().getMethod("onResume").invoke(webView, (Object[]) null);
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
@@ -445,21 +638,31 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
@Override
|
|
@Override
|
|
|
protected void onDestroy() {
|
|
protected void onDestroy() {
|
|
|
super.onDestroy();
|
|
super.onDestroy();
|
|
|
|
|
+ LogUtil.logI("释放资源");
|
|
|
EventBus.getDefault().unregister(this);
|
|
EventBus.getDefault().unregister(this);
|
|
|
- taskHelper.onDestroy();
|
|
|
|
|
|
|
+ taskHelper.destroy();
|
|
|
|
|
+ if (webView != null) {
|
|
|
|
|
+ webView.onPause();
|
|
|
|
|
+ webView.freeMemory();
|
|
|
|
|
+ webView.removeAllViews();
|
|
|
|
|
+ webView.destroy();
|
|
|
|
|
+ webView = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ ActFindInformation.this.finish();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void call(Integer integer) {
|
|
public void call(Integer integer) {
|
|
|
- switch (integer){
|
|
|
|
|
|
|
+ switch (integer) {
|
|
|
case 1://刷新底部
|
|
case 1://刷新底部
|
|
|
loadBottom(bottomViewGroup);
|
|
loadBottom(bottomViewGroup);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@Subscribe
|
|
@Subscribe
|
|
|
- public void onEventMainThread(BigEvent event){
|
|
|
|
|
- switch (event.getEventTypes()){
|
|
|
|
|
|
|
+ public void onEventMainThread(BigEvent event) {
|
|
|
|
|
+ switch (event.getEventTypes()) {
|
|
|
case ONFRESH_TRYMAKEMANY_PAGE:
|
|
case ONFRESH_TRYMAKEMANY_PAGE:
|
|
|
taskHelper.refreshTask();
|
|
taskHelper.refreshTask();
|
|
|
break;
|
|
break;
|
|
@@ -469,9 +672,11 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
@Override
|
|
@Override
|
|
|
protected void onPause() {
|
|
protected void onPause() {
|
|
|
super.onPause();
|
|
super.onPause();
|
|
|
- if(find_information_content_wb != null){
|
|
|
|
|
|
|
+ if (webView != null) {
|
|
|
|
|
+ webView.onPause();
|
|
|
|
|
+ webView.pauseTimers();
|
|
|
try {
|
|
try {
|
|
|
- find_information_content_wb.getClass().getMethod("onPause").invoke(find_information_content_wb, (Object[])null);
|
|
|
|
|
|
|
+ webView.getClass().getMethod("onPause").invoke(webView, (Object[]) null);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|