|
@@ -31,6 +31,7 @@ import com.kfzs.duanduan.utils.net.APIRequestInstance;
|
|
|
import com.kfzs.duanduan.view.KFProgressButton;
|
|
import com.kfzs.duanduan.view.KFProgressButton;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
|
|
+import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
|
|
|
|
|
import org.greenrobot.eventbus.EventBus;
|
|
import org.greenrobot.eventbus.EventBus;
|
|
|
import org.greenrobot.eventbus.Subscribe;
|
|
import org.greenrobot.eventbus.Subscribe;
|
|
@@ -98,7 +99,7 @@ public class FgtGameDetail extends BaseCompatFragment {
|
|
|
if (mOnDownCallback == null) {
|
|
if (mOnDownCallback == null) {
|
|
|
mOnDownCallback = DownBtnUtils.installBtnStatus(mInstallButtonMgr);
|
|
mOnDownCallback = DownBtnUtils.installBtnStatus(mInstallButtonMgr);
|
|
|
}
|
|
}
|
|
|
- EventDownloadHandler.newInstance(getContext(), mOnDownCallback)
|
|
|
|
|
|
|
+ EventDownloadHandler.newInstance(SheepApp.getInstance(), mOnDownCallback)
|
|
|
.setmTag(TAG).handlDownloadResult(info);
|
|
.setmTag(TAG).handlDownloadResult(info);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -134,10 +135,10 @@ public class FgtGameDetail extends BaseCompatFragment {
|
|
|
mGsIcon4.setTag(R.id.view_tag_game_icon, gsGamesList.get(3).getId());
|
|
mGsIcon4.setTag(R.id.view_tag_game_icon, gsGamesList.get(3).getId());
|
|
|
|
|
|
|
|
|
|
|
|
|
- DownBtnUtils.addDownloadBtnListener(mGsBtn1, getContext(), mInstallButtonMgr, gsGamesList.get(0), "gsGame_01");
|
|
|
|
|
- DownBtnUtils.addDownloadBtnListener(mGsBtn2, getContext(), mInstallButtonMgr, gsGamesList.get(1), "gsGame_02");
|
|
|
|
|
- DownBtnUtils.addDownloadBtnListener(mGsBtn3, getContext(), mInstallButtonMgr, gsGamesList.get(2), "gsGame_03");
|
|
|
|
|
- DownBtnUtils.addDownloadBtnListener(mGsBtn4, getContext(), mInstallButtonMgr, gsGamesList.get(3), "gsGame_04");
|
|
|
|
|
|
|
+ DownBtnUtils.addDownloadBtnListener(mGsBtn1, SheepApp.getInstance(), mInstallButtonMgr, gsGamesList.get(0), "gsGame_01");
|
|
|
|
|
+ DownBtnUtils.addDownloadBtnListener(mGsBtn2, SheepApp.getInstance(), mInstallButtonMgr, gsGamesList.get(1), "gsGame_02");
|
|
|
|
|
+ DownBtnUtils.addDownloadBtnListener(mGsBtn3, SheepApp.getInstance(), mInstallButtonMgr, gsGamesList.get(2), "gsGame_03");
|
|
|
|
|
+ DownBtnUtils.addDownloadBtnListener(mGsBtn4, SheepApp.getInstance(), mInstallButtonMgr, gsGamesList.get(3), "gsGame_04");
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
@@ -176,7 +177,7 @@ public class FgtGameDetail extends BaseCompatFragment {
|
|
|
mGsBtn3 = mContentView.findViewById(R.id.downbtn_fgt_game_detail_3);
|
|
mGsBtn3 = mContentView.findViewById(R.id.downbtn_fgt_game_detail_3);
|
|
|
mGsBtn4 = mContentView.findViewById(R.id.downbtn_fgt_game_detail_4);
|
|
mGsBtn4 = mContentView.findViewById(R.id.downbtn_fgt_game_detail_4);
|
|
|
|
|
|
|
|
- mRvImags.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
|
|
|
|
|
|
|
+ mRvImags.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance(), LinearLayoutManager.HORIZONTAL, false));
|
|
|
mRvImags.setNestedScrollingEnabled(false);
|
|
mRvImags.setNestedScrollingEnabled(false);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -191,7 +192,7 @@ public class FgtGameDetail extends BaseCompatFragment {
|
|
|
Collections.addAll(urlList, urls);
|
|
Collections.addAll(urlList, urls);
|
|
|
if (mGameDesc != null)
|
|
if (mGameDesc != null)
|
|
|
mGameDesc.setText(game.getIntroduce());
|
|
mGameDesc.setText(game.getIntroduce());
|
|
|
- mRecyclerViewAdapter = new RecyclerViewAdapter<String>(getContext(), R.layout.item_image, urlList) {
|
|
|
|
|
|
|
+ mRecyclerViewAdapter = new RecyclerViewAdapter<String>(SheepApp.getInstance(), R.layout.item_image, urlList) {
|
|
|
@Override
|
|
@Override
|
|
|
public void convert(ViewHolder viewHolder, String url, final int position) {
|
|
public void convert(ViewHolder viewHolder, String url, final int position) {
|
|
|
View view = viewHolder.getView(R.id.img_detail);
|
|
View view = viewHolder.getView(R.id.img_detail);
|