我的光环,无安装、无关注时页面显示逻辑修改
This commit is contained in:
@ -4,6 +4,9 @@ import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.gh.base.AppController;
|
||||
import com.gh.base.BaseFragment;
|
||||
@ -16,6 +19,9 @@ import com.gh.gamecenter.entity.GameEntity;
|
||||
import com.gh.gamecenter.eventbus.EBNetworkState;
|
||||
import com.gh.gamecenter.eventbus.EBPackage;
|
||||
import com.gh.gamecenter.eventbus.EBReuse;
|
||||
import com.gh.gamecenter.eventbus.EBSkip;
|
||||
|
||||
import de.greenrobot.event.EventBus;
|
||||
|
||||
/**
|
||||
* Created by LGT on 2016/8/12.
|
||||
@ -26,6 +32,9 @@ public class InstallFragment extends BaseFragment {
|
||||
|
||||
private RecyclerView fm_install_rv_show;
|
||||
private InstallFragmentAdapter adapter;
|
||||
private LinearLayout reuse_nodata_skip;
|
||||
private TextView reuse_nodata_skip_tv_hint;
|
||||
private TextView reuse_nodata_skip_tv_btn;
|
||||
|
||||
private boolean isEverpause;
|
||||
|
||||
@ -53,12 +62,28 @@ public class InstallFragment extends BaseFragment {
|
||||
|
||||
init(R.layout.fm_install);
|
||||
|
||||
reuse_nodata_skip.setVisibility(View.GONE);
|
||||
reuse_nodata_skip_tv_hint.setText("暂无游戏");
|
||||
reuse_nodata_skip_tv_btn.setText("查看精品推荐");
|
||||
reuse_nodata_skip_tv_btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
EventBus.getDefault().post(new EBSkip("GameFragment", 1));
|
||||
}
|
||||
});
|
||||
|
||||
fm_install_rv_show.setHasFixedSize(true);
|
||||
fm_install_rv_show.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
adapter = new InstallFragmentAdapter(getActivity(), fm_install_rv_show);
|
||||
adapter = new InstallFragmentAdapter(this);
|
||||
fm_install_rv_show.setAdapter(adapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadEmpty() {
|
||||
fm_install_rv_show.setVisibility(View.GONE);
|
||||
reuse_nodata_skip.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
//连接上网络事件
|
||||
public void onEventMainThread(EBNetworkState busNetworkState) {
|
||||
if (busNetworkState.isNetworkConnected()) {
|
||||
@ -86,7 +111,9 @@ public class InstallFragment extends BaseFragment {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
adapter = new InstallFragmentAdapter(getActivity(), fm_install_rv_show);
|
||||
fm_install_rv_show.setVisibility(View.VISIBLE);
|
||||
reuse_nodata_skip.setVisibility(View.GONE);
|
||||
adapter = new InstallFragmentAdapter(this);
|
||||
fm_install_rv_show.setAdapter(adapter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user