|
|
@@ -44,6 +44,7 @@ import org.afinal.simplecache.ApiKey;
|
|
|
import org.greenrobot.eventbus.EventBus;
|
|
|
import org.greenrobot.eventbus.Subscribe;
|
|
|
|
|
|
+import java.lang.reflect.InvocationTargetException;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Locale;
|
|
|
@@ -78,6 +79,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
View check_net_ll;
|
|
|
@BindView(R.id.view_list)
|
|
|
RecyclerView view_list;
|
|
|
+ WebView find_information_content_wb;
|
|
|
@Override
|
|
|
public void initView() {
|
|
|
id = getIntent().getIntExtra("id", 0);
|
|
|
@@ -144,7 +146,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
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());
|
|
|
|
|
|
- WebView find_information_content_wb = itemView.findViewById(R.id.find_information_content_wb);
|
|
|
+ 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() {
|
|
|
@Override
|
|
|
@@ -431,6 +433,13 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
super.onResume();
|
|
|
taskHelper.onResume();
|
|
|
Aria.download(this).unRegister();
|
|
|
+ try {
|
|
|
+ if(find_information_content_wb != null){
|
|
|
+ find_information_content_wb.getClass().getMethod("onResume").invoke(find_information_content_wb, (Object[]) null);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -456,4 +465,16 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onPause() {
|
|
|
+ super.onPause();
|
|
|
+ if(find_information_content_wb != null){
|
|
|
+ try {
|
|
|
+ find_information_content_wb.getClass().getMethod("onPause").invoke(find_information_content_wb, (Object[])null);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|