RecommendFragment.java 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. package com.edufound.reader.fragment;
  2. import android.animation.AnimatorSet;
  3. import android.animation.ObjectAnimator;
  4. import android.os.Bundle;
  5. import android.text.TextUtils;
  6. import android.view.View;
  7. import android.view.ViewGroup;
  8. import android.view.animation.LinearInterpolator;
  9. import android.widget.FrameLayout;
  10. import android.widget.ImageView;
  11. import android.widget.LinearLayout;
  12. import android.widget.TextView;
  13. import androidx.annotation.NonNull;
  14. import androidx.recyclerview.widget.RecyclerView;
  15. import com.baidu.duer.bot.directive.payload.AmountInfo;
  16. import com.baidu.duer.botsdk.BotIntent;
  17. import com.edufound.reader.R;
  18. import com.edufound.reader.activity.CommentActivity;
  19. import com.edufound.reader.activity.OthersRecordActivity;
  20. import com.edufound.reader.activity.RecordActivity;
  21. import com.edufound.reader.base.BaseActivity;
  22. import com.edufound.reader.base.BaseMvpFragment;
  23. import com.edufound.reader.bean.ChannelCodeEnum;
  24. import com.edufound.reader.bean.UserEventEnum;
  25. import com.edufound.reader.bean.UserRecordBean;
  26. import com.edufound.reader.contract.RecommendFragmentContract;
  27. import com.edufound.reader.cusview.CusToast;
  28. import com.edufound.reader.presenter.PopWindowPresneter;
  29. import com.edufound.reader.presenter.RecommendFragmentPresenter;
  30. import com.edufound.reader.util.Consts;
  31. import com.edufound.reader.util.DeviceUtil;
  32. import com.edufound.reader.util.EfunboxUtil;
  33. import com.edufound.reader.util.FloatingAnimation;
  34. import com.edufound.reader.util.GlideUtils;
  35. import com.edufound.reader.util.MMKVUtil;
  36. import com.orhanobut.logger.Logger;
  37. import com.ufreedom.floatingview.Floating;
  38. import com.ufreedom.floatingview.FloatingBuilder;
  39. import com.ufreedom.floatingview.FloatingElement;
  40. import java.util.HashMap;
  41. import cn.jzvd.Jzvd;
  42. import io.reactivex.rxjava3.annotations.Nullable;
  43. public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresenter> implements RecommendFragmentContract.View {
  44. View mRootView;
  45. FrameLayout mREcommendLayout;
  46. RecyclerView mRecyclerView;
  47. FrameLayout mUserHeadLayout;
  48. FrameLayout mCommentLayout;
  49. FrameLayout mCollectionLayout;
  50. FrameLayout mThumbsLayout;
  51. LinearLayout mToRecordLayout;
  52. ImageView mVideoUp;
  53. ImageView mVideoNext;
  54. ObjectAnimator mRotationImgAnim;
  55. ImageView mToRecordRotationbg;
  56. ObjectAnimator mToRecordScaleXAnim;
  57. ObjectAnimator mToRecordScaleYAnim;
  58. ImageView mToRecordScaleIcon;
  59. ImageView mUserHead;
  60. TextView mUserPhone;
  61. TextView mCommentCount;
  62. TextView mCollentStatus;
  63. TextView mUserReadNum;
  64. TextView mThumbCount;
  65. ImageView mCollectIconView;
  66. ImageView isFollow;
  67. ImageView mThumbIconView;
  68. ImageView isUserVip;
  69. FrameLayout mUserReadCountLayout;
  70. //默认是推荐 mFragmentType=0
  71. //关注 mFragmentType=1
  72. //官方的 mFragmentType=2
  73. //关注的人的mFragmentType=3
  74. int mFragmentType = 0;
  75. boolean hideBottom = false;
  76. int startPosition = 0;
  77. String mDataJson = null;
  78. String intoPage;
  79. float mRootViewScaleX = 0;
  80. float mRootViewScaleY = 0;
  81. boolean isShowReadCount = false;
  82. ChangeCharacterListener mChangeCharacterListener;
  83. public RecommendFragment(int type) {
  84. mFragmentType = type;
  85. }
  86. public RecommendFragment() {
  87. }
  88. @Override
  89. protected void initView(View view) {
  90. mRootView = view;
  91. mRootView.setVisibility(View.INVISIBLE);
  92. mPresenter = new RecommendFragmentPresenter(getContext());
  93. mPresenter.attachView(this);
  94. mREcommendLayout = view.findViewById(R.id.fragment_recommend_layout);
  95. mRecyclerView = view.findViewById(R.id.fragment_recommend_recyclerview);
  96. mUserHeadLayout = view.findViewById(R.id.fragment_recommend_user_head_layout);
  97. mCommentLayout = view.findViewById(R.id.fragment_recommend_comment_layout);
  98. mCollectionLayout = view.findViewById(R.id.fragment_recommend_collection_layout);
  99. mThumbsLayout = view.findViewById(R.id.fragment_recommend_thumbs_layout);
  100. mVideoUp = view.findViewById(R.id.fragment_recommend_video_up);
  101. mVideoNext = view.findViewById(R.id.fragment_recommend_video_next);
  102. mToRecordLayout = view.findViewById(R.id.fragment_recommend_to_record_layout);
  103. mUserHead = view.findViewById(R.id.fragment_recommend_user_head);
  104. mUserPhone = view.findViewById(R.id.fragment_recommend_user_phone);
  105. mCommentCount = view.findViewById(R.id.fragment_recommend_comment_num);
  106. mCollentStatus = view.findViewById(R.id.fragment_recommend_collection_status);
  107. mThumbCount = view.findViewById(R.id.fragment_recommend_thumbs_num);
  108. mCollectIconView = view.findViewById(R.id.fragment_recommend_collection_icon);
  109. mThumbIconView = view.findViewById(R.id.fragment_recommend_thumbs_icon);
  110. isFollow = view.findViewById(R.id.fragment_main_recommend_isfollow);
  111. isUserVip = view.findViewById(R.id.fragment_recommend_app_user_isvip);
  112. mUserReadCountLayout = view.findViewById(R.id.fragment_recommend_userread_count_layout);
  113. mUserReadNum = view.findViewById(R.id.fragment_recommend_userread_num);
  114. mUserReadCountLayout.setVisibility(View.GONE);
  115. if (!Consts.getUMengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
  116. //不是百度渠道得增加动画
  117. int scaleTime = 0;
  118. int rotateTime = 0;
  119. scaleTime = 1000;
  120. rotateTime = 1500;
  121. mToRecordRotationbg = mToRecordLayout.findViewById(R.id.fragment_recommend_to_record_bg);
  122. mRotationImgAnim = ObjectAnimator.ofFloat(mToRecordRotationbg, "rotation", 0.0F, 359.0F);
  123. mRotationImgAnim.setRepeatCount(-1);
  124. mRotationImgAnim.setDuration(rotateTime);
  125. LinearInterpolator interpolator = new LinearInterpolator();
  126. mRotationImgAnim.setInterpolator(interpolator); //设置匀速旋转,不卡顿 icon_anim.start();
  127. mRotationImgAnim.start();
  128. // 录音按钮缩小放大
  129. mToRecordScaleIcon = mToRecordLayout.findViewById(R.id.fragment_recommend_to_record_icon);
  130. mToRecordScaleXAnim = ObjectAnimator.ofFloat(mToRecordScaleIcon, "scaleX", 1F, 1.2F);//设置Y轴的立体旋转动画
  131. mToRecordScaleXAnim.setRepeatCount(-1);
  132. mToRecordScaleXAnim.setRepeatMode(ObjectAnimator.REVERSE);
  133. mToRecordScaleXAnim.setDuration(scaleTime);
  134. LinearInterpolator interpolator2 = new LinearInterpolator();
  135. mToRecordScaleXAnim.setInterpolator(interpolator2); //设置匀速旋转,不卡顿 icon_anim.start();
  136. mToRecordScaleYAnim = ObjectAnimator.ofFloat(mToRecordScaleIcon, "scaleY", 1F, 1.2F);//设置Y轴的立体旋转动画
  137. mToRecordScaleYAnim.setRepeatCount(-1);
  138. mToRecordScaleYAnim.setRepeatMode(ObjectAnimator.REVERSE);
  139. mToRecordScaleYAnim.setDuration(scaleTime);
  140. mToRecordScaleYAnim.setInterpolator(interpolator2); //设置匀速旋转,不卡顿 icon_anim.start();
  141. AnimatorSet animatorSet = new AnimatorSet();
  142. animatorSet.play(mToRecordScaleXAnim).with(mToRecordScaleYAnim);
  143. animatorSet.start();
  144. }
  145. }
  146. @Override
  147. protected int getLayoutId() {
  148. return R.layout.fragment_main_recommend;
  149. }
  150. public RecommendFragmentPresenter getPresenter() {
  151. return mPresenter;
  152. }
  153. @Override
  154. protected void initViewListener() {
  155. if (Consts.getUMengChannel().equals(ChannelCodeEnum.MISOUND.getChannelCode())) {
  156. //小米渠道,加个回调监听
  157. EfunboxUtil.setMISoundLoginCallBack(new PopWindowPresneter.MISoundLoginCallBack() {
  158. @Override
  159. public void success() {
  160. if (EfunboxUtil.checkIsVip()) {
  161. if (isUserVip != null) {
  162. isUserVip.setVisibility(View.INVISIBLE);
  163. }
  164. }
  165. EfunboxUtil.clearMISoundLoginCallBack();
  166. }
  167. @Override
  168. public void closeWindow() {
  169. }
  170. });
  171. }
  172. if (mRootViewScaleX > 0) {
  173. mREcommendLayout.setScaleX(mRootViewScaleX);
  174. }
  175. if (mRootViewScaleY > 0) {
  176. mREcommendLayout.setScaleY(mRootViewScaleY);
  177. }
  178. if (hideBottom) {
  179. mVideoUp.setVisibility(View.GONE);
  180. mVideoNext.setVisibility(View.GONE);
  181. } else {
  182. addUiClickListener(mVideoUp, o -> {
  183. mPresenter.scrollToUpFunction(mRecyclerView);
  184. });
  185. addUiClickListener(mVideoNext, o -> {
  186. mPresenter.checkIsOver();
  187. mPresenter.scrollToNextFunction(mRecyclerView, true);
  188. // mPresenter.toNext(mRecyclerView);
  189. });
  190. }
  191. addUiClickListener(mToRecordLayout, o -> {
  192. mPresenter.getUserApi().postUserEvent(getActivity(), UserEventEnum.EVENT_RECREAD.getEvent());
  193. if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
  194. //登陆了,判断是否是VIP
  195. if (EfunboxUtil.checkIsVip()) {
  196. //如果是VIP
  197. if (!TextUtils.isEmpty(mPresenter.getCurVideoExampleId().toString())) {
  198. Bundle bundle = new Bundle();
  199. bundle.putString("exampleId", mPresenter.getCurVideoExampleId().toString());
  200. toNextActivity(RecordActivity.class, bundle);
  201. } else {
  202. CusToast.getInstance(getContext()).show("视频id出现问题", 1000);
  203. }
  204. } else {
  205. EfunboxUtil.userPay(getActivity());
  206. }
  207. }
  208. });
  209. mPresenter.initVideoList(mRecyclerView, mFragmentType, startPosition);
  210. }
  211. @Override
  212. public void showLoading() {
  213. }
  214. @Override
  215. public void hideLoading() {
  216. }
  217. @Override
  218. public void onError(String errMessage) {
  219. }
  220. @Override
  221. public void onPause() {
  222. mPresenter.fragmentPause(mRecyclerView);
  223. super.onPause();
  224. }
  225. @Override
  226. public void onResume() {
  227. mPresenter.fragmentResume(mRecyclerView);
  228. if (EfunboxUtil.checkIsVip()) {
  229. if (isUserVip != null) {
  230. isUserVip.setVisibility(View.INVISIBLE);
  231. }
  232. }
  233. super.onResume();
  234. }
  235. @Override
  236. public ViewGroup getRootView() {
  237. return (ViewGroup) mRootView;
  238. }
  239. public void hiddenBottomView() {
  240. hideBottom = true;
  241. }
  242. public void setLayoutViewScale(float x, float y) {
  243. mRootViewScaleX = x;
  244. mRootViewScaleY = y;
  245. }
  246. public void showUserReadCount(boolean bool) {
  247. isShowReadCount = bool;
  248. }
  249. public void scrollPosition(int position) {
  250. startPosition = position;
  251. }
  252. public void setDataJson(String json) {
  253. mDataJson = json;
  254. }
  255. public void setInToPage(String page) {
  256. intoPage = page;
  257. }
  258. @Override
  259. public void setTopStatus(UserRecordBean bean) {
  260. //设置信息和点赞数等
  261. if (bean.getUser().getAvatar() == null || bean.getUser().getAvatar().equals("")) {
  262. if (bean.getUser().getGender().equals("1")) {
  263. //男
  264. GlideUtils.loadImage(getActivity(), R.drawable.activity_userinfo_setting_boy, mUserHead);
  265. } else {
  266. GlideUtils.loadImage(getActivity(), R.drawable.activity_userinfo_setting_girl, mUserHead);
  267. }
  268. } else {
  269. GlideUtils.loadCircleImage(getActivity(), bean.getUser().getAvatar(), mUserHead);
  270. }
  271. if (bean.getUser().getNickName().length() > 6) {
  272. mUserPhone.setText(bean.getUser().getNickName().substring(0, 6) + "...");
  273. } else {
  274. mUserPhone.setText(bean.getUser().getNickName());
  275. }
  276. mCommentCount.setText(bean.getUserRead().getCommentAmount());
  277. if (isShowReadCount) {
  278. mUserReadCountLayout.setVisibility(View.VISIBLE);
  279. addUiClickListener(mUserReadCountLayout, o -> {
  280. mPresenter.getListByExampleId(bean.getUserRead().getExampleId());
  281. });
  282. mUserReadNum.setText(EfunboxUtil.checkNum10000(bean.getUserRead().getReadAmount()));
  283. }
  284. if (bean.getIsFavorites() || bean.getFavoritesBean() != null) {
  285. mCollentStatus.setText("已收藏");
  286. mCollectIconView.setImageResource(R.drawable.fragment_recommend_collection_icon_s);
  287. } else {
  288. mCollentStatus.setText("未收藏");
  289. mCollectIconView.setImageResource(R.drawable.fragment_recommend_collection_icon);
  290. }
  291. if (bean.getIsLike()) {
  292. mThumbIconView.setImageResource(R.drawable.fragment_recommend_thumbs_up_s);
  293. } else {
  294. mThumbIconView.setImageResource(R.drawable.fragment_recommend_thumbs_up);
  295. }
  296. if (!bean.getUserRead().getTag().equals("ACTIVITY")) {
  297. isFollow.setVisibility(View.INVISIBLE);
  298. mUserHeadLayout.setClickable(true);
  299. addUiClickListener(mUserHeadLayout, o -> {
  300. if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
  301. Bundle bundle = new Bundle();
  302. bundle.putString("other_uid", bean.getUser().getUid());
  303. bundle.putString("record_id", bean.getUserRead().getId());
  304. bundle.putString("intoPage", "RecommendFragment");
  305. toNextActivity(OthersRecordActivity.class, bundle);
  306. }
  307. });
  308. } else {
  309. mUserHeadLayout.setClickable(false);
  310. }
  311. if (bean.getUser().getUid().equals(Consts.getUID()) || bean.getUser().getProfession().equals("官方")) {
  312. //是自己
  313. isFollow.setVisibility(View.INVISIBLE);
  314. } else {
  315. if (bean.getIsFans()) {
  316. isFollow.setVisibility(View.INVISIBLE);
  317. } else {
  318. isFollow.setVisibility(View.VISIBLE);
  319. }
  320. }
  321. addUiClickListener(mCollectionLayout, o -> {
  322. //收藏
  323. if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
  324. mPresenter.doFavorites(bean.getUserRead());
  325. }
  326. });
  327. addUiClickListener(mThumbsLayout, o -> {
  328. //点赞
  329. if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
  330. mPresenter.doLike(bean.getUserRead());
  331. ImageView imageView = new ImageView(getActivity());
  332. imageView.setLayoutParams(new ViewGroup.LayoutParams(mThumbIconView.getMeasuredWidth(), mThumbIconView.getMeasuredHeight()));
  333. imageView.setImageDrawable(mThumbIconView.getDrawable());
  334. Floating floating = new Floating(getActivity());
  335. FloatingElement builder = new FloatingBuilder()
  336. .anchorView(mThumbIconView)
  337. .targetView(imageView)
  338. .offsetX(0)
  339. .offsetY(0)
  340. .floatingTransition(new FloatingAnimation.PlaneFloating(DeviceUtil.getHeight(getActivity())))
  341. .build();
  342. floating.startFloating(builder);
  343. }
  344. });
  345. mThumbCount.setText(bean.getUserRead().getLikeAmount());
  346. addUiClickListener(mCommentLayout, o -> {
  347. if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
  348. Bundle bundle = new Bundle();
  349. bundle.putString("id", bean.getUserRead().getId());
  350. toNextActivity(CommentActivity.class, bundle);
  351. }
  352. });
  353. }
  354. @Override
  355. public void setFavorites(boolean isfavorites) {
  356. if (isfavorites) {
  357. mCollentStatus.setText("已收藏");
  358. ((ImageView) mCollectionLayout.findViewById(R.id.fragment_recommend_collection_icon)).setImageResource(R.drawable.fragment_recommend_collection_icon_s);
  359. } else {
  360. mCollentStatus.setText("未收藏");
  361. ((ImageView) mCollectionLayout.findViewById(R.id.fragment_recommend_collection_icon)).setImageResource(R.drawable.fragment_recommend_collection_icon);
  362. }
  363. ImageView imageView = new ImageView(getActivity());
  364. imageView.setLayoutParams(new ViewGroup.LayoutParams(mCollectIconView.getMeasuredWidth(), mCollectIconView.getMeasuredHeight()));
  365. imageView.setImageDrawable(mCollectIconView.getDrawable());
  366. Floating floating = new Floating(getActivity());
  367. FloatingElement builder = new FloatingBuilder()
  368. .anchorView(mCollectionLayout)
  369. .targetView(imageView)
  370. .offsetX(0)
  371. .offsetY(0)
  372. .floatingTransition(new FloatingAnimation.PlaneFloating(DeviceUtil.getHeight(getActivity())))
  373. .build();
  374. floating.startFloating(builder);
  375. }
  376. @Override
  377. public void setLikes(String count) {
  378. if (!count.equals(mThumbCount.getText().toString())) {
  379. ((ImageView) mThumbsLayout.findViewById(R.id.fragment_recommend_thumbs_icon)).setImageResource(R.drawable.fragment_recommend_thumbs_up_s);
  380. }
  381. mThumbCount.setText(count);
  382. }
  383. @Override
  384. public String getDataJson() {
  385. return mDataJson;
  386. }
  387. @Override
  388. public void showFirstIntoView() {
  389. boolean isFirst = (boolean) MMKVUtil.getInstance().decode("first_into", true);
  390. if (isFirst) {
  391. //是第一次进入
  392. if (!((BaseActivity) getActivity()).getLocalClassName().contains("SmallFullVideoActivity")) {
  393. ((BaseActivity) getActivity()).showFirstTouchView();
  394. MMKVUtil.getInstance().encode("first_into", false);
  395. }
  396. } else {
  397. //不是第一次进入了
  398. }
  399. }
  400. @Override
  401. public ImageView getisViewUI() {
  402. if (isUserVip == null) {
  403. return null;
  404. }
  405. return isUserVip;
  406. }
  407. @Override
  408. public void clearRecyclerView() {
  409. if (mRecyclerView != null) {
  410. mRecyclerView.removeAllViews();
  411. mRecyclerView = null;
  412. }
  413. }
  414. @Override
  415. public void eventHideUi() {
  416. mCommentLayout.setVisibility(View.INVISIBLE);
  417. mCollectionLayout.setVisibility(View.INVISIBLE);
  418. mThumbsLayout.setVisibility(View.INVISIBLE);
  419. mToRecordLayout.setVisibility(View.INVISIBLE);
  420. }
  421. @Override
  422. public void showAllUi() {
  423. mCommentLayout.setVisibility(View.VISIBLE);
  424. mCollectionLayout.setVisibility(View.VISIBLE);
  425. mThumbsLayout.setVisibility(View.VISIBLE);
  426. mToRecordLayout.setVisibility(View.VISIBLE);
  427. }
  428. public void danMuStatus(boolean bool) {
  429. mPresenter.getPlayingSwitch().setChecked(bool);
  430. }
  431. public void playingMarqueenStatus(int status) {
  432. mPresenter.getPlayingMarqueen().setVisibility(status);
  433. }
  434. @Override
  435. public void onDestroy() {
  436. mPresenter.activityDestory();
  437. mPresenter.detachView();
  438. mPresenter.clearAll();
  439. super.onDestroy();
  440. }
  441. @Override
  442. public void onGetDisconnect() {
  443. }
  444. @Override
  445. public void onGetMobileConnect() {
  446. }
  447. @Override
  448. public void onGetWifiConnect() {
  449. }
  450. @Override
  451. public void onDestroyView() {
  452. super.onDestroyView();
  453. Jzvd.releaseAllVideos();
  454. getRootView().removeAllViews();
  455. mREcommendLayout = null;
  456. mRecyclerView = null;
  457. mUserHeadLayout = null;
  458. mCommentLayout = null;
  459. mCollectionLayout = null;
  460. mThumbsLayout = null;
  461. mToRecordLayout = null;
  462. mVideoUp = null;
  463. mVideoNext = null;
  464. mRotationImgAnim = null;
  465. mToRecordRotationbg = null;
  466. mToRecordScaleXAnim = null;
  467. mToRecordScaleYAnim = null;
  468. mToRecordScaleIcon = null;
  469. mUserHead = null;
  470. mUserPhone = null;
  471. mCommentCount = null;
  472. mCollentStatus = null;
  473. mUserReadNum = null;
  474. mThumbCount = null;
  475. mCollectIconView = null;
  476. isFollow = null;
  477. mThumbIconView = null;
  478. isUserVip = null;
  479. mUserReadCountLayout = null;
  480. }
  481. @Override
  482. protected void botHandleIntent(BotIntent intent, String customData) {
  483. super.botHandleIntent(intent, customData);
  484. Logger.e("botHandleIntent:" + customData);
  485. if (EfunboxUtil.checkIsVip()) {
  486. isUserVip.setVisibility(View.INVISIBLE);
  487. }
  488. }
  489. @Override
  490. protected void botOnClickLink(String url, HashMap<String, String> paramMap) {
  491. super.botOnClickLink(url, paramMap);
  492. Logger.e("botOnClickLink:" + url);
  493. }
  494. @Override
  495. protected void botOnHandleScreenNavigatorEvent(int event) {
  496. super.botOnHandleScreenNavigatorEvent(event);
  497. Logger.e("botOnHandleScreenNavigatorEvent:");
  498. }
  499. @Override
  500. protected void botOnLinkAccountSucceed(String s, String s1) {
  501. super.botOnLinkAccountSucceed(s, s1);
  502. Logger.e("botOnHandleScreenNavigatorEvent:");
  503. }
  504. @Override
  505. protected void botOnChargeStatusUpdated(String purchaseResult, AmountInfo authorizationAmount, AmountInfo capturedAmount, long creationTimestamp, String baiduOrderReferenceId, String sellerOrderId, String msg) {
  506. super.botOnChargeStatusUpdated(purchaseResult, authorizationAmount, capturedAmount, creationTimestamp, baiduOrderReferenceId, sellerOrderId, msg);
  507. Logger.e("botOnHandleScreenNavigatorEvent:");
  508. }
  509. @Override
  510. protected void botOnBuyStatusUpdated(@NonNull String purchaseResult, @NonNull String productId, @NonNull String baiduOrderId, @NonNull String sellerOrderId, @Nullable String msg, String token) {
  511. super.botOnBuyStatusUpdated(purchaseResult, productId, baiduOrderId, sellerOrderId, msg, token);
  512. Logger.e("botOnBuyStatusUpdated:");
  513. }
  514. public void setChangeCharacterListener(ChangeCharacterListener listener) {
  515. mChangeCharacterListener = listener;
  516. }
  517. @Override
  518. public ChangeCharacterListener getChangeCharacterListener() {
  519. return mChangeCharacterListener;
  520. }
  521. @Override
  522. public RecyclerView getmRecyclerView() {
  523. return mRecyclerView;
  524. }
  525. public interface ChangeCharacterListener {
  526. void changeDataList(UserRecordBean list);
  527. }
  528. }