光环助手V3.2 RELEASE(20180419-1810)UI问题汇总
This commit is contained in:
@ -71,6 +71,7 @@ public class EntranceUtils {
|
||||
public static final String KEY_QUESTIONS_SEARCH_KEY = "questionsSearchKey";
|
||||
public static final String KEY_SHOW_ANSWER_COMMENT = "showAnswerComment";
|
||||
public static final String KEY_VERSION_UPDATE = "versionUpdate";
|
||||
public static final String KEY_CHECK_QUESTION_CONCERN = "check_question_concern";
|
||||
|
||||
public static void jumpActivity(Context context, Bundle bundle) {
|
||||
|
||||
|
||||
@ -252,6 +252,7 @@ public class NewsDetailActivity extends BaseActivity implements OnClickListener,
|
||||
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mNewsShare.getLayoutParams();
|
||||
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
|
||||
params.addRule(RelativeLayout.CENTER_VERTICAL);
|
||||
params.setMargins(0,0,DisplayUtils.dip2px(this, 4),0);
|
||||
reuse_actionbar.addView(mNewsShare, params);
|
||||
|
||||
mNewsCollection = (ImageView) LayoutInflater.from(this).inflate(R.layout.menu_action_collection, reuse_actionbar, false);
|
||||
@ -259,7 +260,7 @@ public class NewsDetailActivity extends BaseActivity implements OnClickListener,
|
||||
RelativeLayout.LayoutParams params2 = (RelativeLayout.LayoutParams) mNewsCollection.getLayoutParams();
|
||||
params2.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
|
||||
params2.addRule(RelativeLayout.CENTER_VERTICAL);
|
||||
params2.setMargins(0, 0, params.width - DisplayUtils.dip2px(this, 5), 0);
|
||||
params2.setMargins(0, 0, params.width - DisplayUtils.dip2px(this, 7), 0);
|
||||
reuse_actionbar.addView(mNewsCollection, params2);
|
||||
|
||||
mDetailRv.setHasFixedSize(true);
|
||||
|
||||
@ -21,4 +21,12 @@ public class QuestionsDetailActivity extends NormalActivity {
|
||||
bundle.putString(EntranceUtils.KEY_ENTRANCE, entrance);
|
||||
return getTargetIntent(context, QuestionsDetailActivity.class, QuestionsDetailFragment.class, bundle);
|
||||
}
|
||||
|
||||
public static Intent getIntent(Context context, String questionId, String entrance, boolean isCheckConcern) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(EntranceUtils.KEY_QUESTIONS_ID, questionId);
|
||||
bundle.putString(EntranceUtils.KEY_ENTRANCE, entrance);
|
||||
bundle.putBoolean(EntranceUtils.KEY_CHECK_QUESTION_CONCERN, isCheckConcern);
|
||||
return getTargetIntent(context, QuestionsDetailActivity.class, QuestionsDetailFragment.class, bundle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ import com.gh.gamecenter.R;
|
||||
import com.gh.gamecenter.SuggestionActivity;
|
||||
import com.gh.gamecenter.WebActivity;
|
||||
import com.gh.gamecenter.adapter.viewholder.FooterViewHolder;
|
||||
import com.gh.gamecenter.adapter.viewholder.ReuseViewHolder;
|
||||
import com.gh.gamecenter.adapter.viewholder.SearchViewHolder;
|
||||
import com.gh.gamecenter.adapter.viewholder.ToolBoxViewHolder;
|
||||
import com.gh.gamecenter.entity.ToolBoxEntity;
|
||||
@ -143,10 +144,12 @@ public class ToolBoxRvAdapter extends BaseRecyclerAdapter {
|
||||
public int getItemViewType(int position) {
|
||||
if (position == 0) {
|
||||
return 0;
|
||||
} else if (position == 1 || position == getItemCount() - 1) {
|
||||
} else if (position == 1) {
|
||||
return 1;
|
||||
} else {
|
||||
} else if (position == getItemCount() - 1) {
|
||||
return 2;
|
||||
} else {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,9 +158,12 @@ public class ToolBoxRvAdapter extends BaseRecyclerAdapter {
|
||||
if (viewType == 0) {
|
||||
View view = mLayoutInflater.inflate(R.layout.layout_search_bar, parent, false);
|
||||
return new SearchViewHolder(view);
|
||||
} else if (viewType == 1) {
|
||||
} else if (viewType == 2) {
|
||||
View view = mLayoutInflater.inflate(R.layout.refresh_footerview, parent, false);
|
||||
return new FooterViewHolder(view);
|
||||
} else if (viewType == 1) {
|
||||
View view = mLayoutInflater.inflate(R.layout.toolbox_hint_item, parent, false);
|
||||
return new ReuseViewHolder(view);
|
||||
} else {
|
||||
View view = mLayoutInflater.inflate(R.layout.toolbox_item, parent, false);
|
||||
return new ToolBoxViewHolder(view);
|
||||
@ -173,10 +179,12 @@ public class ToolBoxRvAdapter extends BaseRecyclerAdapter {
|
||||
initToolBoxViewHolder(viewHolder, toolBoxEntity);
|
||||
} else if (holder instanceof FooterViewHolder) {
|
||||
FooterViewHolder viewHolder = (FooterViewHolder) holder;
|
||||
initFooterViewHolder(viewHolder, position);
|
||||
initFooterViewHolder(viewHolder);
|
||||
} else if (holder instanceof SearchViewHolder) {
|
||||
SearchViewHolder viewHolder = (SearchViewHolder) holder;
|
||||
initSearchViewHolder(viewHolder);
|
||||
} else if (holder instanceof ReuseViewHolder) {
|
||||
holder.itemView.setOnClickListener(v -> SuggestionActivity.startSuggestionActivity(mContext, 2, null, null));
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,47 +252,32 @@ public class ToolBoxRvAdapter extends BaseRecyclerAdapter {
|
||||
}
|
||||
|
||||
|
||||
private void initFooterViewHolder(FooterViewHolder viewHolder, int position) {
|
||||
private void initFooterViewHolder(FooterViewHolder viewHolder) {
|
||||
viewHolder.initItemPadding();
|
||||
|
||||
if (position == 1) {
|
||||
viewHolder.lineLeft.setVisibility(View.VISIBLE);
|
||||
viewHolder.lineRight.setVisibility(View.VISIBLE);
|
||||
if (mIsNetworkError) {
|
||||
viewHolder.lineLeft.setVisibility(View.GONE);
|
||||
viewHolder.lineRight.setVisibility(View.GONE);
|
||||
viewHolder.loading.setVisibility(View.GONE);
|
||||
viewHolder.hint.setText(R.string.tools_suggestion_hint);
|
||||
viewHolder.hint.setText(R.string.loading_failed_retry);
|
||||
viewHolder.itemView.setClickable(true);
|
||||
viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SuggestionActivity.startSuggestionActivity(mContext, 2, null, null);
|
||||
loadData();
|
||||
}
|
||||
});
|
||||
} else if (mIsOver) {
|
||||
viewHolder.lineLeft.setVisibility(View.VISIBLE);
|
||||
viewHolder.lineRight.setVisibility(View.VISIBLE);
|
||||
viewHolder.loading.setVisibility(View.GONE);
|
||||
viewHolder.hint.setText(R.string.loading_complete);
|
||||
viewHolder.itemView.setClickable(false);
|
||||
} else {
|
||||
if (mIsNetworkError) {
|
||||
viewHolder.lineLeft.setVisibility(View.GONE);
|
||||
viewHolder.lineRight.setVisibility(View.GONE);
|
||||
viewHolder.loading.setVisibility(View.GONE);
|
||||
viewHolder.hint.setText(R.string.loading_failed_retry);
|
||||
viewHolder.itemView.setClickable(true);
|
||||
viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
loadData();
|
||||
}
|
||||
});
|
||||
} else if (mIsOver) {
|
||||
viewHolder.lineLeft.setVisibility(View.VISIBLE);
|
||||
viewHolder.lineRight.setVisibility(View.VISIBLE);
|
||||
viewHolder.loading.setVisibility(View.GONE);
|
||||
viewHolder.hint.setText(R.string.loading_complete);
|
||||
viewHolder.itemView.setClickable(false);
|
||||
} else {
|
||||
viewHolder.lineLeft.setVisibility(View.GONE);
|
||||
viewHolder.lineRight.setVisibility(View.GONE);
|
||||
viewHolder.loading.setVisibility(View.VISIBLE);
|
||||
viewHolder.hint.setText(loading);
|
||||
viewHolder.itemView.setClickable(false);
|
||||
}
|
||||
viewHolder.lineLeft.setVisibility(View.GONE);
|
||||
viewHolder.lineRight.setVisibility(View.GONE);
|
||||
viewHolder.loading.setVisibility(View.VISIBLE);
|
||||
viewHolder.hint.setText(loading);
|
||||
viewHolder.itemView.setClickable(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.gh.gamecenter.adapter.viewholder;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -15,9 +14,6 @@ import butterknife.BindView;
|
||||
*/
|
||||
public class GameHeadViewHolder extends BaseRecyclerViewHolder {
|
||||
|
||||
@BindView(R.id.head_thumb)
|
||||
public ImageView thumb;
|
||||
|
||||
@BindView(R.id.head_title)
|
||||
public TextView title;
|
||||
|
||||
|
||||
@ -73,9 +73,16 @@ public class AskQuestionsRecommendsFragment extends ListFragment<AnswerEntity, A
|
||||
layoutParams.height = DisplayUtils.dip2px(getContext(), mRefreshHeight);
|
||||
mRefreshHint.setLayoutParams(layoutParams);
|
||||
mBaseHandler.sendEmptyMessage(0);
|
||||
} else if (msg.what == 2) {
|
||||
mListViewModel.load(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isAutomaticLoad() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@ -114,6 +121,7 @@ public class AskQuestionsRecommendsFragment extends ListFragment<AnswerEntity, A
|
||||
mListViewModel.getSubjectLiveData().observe(this, entityList -> {
|
||||
mAdapter.setSubjectEntity(entityList);
|
||||
});
|
||||
mBaseHandler.sendEmptyMessageDelayed(2, 1500);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -217,6 +225,7 @@ public class AskQuestionsRecommendsFragment extends ListFragment<AnswerEntity, A
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEventMainThread(EBReuse reuse) {
|
||||
if (LOGIN_TAG.equals(reuse.getType()) || LOGOUT_TAG.equals(reuse.getType())) {
|
||||
mBaseHandler.removeMessages(2);
|
||||
initList();
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ public class AskQuestionsRecommendsViewModel extends ListViewModel<AnswerEntity,
|
||||
}
|
||||
|
||||
private void loadData(boolean isUp, String sequenceId) {
|
||||
if (mIsLoading && !TextUtils.isEmpty(sequenceId)) return;
|
||||
if (mIsLoading && !TextUtils.isEmpty(sequenceId) && !isUp) return;
|
||||
mIsLoading = true;
|
||||
String filter;
|
||||
String communityId = UserManager.getInstance().getCommunityId(getApplication());
|
||||
|
||||
@ -6,6 +6,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.gh.common.util.DataUtils;
|
||||
import com.gh.common.util.DisplayUtils;
|
||||
import com.gh.common.util.ImageUtils;
|
||||
import com.gh.gamecenter.AnswerDetailActivity;
|
||||
@ -14,6 +15,7 @@ import com.gh.gamecenter.R;
|
||||
import com.gh.gamecenter.adapter.RecyclingPagerAdapter;
|
||||
import com.gh.gamecenter.ask.entity.AskSubjectEntity;
|
||||
import com.gh.gamecenter.databinding.AskRecommendsSubjectItemBinding;
|
||||
import com.gh.gamecenter.manager.UserManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -44,6 +46,7 @@ public class AskSubjectPageAdapter extends RecyclingPagerAdapter {
|
||||
binding.setEntity(entity);
|
||||
ImageUtils.Companion.getInstance().displayScale(binding.subjectIcon, entity.getThumb(), DisplayUtils.dip2px(mContext, 67));
|
||||
binding.getRoot().setOnClickListener(v -> {
|
||||
DataUtils.onMtaEvent(mContext, "问答专题", UserManager.getInstance().getCommunityName(mContext), entity.getTitle());
|
||||
if ("answer_list".equals(entity.getType())) {
|
||||
mContext.startActivity(CommunitySubjectActivity.getIntent(mContext, entity));
|
||||
} else {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.gh.gamecenter.ask.myask;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
@ -24,9 +26,18 @@ import rx.Observable;
|
||||
*/
|
||||
|
||||
public class ConcernQuestionsFragment extends ListFragment<Questions, NormalListViewModel> {
|
||||
public static final int KEY_CHECK_QUESTION_CONCERN = 105;
|
||||
|
||||
private ConcernQuestionsAdapter mAdapter;
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == KEY_CHECK_QUESTION_CONCERN && resultCode == Activity.RESULT_OK) {
|
||||
onLoadRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
public static ConcernQuestionsFragment getInstance(String entrance) {
|
||||
ConcernQuestionsFragment fragment = new ConcernQuestionsFragment();
|
||||
Bundle args = new Bundle();
|
||||
@ -57,8 +68,8 @@ public class ConcernQuestionsFragment extends ListFragment<Questions, NormalList
|
||||
case R.id.ask_questions_new_item:
|
||||
String tracers = mEntrance + "+(关注问题)";
|
||||
Questions questions = (Questions) data;
|
||||
startActivity(QuestionsDetailActivity.getIntent(getContext(), questions.getId(), tracers));
|
||||
|
||||
Intent intent = QuestionsDetailActivity.getIntent(getContext(), questions.getId(), tracers, true);
|
||||
startActivityForResult(intent, KEY_CHECK_QUESTION_CONCERN);
|
||||
AskLogUtils.uploadQuestions(getContext(), tracers, questions);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.widget.DefaultItemAnimator;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
@ -23,6 +24,7 @@ import android.widget.TextView;
|
||||
import com.gh.common.util.CheckLoginUtils;
|
||||
import com.gh.common.util.ConcernUtils;
|
||||
import com.gh.common.util.DataUtils;
|
||||
import com.gh.common.util.DialogUtils;
|
||||
import com.gh.common.util.DisplayUtils;
|
||||
import com.gh.common.util.EntranceUtils;
|
||||
import com.gh.common.util.ShareUtils;
|
||||
@ -80,6 +82,8 @@ public class QuestionsDetailFragment extends ListFragment<AnswerEntity, NormalLi
|
||||
|
||||
private String mQuestionsId;
|
||||
|
||||
private boolean mIsCheckConcern;
|
||||
|
||||
public static QuestionsDetailFragment getInstance(String questionsId) {
|
||||
QuestionsDetailFragment fragment = new QuestionsDetailFragment();
|
||||
Bundle args = new Bundle();
|
||||
@ -130,7 +134,10 @@ public class QuestionsDetailFragment extends ListFragment<AnswerEntity, NormalLi
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
Bundle arguments = getArguments();
|
||||
if (arguments != null) mQuestionsId = arguments.getString(EntranceUtils.KEY_QUESTIONS_ID);
|
||||
if (arguments != null) {
|
||||
mIsCheckConcern = arguments.getBoolean(EntranceUtils.KEY_CHECK_QUESTION_CONCERN, false);
|
||||
mQuestionsId = arguments.getString(EntranceUtils.KEY_QUESTIONS_ID);
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
getQuestionsDetail();
|
||||
}
|
||||
@ -243,23 +250,7 @@ public class QuestionsDetailFragment extends ListFragment<AnswerEntity, NormalLi
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ConcernUtils.INSTANCE.deleteConcernQuestions(getContext(), mQuestionsId
|
||||
, new ConcernUtils.onConcernListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (mQuestionsDetailEntity.getFollowCount() > 0) {
|
||||
mQuestionsDetailEntity.setFollowCount(mQuestionsDetailEntity.getFollowCount() - 1);
|
||||
}
|
||||
mQuestionsDetailEntity.getMe().setQuestionFollowed(false);
|
||||
mAdapter.notifyItemChanged(0);
|
||||
toast("取消关注");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
|
||||
}
|
||||
});
|
||||
cancelConcern();
|
||||
}
|
||||
});
|
||||
break;
|
||||
@ -381,6 +372,7 @@ public class QuestionsDetailFragment extends ListFragment<AnswerEntity, NormalLi
|
||||
mListRv.setVisibility(View.GONE);
|
||||
mListRefresh.setRefreshing(false);
|
||||
mListRefresh.setEnabled(false);
|
||||
showCancelConcernDialog();
|
||||
} else {
|
||||
loadError();
|
||||
}
|
||||
@ -419,4 +411,43 @@ public class QuestionsDetailFragment extends ListFragment<AnswerEntity, NormalLi
|
||||
});
|
||||
}
|
||||
|
||||
private void cancelConcern() {
|
||||
ConcernUtils.INSTANCE.deleteConcernQuestions(getContext(), mQuestionsId
|
||||
, new ConcernUtils.onConcernListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (mQuestionsDetailEntity == null) {
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.setResult(Activity.RESULT_OK);
|
||||
activity.finish();
|
||||
}
|
||||
} else {
|
||||
if (mQuestionsDetailEntity.getFollowCount() > 0) {
|
||||
mQuestionsDetailEntity.setFollowCount(mQuestionsDetailEntity.getFollowCount() - 1);
|
||||
}
|
||||
mQuestionsDetailEntity.getMe().setQuestionFollowed(false);
|
||||
mAdapter.notifyItemChanged(0);
|
||||
toast("取消关注");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showCancelConcernDialog() {
|
||||
DialogUtils.showAlertDialog(getContext()
|
||||
, "取消关注问题", "问题已被删除,一键取消关注问题"
|
||||
, " 取消关注", "暂不 "
|
||||
, () -> {
|
||||
cancelConcern();
|
||||
}
|
||||
, () -> {
|
||||
if (getActivity() != null) getActivity().finish();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,20 @@
|
||||
package com.gh.gamecenter.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
|
||||
import com.gh.base.fragment.BaseFragment_ViewPager_Checkable;
|
||||
import com.gh.common.util.CheckLoginUtils;
|
||||
import com.gh.common.util.DataUtils;
|
||||
import com.gh.gamecenter.CommunitiesSelectActivity;
|
||||
import com.gh.gamecenter.R;
|
||||
import com.gh.gamecenter.ask.AskFragment;
|
||||
import com.gh.gamecenter.db.GameTrendsDao;
|
||||
@ -35,6 +42,7 @@ import rx.schedulers.Schedulers;
|
||||
|
||||
import static com.gh.gamecenter.MainActivity.EB_MAINACTIVITY_TAG;
|
||||
import static com.gh.gamecenter.MainActivity.EB_SKIP_GAMEFRAGMENT;
|
||||
import static com.gh.gamecenter.ask.AskFragment.COMMUNITIES_SELECT_REQUEST;
|
||||
|
||||
/**
|
||||
* @author CsHeng
|
||||
@ -59,6 +67,10 @@ public class MainWrapperFragment extends BaseFragment_ViewPager_Checkable {
|
||||
|
||||
private GameTrendsDao mGameTrendsDao;
|
||||
|
||||
private SharedPreferences sp;
|
||||
|
||||
private boolean mIsShowSelectCommunitiesDialog;
|
||||
|
||||
private long mLastRequestDiscoveryTime;
|
||||
|
||||
@Override
|
||||
@ -88,6 +100,14 @@ public class MainWrapperFragment extends BaseFragment_ViewPager_Checkable {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mGameTrendsDao = new GameTrendsDao(getContext());
|
||||
sp = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
mIsShowSelectCommunitiesDialog = sp.getBoolean("isShowSelectCommunitiesDialog", true);
|
||||
if (mIsShowSelectCommunitiesDialog) {
|
||||
final Bundle args = getArguments();
|
||||
if (args != null && args.getInt(ARGS_INDEX) == INDEX_ASK) {
|
||||
mIsShowSelectCommunitiesDialog = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -114,6 +134,12 @@ public class MainWrapperFragment extends BaseFragment_ViewPager_Checkable {
|
||||
@Override
|
||||
protected void onPageChanged(int index) {
|
||||
super.onPageChanged(index);
|
||||
if (index == INDEX_ASK && mIsShowSelectCommunitiesDialog) {
|
||||
sp.edit().putBoolean("isShowSelectCommunitiesDialog", false).apply();
|
||||
mIsShowSelectCommunitiesDialog = false;
|
||||
showDialog();
|
||||
}
|
||||
|
||||
|
||||
switch (index) {
|
||||
case INDEX_GAME:
|
||||
@ -206,4 +232,22 @@ public class MainWrapperFragment extends BaseFragment_ViewPager_Checkable {
|
||||
getDiscoveryData(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void showDialog() {
|
||||
Dialog dialog = new Dialog(getContext(), R.style.DialogWindowTransparent);
|
||||
dialog.setCancelable(false);
|
||||
Window window = dialog.getWindow();
|
||||
if (window != null) {
|
||||
window.setGravity(Gravity.LEFT | Gravity.TOP);
|
||||
}
|
||||
dialog.show();
|
||||
LayoutInflater inflater = LayoutInflater.from(getContext());
|
||||
View viewDialog = inflater.inflate(R.layout.dialog_communities_select_hint, null);
|
||||
View view = viewDialog.findViewById(R.id.communities_select_hint);
|
||||
view.setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
startActivityForResult(CommunitiesSelectActivity.getIntent(getContext()), COMMUNITIES_SELECT_REQUEST);
|
||||
});
|
||||
dialog.setContentView(viewDialog);
|
||||
}
|
||||
}
|
||||
|
||||
@ -923,7 +923,6 @@ public class GameFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
String image = mSubjectList.get(i).getData().get(0).getImage();
|
||||
if (position == offset && TextUtils.isEmpty(gameEntity.getImage()) || position == offset + 1
|
||||
&& !TextUtils.isEmpty(image)) {
|
||||
holder.thumb.setVisibility(View.GONE);
|
||||
holder.line.setVisibility(View.VISIBLE);
|
||||
holder.title.setText(mSubjectList.get(i).getName());
|
||||
holder.title.setTextColor(Color.BLACK);
|
||||
|
||||
Reference in New Issue
Block a user