Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev

This commit is contained in:
Jack
2020-02-27 18:16:10 +08:00
173 changed files with 300 additions and 303 deletions

View File

@ -38,7 +38,7 @@ class GameOffServiceDialogFragment : BaseTrackableDialogFragment() {
topMargin = DisplayUtils.dip2px(12f)
}
siteTv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14f)
siteTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme))
siteTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
siteTv.text = site.text
siteTv.paintFlags = siteTv.paintFlags or Paint.UNDERLINE_TEXT_FLAG
siteTv.setOnClickListener {

View File

@ -198,12 +198,12 @@ public class CommentUtils {
public static void postVote(final Context context, final CommentEntity commentEntity,
final TextView commentLikeCountTv, final ImageView commentLikeIv,
final OnVoteListener listener) {
if (commentLikeCountTv.getCurrentTextColor() == ContextCompat.getColor(context, R.color.theme)) {
if (commentLikeCountTv.getCurrentTextColor() == ContextCompat.getColor(context, R.color.theme_font)) {
Utils.toast(context, "已经点过赞啦!");
return;
}
commentEntity.setVote(commentEntity.getVote() + 1);
commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.theme));
commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.theme_font));
commentLikeIv.setImageResource(R.drawable.comment_vote_select);
commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote()));
commentLikeCountTv.setVisibility(View.VISIBLE);
@ -264,12 +264,12 @@ public class CommentUtils {
entrance = "社区文章详情-评论-点赞";
}
CheckLoginUtils.checkLogin(context, entrance, () -> {
if (commentLikeCountTv.getCurrentTextColor() == ContextCompat.getColor(context, R.color.theme)) {
if (commentLikeCountTv.getCurrentTextColor() == ContextCompat.getColor(context, R.color.theme_font)) {
Utils.toast(context, "已经点过赞啦!");
return;
}
commentEntity.setVote(commentEntity.getVote() + 1);
commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.theme));
commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.theme_font));
commentLikeIv.setImageResource(R.drawable.comment_vote_select);
commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote()));
commentLikeCountTv.setVisibility(View.VISIBLE);
@ -334,7 +334,7 @@ public class CommentUtils {
holder.commentLikeCountTv.setVisibility(View.GONE);
} else { // 检查是否已点赞
if (userDataEntity != null && (userDataEntity.isCommentVoted())) {
holder.commentLikeCountTv.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
holder.commentLikeCountTv.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
holder.commentLikeIv.setImageResource(R.drawable.comment_vote_select);
}
holder.commentLikeCountTv.setVisibility(View.VISIBLE);

View File

@ -647,9 +647,9 @@ public class DialogUtils {
Button negativeBtn = alertDialog.getButton(android.app.AlertDialog.BUTTON_NEGATIVE);
positiveBtn.setTextSize(13);
positiveBtn.setTextColor(ContextCompat.getColor(context, R.color.theme));
positiveBtn.setTextColor(ContextCompat.getColor(context, R.color.theme_font));
negativeBtn.setTextSize(13);
negativeBtn.setTextColor(ContextCompat.getColor(context, R.color.theme));
negativeBtn.setTextColor(ContextCompat.getColor(context, R.color.theme_font));
if (mesage != null) {
mesage.setGravity(Gravity.CENTER);
mesage.setTextSize(24);
@ -939,7 +939,7 @@ public class DialogUtils {
@Override
public void updateDrawState(@NonNull TextPaint ds) {
super.updateDrawState(ds);
ds.setColor(ContextCompat.getColor(activityContext, R.color.text_1383EB));
ds.setColor(ContextCompat.getColor(activityContext, R.color.theme_font));
ds.setUnderlineText(false);
}
@ -955,7 +955,7 @@ public class DialogUtils {
@Override
public void updateDrawState(@NonNull TextPaint ds) {
super.updateDrawState(ds);
ds.setColor(ContextCompat.getColor(activityContext, R.color.text_1383EB));
ds.setColor(ContextCompat.getColor(activityContext, R.color.theme_font));
ds.setUnderlineText(false);
}

View File

@ -391,7 +391,7 @@ fun FragmentActivity.checkStoragePermissionBeforeAction(action: (() -> Unit)) {
fun TextView.setTextWithHighlightedTextWrappedInsideWrapper(text: CharSequence,
wrapper: String = Constants.DEFAULT_TEXT_WRAPPER,
@ColorRes
highlightColorId: Int = R.color.theme,
highlightColorId: Int = R.color.theme_font,
copyClickedText: Boolean = false,
highlightedTextClickListener: (() -> Unit)? = null) {
TextHelper.highlightTextThatIsWrappedInsideWrapper(this, text, wrapper, highlightColorId, object : SimpleCallback<String> {

View File

@ -57,7 +57,7 @@ public class GameUtils {
downloadBtn.setBackgroundResource(R.drawable.game_item_btn_plugin_style);
} else if ("打开".equals(status) || "启动".equals(status)) {
downloadBtn.setBackgroundResource(R.drawable.detail_download_open_style);
downloadBtn.setTextColor(ContextCompat.getColor(context, R.color.theme));
downloadBtn.setTextColor(ContextCompat.getColor(context, R.color.theme_font));
} else {
downloadBtn.setBackgroundResource(R.drawable.game_item_btn_download_style);
}

View File

@ -166,12 +166,12 @@ public class LibaoUtils {
case "coming":
libaoBtn.setText(R.string.libao_coming);
libaoBtn.setBackgroundResource(R.drawable.button_normal_border);
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme));
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme_font));
break;
case "used_up":
libaoBtn.setText(R.string.libao_used_up);
libaoBtn.setBackgroundResource(R.drawable.button_normal_border);
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme));
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme_font));
break;
case "finish":
libaoBtn.setText(R.string.libao_finish);
@ -181,12 +181,12 @@ public class LibaoUtils {
case "linged":
libaoBtn.setText(R.string.libao_linged);
libaoBtn.setBackgroundResource(R.drawable.button_normal_border);
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme));
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme_font));
break;
case "taoed":
libaoBtn.setText(R.string.libao_taoed);
libaoBtn.setBackgroundResource(R.drawable.button_normal_border);
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme));
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme_font));
break;
case "copy":
libaoBtn.setText(R.string.libao_copy);
@ -195,7 +195,7 @@ public class LibaoUtils {
case "repeatLing":
libaoBtn.setText(R.string.libao_repeat_ling);
libaoBtn.setBackgroundResource(R.drawable.button_normal_border);
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme));
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme_font));
break;
case "repeatLinged":
libaoBtn.setText(R.string.libao_repeat_ling);
@ -204,7 +204,7 @@ public class LibaoUtils {
case "repeatTao":
libaoBtn.setText(R.string.libao_repeat_tao);
libaoBtn.setBackgroundResource(R.drawable.button_normal_border);
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme));
libaoBtn.setTextColor(context.getResources().getColor(R.color.theme_font));
break;
case "repeatTaoed":
libaoBtn.setText(R.string.libao_repeat_tao);

View File

@ -92,7 +92,7 @@ object TextHelper {
@JvmStatic
fun highlightTextThatIsWrappedInsideWrapperByDefault(textView: TextView, text: String?) {
textView.text = getHighlightedSpannableStringThatIsWrappedInsideWrapper(textView.context, text ?: "", "###", R.color.theme, object : SimpleCallback<String> {
textView.text = getHighlightedSpannableStringThatIsWrappedInsideWrapper(textView.context, text ?: "", "###", R.color.theme_font, object : SimpleCallback<String> {
override fun onCallback(arg: String) {
val application = HaloApp.getInstance().application
val cmb = application.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
@ -122,7 +122,7 @@ object TextHelper {
text: CharSequence,
wrapper: String = "###",
@ColorRes
highlightColorId: Int = R.color.theme,
highlightColorId: Int = R.color.theme_font,
highlightedTextClickListener: SimpleCallback<String>? = object : SimpleCallback<String> {
override fun onCallback(arg: String) {
val application = HaloApp.getInstance().application

View File

@ -92,7 +92,7 @@ public class DownloadProgressBar extends ProgressBar {
super.onDraw(canvas);
if (TextUtils.isEmpty(mText)) return;
mPaint.setColor(mDefaultColor == 0 ? ContextCompat.getColor(getContext(), R.color.theme) : mDefaultColor); // 初始化颜色
mPaint.setColor(mDefaultColor == 0 ? ContextCompat.getColor(getContext(), R.color.theme_font) : mDefaultColor); // 初始化颜色
mPaint.setTextSize(mTextSize);
mFakeTextPaint.setTextSize(mTextSize);
mFakeTextPaint.setStyle(Paint.Style.FILL_AND_STROKE);
@ -116,7 +116,7 @@ public class DownloadProgressBar extends ProgressBar {
if (DOWNLOAD_IMAGE_STYLE == mDownloadStyle) {
color = Color.BLACK;
} else if (DOWNLOAD_SLIDE_STYLE == mDownloadStyle) {
color = getResources().getColor(R.color.theme);
color = getResources().getColor(R.color.theme_font);
}
mPaint.setColor(color); // 反向颜色
}
@ -200,7 +200,7 @@ public class DownloadProgressBar extends ProgressBar {
switch (mDownloadStyle) {
case DOWNLOAD_RECT_STYLE:
setProgressDrawable(getResources().getDrawable(R.drawable.detail_download_open_rect_style));
mDefaultColor = ContextCompat.getColor(getContext(), R.color.theme);
mDefaultColor = ContextCompat.getColor(getContext(), R.color.theme_font);
break;
case DOWNLOAD_IMAGE_STYLE:
setProgressDrawable(getResources().getDrawable(R.drawable.detail_download_open_image_style));
@ -208,7 +208,7 @@ public class DownloadProgressBar extends ProgressBar {
break;
default:
setProgressDrawable(getResources().getDrawable(R.drawable.detail_download_open_style));
mDefaultColor = ContextCompat.getColor(getContext(), R.color.theme);
mDefaultColor = ContextCompat.getColor(getContext(), R.color.theme_font);
break;
}
setProgress(0);
@ -217,7 +217,7 @@ public class DownloadProgressBar extends ProgressBar {
switch (mDownloadStyle) {
case DOWNLOAD_RECT_STYLE:
setProgressDrawable(getResources().getDrawable(R.drawable.detail_downloading_normal_rect_style));
mDefaultColor = ContextCompat.getColor(getContext(), R.color.theme);
mDefaultColor = ContextCompat.getColor(getContext(), R.color.theme_font);
break;
case DOWNLOAD_IMAGE_STYLE:
case DOWNLOAD_SLIDE_STYLE:
@ -226,7 +226,7 @@ public class DownloadProgressBar extends ProgressBar {
break;
default:
setProgressDrawable(getResources().getDrawable(R.drawable.detail_downloading_normal_style));
mDefaultColor = ContextCompat.getColor(getContext(), R.color.theme);
mDefaultColor = ContextCompat.getColor(getContext(), R.color.theme_font);
break;
}
break;

View File

@ -83,7 +83,7 @@ public class ExpandAndCloseTextView extends AppCompatTextView {
* 初始化
*/
private void initialize() {
mOpenSuffixColor = mCloseSuffixColor = getResources().getColor( R.color.text_1383EB);
mOpenSuffixColor = mCloseSuffixColor = getResources().getColor( R.color.theme_font);
setMovementMethod(CustomLinkMovementMethod.getInstance());
setIncludeFontPadding(false);
updateOpenSuffixSpan();

View File

@ -100,7 +100,7 @@ public class ExpendTextView extends AppCompatTextView {
@Override
public void updateDrawState(TextPaint ds) {
super.updateDrawState(ds);
ds.setColor(ContextCompat.getColor(getContext(), R.color.theme));
ds.setColor(ContextCompat.getColor(getContext(), R.color.theme_font));
ds.setUnderlineText(false);
}

View File

@ -21,7 +21,7 @@ class HighlightableTextView @JvmOverloads constructor(context: Context, attrs: A
}
override fun setText(text: CharSequence?, type: BufferType?) {
super.setText(TextHelper.getHighlightedSpannableStringThatIsWrappedInsideWrapper(context, text.toString(), "###", R.color.theme, object : SimpleCallback<String> {
super.setText(TextHelper.getHighlightedSpannableStringThatIsWrappedInsideWrapper(context, text.toString(), "###", R.color.theme_font, object : SimpleCallback<String> {
override fun onCallback(arg: String) {
val application = HaloApp.getInstance().application
val cmb = application.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager

View File

@ -244,10 +244,9 @@ public class DownloadManager implements DownloadStatusListener {
}
// 插件版本下载互斥弹窗
GameEntity.MutexDialog mutexDialog = gameEntity.getMutexDialog();
if ("on".equals(mutexDialog.getStatus())
&& mutexDialog.getPackages().contains(apkEntity.getPackageName())) {
for (String pkg : mutexDialog.getPackages()) {
List<String> mutexPackage = gameEntity.getMutexPackage();
if (mutexPackage != null && mutexPackage.size() > 0) {
for (String pkg : mutexPackage) {
if (PackagesManager.isInstalled(pkg)) {
DialogUtils.showDownloadMutexDialog(context);
break;

View File

@ -211,7 +211,7 @@ class NetworkDiagnosisActivity : ToolBarActivity() {
builder.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = resources.getColor(R.color.theme)
ds.color = resources.getColor(R.color.theme_font)
ds.isUnderlineText = false
}

View File

@ -220,7 +220,7 @@ public class CleanApkAdapter extends BaseRecyclerAdapter<KcSelectGameViewHolder>
if (gameEntity.getInstallStatus() == INSTALLED) {
holder.gameSize.setText(R.string.installed);
holder.gameSize.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
holder.gameSize.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
} else {
holder.gameSize.setText(R.string.installed_not);
holder.gameSize.setTextColor(ContextCompat.getColor(mContext, R.color.red));

View File

@ -389,7 +389,7 @@ public class GameDownloadFragment extends BaseFragment implements View.OnClickLi
}
DownloadManager.getInstance(getContext()).pauseAll();
mDownloadmanagerAllstartTv.setText("全部开始");
mDownloadmanagerAllstartTv.setTextColor(ContextCompat.getColor(getContext(), R.color.theme));
mDownloadmanagerAllstartTv.setTextColor(ContextCompat.getColor(getContext(), R.color.theme_font));
}
private void startAll() {

View File

@ -196,14 +196,14 @@ class GameDownloadFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
0, LinearLayout.LayoutParams.WRAP_CONTENT);
lparams.weight = 4;
viewHolder.dmDownloads.setLayoutParams(lparams);
viewHolder.dmDownloads.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
viewHolder.dmDownloads.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
viewHolder.dmDownloads.setText(String.format("%s(剩%s)",
SpeedUtils.getSpeed(downloadEntity.getSpeed()),
SpeedUtils.getRemainTime(downloadEntity.getSize(), downloadEntity.getProgress(), downloadEntity.getSpeed() * 1024)));
viewHolder.dmDelete.setVisibility(View.GONE);
viewHolder.dmStartorpause.setBackgroundResource(R.drawable.game_item_btn_downloading_bg);
viewHolder.dmStartorpause.setText("暂停");
viewHolder.dmStartorpause.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
viewHolder.dmStartorpause.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
viewHolder.dmSpeed.setText(downloadEntity.getPercent() + "%");
}
} else if (status.equals(DownloadStatus.waiting)) {
@ -272,7 +272,7 @@ class GameDownloadFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
0, LinearLayout.LayoutParams.WRAP_CONTENT);
lparams.weight = 4;
viewHolder.dmDownloads.setLayoutParams(lparams);
viewHolder.dmDownloads.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
viewHolder.dmDownloads.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
viewHolder.dmDownloads.setText(String.format("%s(剩%s)",
SpeedUtils.getSpeed(downloadEntity.getSpeed()),
SpeedUtils.getRemainTime(downloadEntity.getSize(),
@ -281,7 +281,7 @@ class GameDownloadFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
viewHolder.dmStartorpause.setBackgroundResource(R.drawable.game_item_btn_downloading_bg);
viewHolder.dmStartorpause.setText("暂停");
viewHolder.dmStartorpause.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
viewHolder.dmStartorpause.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
statusMap.put(url, DownloadStatus.downloading.getStatus());
notifyItemChanged(doneList.isEmpty() ? 0 : 1 + doneList.size());
@ -399,7 +399,7 @@ class GameDownloadFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
viewHolder.dm_item_head_tv_allstart.setTextColor(ContextCompat.getColor(mContext, R.color.btn_gray));
} else {
viewHolder.dm_item_head_tv_allstart.setText(R.string.download_all_start);
viewHolder.dm_item_head_tv_allstart.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
viewHolder.dm_item_head_tv_allstart.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
}
viewHolder.dm_item_head_tv_allstart.setOnClickListener(v -> {
@ -450,7 +450,7 @@ class GameDownloadFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
// DownloadManager.getInstance(mContext).pauseAll();
viewHolder.dm_item_head_tv_allstart.setText("全部开始");
viewHolder.dm_item_head_tv_allstart.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
viewHolder.dm_item_head_tv_allstart.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
}

View File

@ -394,7 +394,7 @@ class GameUpdateFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> implemen
}
} else {
viewHolder.guUpdate.setText(R.string.launch);
viewHolder.guUpdate.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
viewHolder.guUpdate.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
viewHolder.guUpdate.setBackgroundResource(R.drawable.detail_downloading_normal_style);
}
} else {

View File

@ -162,8 +162,8 @@ data class GameEntity(
val playedTime: Long = 0,
@SerializedName("played_game_id")
val playedGameId: String = "",
@SerializedName("mutex_dialog")
val mutexDialog: MutexDialog = MutexDialog()) : Parcelable {
@SerializedName("mutex_package")
val mutexPackage: List<String>? = null) : Parcelable {
@IgnoredOnParcel
private var entryMap: androidx.collection.ArrayMap<String, DownloadEntity>? = androidx.collection.ArrayMap()
@ -339,11 +339,6 @@ data class GameEntity(
) : Parcelable
}
@Parcelize
data class MutexDialog(val status: String = "off", //on/off
@SerializedName("package")
val packages: List<String> = arrayListOf()) : Parcelable
companion object {
const val TAG: String = "GameEntity"
}

View File

@ -94,7 +94,7 @@ public class LoginFragment extends NormalFragment implements LoginUtils.onCaptch
mLoginCaptcha.setText(arg1 + "s后重新获取");
} else {
mLoginCaptcha.setText("重新获取");
mLoginCaptcha.setTextColor(ContextCompat.getColor(getContext(), R.color.text_1383EB));
mLoginCaptcha.setTextColor(ContextCompat.getColor(getContext(), R.color.theme_font));
// mLoginCaptcha.setBackgroundResource(R.drawable.border_black_bg);
mLoginCaptcha.setEnabled(true);
}
@ -132,7 +132,7 @@ public class LoginFragment extends NormalFragment implements LoginUtils.onCaptch
@Override
public void updateDrawState(@NonNull TextPaint ds) {
super.updateDrawState(ds);
ds.setColor(getResources().getColor(R.color.theme));
ds.setColor(getResources().getColor(R.color.theme_font));
ds.setUnderlineText(false);
}
@ -149,7 +149,7 @@ public class LoginFragment extends NormalFragment implements LoginUtils.onCaptch
@Override
public void updateDrawState(@NonNull TextPaint ds) {
super.updateDrawState(ds);
ds.setColor(getResources().getColor(R.color.text_1383EB));
ds.setColor(getResources().getColor(R.color.theme_font));
ds.setUnderlineText(false);
}

View File

@ -91,7 +91,7 @@ class GameUploadFragment : NormalFragment() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = resources.getColor(R.color.theme)
ds.color = resources.getColor(R.color.theme_font)
ds.isUnderlineText = false
}
@ -105,7 +105,7 @@ class GameUploadFragment : NormalFragment() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = resources.getColor(R.color.theme)
ds.color = resources.getColor(R.color.theme_font)
ds.isUnderlineText = false
}

View File

@ -211,7 +211,7 @@ class RatingCommentItemViewHolder(val binding: RatingCommentItemBinding) : BaseR
auditText.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = R.color.theme.toColor()
ds.color = R.color.theme_font.toColor()
}
override fun onClick(widget: View) {
@ -222,7 +222,7 @@ class RatingCommentItemViewHolder(val binding: RatingCommentItemBinding) : BaseR
auditText.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = R.color.theme.toColor()
ds.color = R.color.theme_font.toColor()
}
override fun onClick(widget: View) {

View File

@ -375,11 +375,11 @@ class RatingReplyAdapter(context: Context,
holder.sectionTitle.text = ("全部回复(" + mEntityList[position].replyCount + ")")
holder.sortPositive.setOnClickListener {
holder.sortNegative.setTextColor(ContextCompat.getColor(mContext, R.color.title))
holder.sortPositive.setTextColor(ContextCompat.getColor(mContext, R.color.theme))
holder.sortPositive.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font))
viewModel.sortList(RatingReplyViewModel.SORT_POSITIVE)
}
holder.sortNegative.setOnClickListener {
holder.sortNegative.setTextColor(ContextCompat.getColor(mContext, R.color.theme))
holder.sortNegative.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font))
holder.sortPositive.setTextColor(ContextCompat.getColor(mContext, R.color.title))
viewModel.sortList(RatingReplyViewModel.SORT_NEGATION)
}

View File

@ -125,7 +125,7 @@ class CommentLogsAdapter(context: Context,
msp.length,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
msp.setSpan(
BackgroundColorSpan(mContext.resources.getColor(R.color.theme)),
BackgroundColorSpan(mContext.resources.getColor(R.color.theme_font)),
(msp.length - value.length),
msp.length,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)

View File

@ -36,7 +36,7 @@ class HelpCategoryAdapter(context: Context,
val entity = mCategoryList[position]
holder.binding.content.text = entity.name
holder.binding.content.setTextColor(
if (mSelectMap[position] == true) R.color.text_1383EB.toColor()
if (mSelectMap[position] == true) R.color.theme_font.toColor()
else R.color.text_333333.toColor())
ImageUtils.display(holder.binding.icon, entity.icon)

View File

@ -185,7 +185,7 @@ public class ConcernFragment extends NormalFragment implements SwipeRefreshLayou
if (TextUtils.isEmpty(UserManager.getInstance().getToken())) {
mEmptyTv.setText(getString(R.string.login_hint));
mEmptyTv.setTextColor(getResources().getColor(R.color.theme));
mEmptyTv.setTextColor(getResources().getColor(R.color.theme_font));
} else {
mEmptyTv.setText(getString(R.string.ask_none));
mEmptyTv.setTextColor(getResources().getColor(R.color.c7c7c7));
@ -345,7 +345,7 @@ public class ConcernFragment extends NormalFragment implements SwipeRefreshLayou
} else {
if (mAdapter.getItemCount() == 0) {
mEmptyTv.setText("点击刷新");
mEmptyTv.setTextColor(getResources().getColor(R.color.theme));
mEmptyTv.setTextColor(getResources().getColor(R.color.theme_font));
mEmptyTv.setOnClickListener(v -> {
refresh();
mEmptyTv.setOnClickListener(null);

View File

@ -138,7 +138,7 @@ public class Libao2Fragment extends BaseFragment implements SwipeRefreshLayout.O
mLoadingLayout.setVisibility(View.GONE);
mEmptyLayout.setVisibility(View.VISIBLE);
mNoDataTv.setText(R.string.login_hint);
mNoDataTv.setTextColor(getResources().getColor(R.color.theme));
mNoDataTv.setTextColor(getResources().getColor(R.color.theme_font));
}
@Override

View File

@ -119,7 +119,7 @@ public class Libao3Fragment extends BaseFragment implements SwipeRefreshLayout.O
mLoadingLayout.setVisibility(View.GONE);
mEmptyLayout.setVisibility(View.VISIBLE);
mNoDataTv.setText(R.string.login_hint);
mNoDataTv.setTextColor(ContextCompat.getColor(getContext(), R.color.theme));
mNoDataTv.setTextColor(ContextCompat.getColor(getContext(), R.color.theme_font));
}
@OnClick({R.id.reuse_no_connection, R.id.reuse_tv_none_data})

View File

@ -168,7 +168,7 @@ public class KeFuFragmentAdapter extends ListAdapter<MessageKeFuEntity> {
!"7moor".equals(link.getType()) &&
!"个人主页".equals(link.getType())) continue;
TextView textView = new TextView(mContext);
textView.setTextColor(mContext.getResources().getColor(R.color.theme));
textView.setTextColor(mContext.getResources().getColor(R.color.theme_font));
textView.setTextSize(12F);
textView.setText(link.getDocument());
textView.setOnClickListener(v -> {

View File

@ -157,7 +157,7 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa
if (hasFocus) {
mMessageDetailEt.setHintTextColor(ContextCompat.getColor(getContext(), R.color.hint));
} else {
mMessageDetailEt.setHintTextColor(ContextCompat.getColor(getContext(), R.color.theme));
mMessageDetailEt.setHintTextColor(ContextCompat.getColor(getContext(), R.color.theme_font));
}
});

View File

@ -92,7 +92,7 @@ class MyFollowedGameViewHolder(var binding: ItemFollowedGameBinding) : RecyclerV
binding.gameItemIncluded.downloadBtn.setOnClickListener { }
} else {
binding.gameItemIncluded.downloadBtn.text = "已关注"
binding.gameItemIncluded.downloadBtn.setTextColor(ContextCompat.getColor(binding.root.context, R.color.theme))
binding.gameItemIncluded.downloadBtn.setTextColor(ContextCompat.getColor(binding.root.context, R.color.theme_font))
binding.gameItemIncluded.downloadBtn.setBackgroundResource(R.drawable.button_border_blue_oval)
binding.gameItemIncluded.downloadBtn.setOnClickListener {

View File

@ -43,7 +43,7 @@ class MyFollowedGameFragment : ListFragment<GameEntity, MyFollowedGameViewModel>
super.onStart()
if (!UserManager.getInstance().isLoggedIn) {
noDataTv.text = getString(R.string.login_hint)
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme))
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
} else {
noDataTv.text = getString(R.string.game_empty)
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.c7c7c7))

View File

@ -144,7 +144,7 @@ class MyPlayedGameAdapter(context: Context, private val mViewModel: PlayedGameVi
content.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = ContextCompat.getColor(mContext, R.color.theme)
ds.color = ContextCompat.getColor(mContext, R.color.theme_font)
ds.isUnderlineText = false
}

View File

@ -30,7 +30,7 @@ class MyReservationFragment : ListFragment<GameEntity, MyReservationViewModel>()
super.onStart()
if (TextUtils.isEmpty(UserManager.getInstance().userId)) {
noDataTv.text = getString(R.string.login_hint)
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme))
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
} else {
noDataTv.text = getString(R.string.game_empty)
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.c7c7c7))

View File

@ -372,7 +372,7 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
if (mNewsDetailEntity.getMe() != null && mNewsDetailEntity.getMe().isGameConcerned()) {
viewHolder.gameConcern.setText(R.string.cancel_concern);
viewHolder.gameConcern.setBackgroundResource(R.drawable.button_normal_border);
viewHolder.gameConcern.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
viewHolder.gameConcern.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
} else {
viewHolder.gameConcern.setText(R.string.concern);
viewHolder.gameConcern.setBackgroundResource(R.drawable.button_normal_style);
@ -434,7 +434,7 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
concern.setText(R.string.cancel_concern);
concern.setBackgroundResource(R.drawable.button_normal_border);
concern.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
concern.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
Utils.toast(mContext, R.string.concern_success);
viewHolder.gameConcern.setEnabled(true);
@ -649,7 +649,7 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
, ViewGroup.LayoutParams.WRAP_CONTENT));
textView.setText(("查看全部评论(" + NumberUtils.transSimpleCount(mCommentNum) + ""));
textView.setPadding(0, DisplayUtils.dip2px(mContext, 12), 0, DisplayUtils.dip2px(mContext, 12));
textView.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
textView.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
textView.setTextSize(15);
linearLayout.addView(textView);

View File

@ -63,7 +63,7 @@ class FollowersOrFansAdapter(context: Context, val mViewModel: FollowersOrFansVi
setBackgroundResource(R.drawable.questions_detail_tag_bg)
} else {
setText(R.string.concern)
setTextColor(R.color.text_1383EB.toColor())
setTextColor(R.color.theme_font.toColor())
setBackgroundResource(R.drawable.questions_detail_tag_bg)
}
}

View File

@ -266,7 +266,7 @@ class UserHomeFragment : NormalFragment() {
setBackgroundResource(R.drawable.questions_detail_tag_bg)
} else {
setText(R.string.concern)
setTextColor(R.color.text_1383EB.toColor())
setTextColor(R.color.theme_font.toColor())
setBackgroundResource(R.drawable.questions_detail_tag_bg)
}
}

View File

@ -202,7 +202,7 @@ class CommunityAnswerItemViewHolder(val binding: CommunityAnswerItemBinding) : B
}
private fun playVoteAnimation() {
binding.voteCount.setTextColor(R.color.text_1383EB.toColor())
binding.voteCount.setTextColor(R.color.theme_font.toColor())
binding.voteIcon.isChecked = true
binding.voteIcon.visibility = View.GONE
binding.voteAnimation.visibility = View.VISIBLE

View File

@ -443,7 +443,7 @@ class AnswerDetailFragment : NormalFragment() {
// 是否已回答
when (mAnswerStatus) {
ANSWERED_MY_ANSWER -> {
mBinding.statusTv.setTextColor(R.color.theme.toColor())
mBinding.statusTv.setTextColor(R.color.theme_font.toColor())
DrawableView.setTextDrawable(
mBinding.statusTv,
R.drawable.question_detail_answer_icon,
@ -457,14 +457,14 @@ class AnswerDetailFragment : NormalFragment() {
"我的回答")
}
NOT_ANSWERED_BUT_HAVE_DRAFT -> {
mBinding.statusTv.setTextColor(R.color.theme.toColor())
mBinding.statusTv.setTextColor(R.color.theme_font.toColor())
DrawableView.setTextDrawable(
mBinding.statusTv,
R.drawable.question_detail_answer_icon,
"继续回答")
}
NOT_ANSWERED_YET -> {
mBinding.statusTv.setTextColor(R.color.theme.toColor())
mBinding.statusTv.setTextColor(R.color.theme_font.toColor())
DrawableView.setTextDrawable(
mBinding.statusTv,
R.drawable.question_detail_answer_icon,
@ -938,7 +938,7 @@ class AnswerDetailFragment : NormalFragment() {
if (isCollected) {
mBinding.bottomController.tvCollect.text = "已收藏"
mBinding.bottomController.ivCollect.setImageResource(R.drawable.community_content_detail_collect_select)
mBinding.bottomController.tvCollect.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme))
mBinding.bottomController.tvCollect.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
} else {
mBinding.bottomController.tvCollect.text = "收藏"
mBinding.bottomController.ivCollect.setImageResource(R.drawable.community_content_detail_collect_unselect)
@ -1144,7 +1144,7 @@ class AnswerDetailFragment : NormalFragment() {
} else {
mBinding.followTv.visibility = View.VISIBLE
mBinding.followTv.background = DrawableView.getOvalDrawable(R.color.background, 2F)
mBinding.followTv.setTextColor(R.color.text_1383EB.toColor())
mBinding.followTv.setTextColor(R.color.theme_font.toColor())
DrawableView.setTextDrawable(
mBinding.followTv,
R.drawable.answer_detail_follow_icon,
@ -1157,7 +1157,7 @@ class AnswerDetailFragment : NormalFragment() {
mBinding.bottomController.tvLike.text = "赞同 ${NumberUtils.transSimpleCount(voteCount)}"
if (alreadyVoted) {
mBinding.bottomController.ivLike.setImageResource(R.drawable.community_content_detail_vote_select)
mBinding.bottomController.tvLike.setTextColor(ContextCompat.getColor(context!!, R.color.theme))
mBinding.bottomController.tvLike.setTextColor(ContextCompat.getColor(context!!, R.color.theme_font))
} else {
mBinding.bottomController.ivLike.setImageResource(R.drawable.community_content_detail_vote_unselect)
mBinding.bottomController.tvLike.setTextColor(ContextCompat.getColor(context!!, R.color.text_242529))

View File

@ -429,7 +429,7 @@ class ArticleDetailActivity : ToolBarActivity() {
}, 2000L)
} else {
mBinding.articleDetailFollow.background = ContextCompat.getDrawable(this, R.drawable.questions_detail_tag_bg)
mBinding.articleDetailFollow.setTextColor(ContextCompat.getColor(this, R.color.text_1383EB))
mBinding.articleDetailFollow.setTextColor(ContextCompat.getColor(this, R.color.theme_font))
mBinding.articleDetailFollow.setText(R.string.concern)
}
}
@ -484,7 +484,7 @@ class ArticleDetailActivity : ToolBarActivity() {
if (isCollected) {
mBinding.includedLayout.tvCollect.text = "已收藏"
mBinding.includedLayout.ivCollect.setImageResource(R.drawable.community_content_detail_collect_select)
mBinding.includedLayout.tvCollect.setTextColor(ContextCompat.getColor(this, R.color.theme))
mBinding.includedLayout.tvCollect.setTextColor(ContextCompat.getColor(this, R.color.theme_font))
} else {
mBinding.includedLayout.tvCollect.text = "收藏"
mBinding.includedLayout.ivCollect.setImageResource(R.drawable.community_content_detail_collect_unselect)
@ -657,7 +657,7 @@ class ArticleDetailActivity : ToolBarActivity() {
if (detailEntity.me.isCommunityArticleFavorite) {
ivCollect.setImageResource(R.drawable.community_content_detail_collect_select)
tvCollect.text = "已收藏"
tvCollect.setTextColor(ContextCompat.getColor(this@ArticleDetailActivity, R.color.theme))
tvCollect.setTextColor(ContextCompat.getColor(this@ArticleDetailActivity, R.color.theme_font))
} else {
ivCollect.setImageResource(R.drawable.community_content_detail_collect_unselect)
tvCollect.text = "收藏"
@ -742,7 +742,7 @@ class ArticleDetailActivity : ToolBarActivity() {
mBinding.includedLayout.tvLike.text = "赞同 ${NumberUtils.transSimpleCount(voteCount)}"
if (alreadyVoted) {
mBinding.includedLayout.ivLike.setImageResource(R.drawable.community_content_detail_vote_select)
mBinding.includedLayout.tvLike.setTextColor(ContextCompat.getColor(this, R.color.theme))
mBinding.includedLayout.tvLike.setTextColor(ContextCompat.getColor(this, R.color.theme_font))
} else {
mBinding.includedLayout.ivLike.setImageResource(R.drawable.community_content_detail_vote_unselect)
mBinding.includedLayout.tvLike.setTextColor(ContextCompat.getColor(this, R.color.text_242529))
@ -762,7 +762,7 @@ class ArticleDetailActivity : ToolBarActivity() {
val tagTv = view as TextView
tagTv.text = tag
tagTv.background = DrawableView.getOvalDrawable(R.color.text_EEF5FB, 2F)
tagTv.setTextColor(if (!isCommunityName) R.color.theme.toColor() else R.color.text_333333.toColor())
tagTv.setTextColor(if (!isCommunityName) R.color.theme_font.toColor() else R.color.text_333333.toColor())
if (isCommunityName) {
tagTv.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, R.drawable.ic_video_detail_game), null, null, null)
tagTv.compoundDrawablePadding = 4F.dip2px()

View File

@ -163,7 +163,7 @@ class ArticleTagsSelectFragment : BaseFragment<String>() {
if (text != null && text.toString() == tag) {
mViewModel?.selectedTags?.add(tag)
tagView.setBackgroundResource(R.drawable.comment_border_bg)
tagView.setTextColor(ContextCompat.getColor(context!!, R.color.theme))
tagView.setTextColor(ContextCompat.getColor(context!!, R.color.theme_font))
}
}
}
@ -182,7 +182,7 @@ class ArticleTagsSelectFragment : BaseFragment<String>() {
tagTv.setOnClickListener {
if (mViewModel?.selectTag(tagTv.text.toString())!!) {
tagTv.setBackgroundResource(R.drawable.comment_border_bg)
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.theme))
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.theme_font))
} else {
tagTv.setBackgroundResource(R.drawable.border_suggest_bg)
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.content))
@ -192,7 +192,7 @@ class ArticleTagsSelectFragment : BaseFragment<String>() {
if (isSelect) {
mViewModel?.selectedTags?.add(tag)
tagTv.setBackgroundResource(R.drawable.comment_border_bg)
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.theme))
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.theme_font))
}
mAllTags.add(tag)
}

View File

@ -154,7 +154,7 @@ open class NewCommentFragment : ListFragment<CommentEntity, NewCommentViewModel>
if (hasFocus) {
commentEt.setHintTextColor(ContextCompat.getColor(requireContext(), R.color.hint))
} else {
commentEt.setHintTextColor(ContextCompat.getColor(requireContext(), R.color.theme))
commentEt.setHintTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
}
}

View File

@ -88,7 +88,7 @@ class VideoActivity : ListActivity<MyVideoEntity, NormalListViewModel<MyVideoEnt
uploadProtocolText.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = resources.getColor(R.color.theme)
ds.color = resources.getColor(R.color.theme_font)
ds.isUnderlineText = true
}

View File

@ -49,7 +49,7 @@ class AskFollowFragment : ListFragment<PersonalHistoryEntity, AskFollowViewModel
super.onStart()
if (TextUtils.isEmpty(UserManager.getInstance().userId)) {
noDataTv.text = "请先登录"
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme))
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
} else {
if (isShowingRecommendedUser()) {
onLoadRefresh()
@ -147,7 +147,7 @@ class AskFollowFragment : ListFragment<PersonalHistoryEntity, AskFollowViewModel
DirectUtils.directToBadgeWall(requireContext(), user.id, user.name, user.icon)
}
followTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_1383EB))
followTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
followTv.text = "关注"
followTv.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
followTv.setBackgroundResource(R.drawable.questions_detail_tag_bg)
@ -159,7 +159,7 @@ class AskFollowFragment : ListFragment<PersonalHistoryEntity, AskFollowViewModel
mListViewModel.followSet.add(user.id)
} else {
followTv.text = "关注"
followTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_1383EB))
followTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
mListViewModel.followSet.remove(user.id)
}
updateSaveBtn()
@ -233,7 +233,7 @@ class AskFollowFragment : ListFragment<PersonalHistoryEntity, AskFollowViewModel
if (TextUtils.isEmpty(UserManager.getInstance().token)) {
noDataTv.text = getString(R.string.login_hint)
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme))
noDataTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
} else {
mListRefresh?.isEnabled = false
noDataContainer.visibility = View.GONE

View File

@ -280,7 +280,7 @@ class QuestionsDetailAdapter(
DrawableView.setTextDrawable(holder.concern, R.drawable.ic_followed_question, "已关注")
}
else -> {
holder.concern.setTextColor(ContextCompat.getColor(mContext, R.color.text_1383EB))
holder.concern.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font))
DrawableView.setTextDrawable(holder.concern, R.drawable.ic_follow_question, "关注问题")
}
}
@ -316,7 +316,7 @@ class QuestionsDetailAdapter(
tagTv.gravity = Gravity.CENTER
tagTv.textSize = 12F
tagTv.background = DrawableView.getOvalDrawable(R.color.text_EEF5FB, 2F)
tagTv.setTextColor(R.color.theme.toColor())
tagTv.setTextColor(R.color.theme_font.toColor())
tagTv.setPadding(8F.dip2px(), 0, 8F.dip2px(), 0)
val params = FlexboxLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, 24F.dip2px())

View File

@ -292,7 +292,7 @@ class TagsSelectFragment : BaseFragment<String>() {
if (text != null && text.toString() == tag) {
mViewModel?.selectedTags?.add(tag)
tagView.setBackgroundResource(R.drawable.comment_border_bg)
tagView.setTextColor(ContextCompat.getColor(context!!, R.color.theme))
tagView.setTextColor(ContextCompat.getColor(context!!, R.color.theme_font))
}
}
}
@ -311,7 +311,7 @@ class TagsSelectFragment : BaseFragment<String>() {
tagTv.setOnClickListener {
if (mViewModel?.selectTag(tagTv.text.toString())!!) {
tagTv.setBackgroundResource(R.drawable.comment_border_bg)
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.theme))
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.theme_font))
} else {
tagTv.setBackgroundResource(R.drawable.border_suggest_bg)
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.content))
@ -321,7 +321,7 @@ class TagsSelectFragment : BaseFragment<String>() {
if (isSelect) {
mViewModel?.selectedTags?.add(tag)
tagTv.setBackgroundResource(R.drawable.comment_border_bg)
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.theme))
tagTv.setTextColor(ContextCompat.getColor(context!!, R.color.theme_font))
}
mAllTags.add(tag)
}

View File

@ -35,7 +35,7 @@ class RecommendConcernAdapter(context: Context,
holder.binding.data = entity
holder.binding.concernCommand.let { v ->
v.setBackgroundResource(R.drawable.questions_detail_tag_bg)
v.setTextColor(R.color.text_1383EB.toColor())
v.setTextColor(R.color.theme_font.toColor())
v.text = "关注"
v.setOnClickListener {
MtaHelper.onEvent("问答页面", UserManager.getInstance().community.name, "推荐关注-关注")

View File

@ -49,7 +49,7 @@ class UserAdapter(context: Context,
}
else -> {
setText(R.string.concern)
setTextColor(ContextCompat.getColor(mContext, R.color.text_1383EB))
setTextColor(ContextCompat.getColor(mContext, R.color.theme_font))
setBackgroundResource(R.drawable.questions_detail_tag_bg)
}
}

View File

@ -132,12 +132,12 @@ class OpenedAdapter(context: Context, val mListViewModel: OpenedViewModel) : Lis
holder.bind.isSelectRight = isSelectRight
if (isSelectLeft) {
holder.bind.communityNameLeft.setTextColor(R.color.theme.toColor())
holder.bind.communityNameLeft.setTextColor(R.color.theme_font.toColor())
} else {
holder.bind.communityNameLeft.setTextColor(R.color.text_333333.toColor())
}
if (isSelectRight) {
holder.bind.communityNameRight.setTextColor(R.color.theme.toColor())
holder.bind.communityNameRight.setTextColor(R.color.theme_font.toColor())
} else {
holder.bind.communityNameRight.setTextColor(R.color.text_333333.toColor())
}

View File

@ -2253,7 +2253,7 @@ public interface ApiService {
* 标记收藏文章已读
*/
@POST("users/{user_id}/favorites/communities/{community_id}/articles/{article_id}:read")
Single<ResponseBody> postCollectionArticleRead(@Path("user_id") String userId, @Path("community_id") String communityId, @Path("answer_id") String answerId);
Single<ResponseBody> postCollectionArticleRead(@Path("user_id") String userId, @Path("community_id") String communityId, @Path("article_id") String articleId);
/**
* 获取专题刷新游戏列表

View File

@ -36,8 +36,8 @@ class GameServersActivity : ToolBarActivity() {
setToolbarMenu(R.menu.menu_download)
mServersPublish.isChecked = true
mServersTest.setTextColor(DrawableView.getSelectorColorStyle(R.color.black, R.color.theme))
mServersPublish.setTextColor(DrawableView.getSelectorColorStyle(R.color.black, R.color.theme))
mServersTest.setTextColor(DrawableView.getSelectorColorStyle(R.color.black, R.color.theme_font))
mServersPublish.setTextColor(DrawableView.getSelectorColorStyle(R.color.black, R.color.theme_font))
mServersTest.setOnClickListener { mViewpager.currentItem = mServersTestIndex }
mServersPublish.setOnClickListener { mViewpager.currentItem = mServersPublishIndex }

View File

@ -92,7 +92,7 @@ class GameServersPublishFragment : BaseFragment<Any>() {
MtaHelper.onEvent("开服表", "开服Tab-游戏分类", "点击游戏分类")
v.isChecked = true
v.setTextColor(R.color.theme.toColor())
v.setTextColor(R.color.theme_font.toColor())
val inflater = LayoutInflater.from(context)
val layout = inflater.inflate(R.layout.popup_server_category, null)
@ -123,7 +123,7 @@ class GameServersPublishFragment : BaseFragment<Any>() {
label.textSize = 13F
label.text = name
label.background = DrawableView.getOvalSelectorStyle(R.color.background, R.color.text_e6f3ff)
label.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme))
label.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme_font))
label.setSingleLine(true)
labelsContainer.addView(label)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
@ -198,7 +198,7 @@ class GameServersPublishFragment : BaseFragment<Any>() {
MtaHelper.onEvent("开服表", "开服Tab", "开服时间")
v.isChecked = true
v.setTextColor(R.color.theme.toColor())
v.setTextColor(R.color.theme_font.toColor())
val inflater = LayoutInflater.from(v.context)
val layout = inflater.inflate(R.layout.popup_server_time, null)
@ -278,10 +278,10 @@ class GameServersPublishFragment : BaseFragment<Any>() {
}
}
all.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme))
today.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme))
tomorrow.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme))
after.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme))
all.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme_font))
today.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme_font))
tomorrow.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme_font))
after.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme_font))
layout.setOnClickListener {
popupWindow.dismiss()

View File

@ -59,7 +59,7 @@ class GameServersTestFragment : BaseFragment<Any>() {
MtaHelper.onEvent("开服表", "开测Tab", "测试状态")
v.isChecked = true
v.setTextColor(R.color.theme.toColor())
v.setTextColor(R.color.theme_font.toColor())
val inflater = LayoutInflater.from(context)
val layout = inflater.inflate(R.layout.popup_server_status, null)
@ -75,10 +75,10 @@ class GameServersTestFragment : BaseFragment<Any>() {
val deleteServer = layout.findViewById<TextView>(R.id.delete_server)
when (mType) {
"开测" -> all.setTextColor(R.color.theme.toColor())
"公测" -> publishServer.setTextColor(R.color.theme.toColor())
"不删档内测" -> notDeleteServer.setTextColor(R.color.theme.toColor())
"删档内测" -> deleteServer.setTextColor(R.color.theme.toColor())
"开测" -> all.setTextColor(R.color.theme_font.toColor())
"公测" -> publishServer.setTextColor(R.color.theme_font.toColor())
"不删档内测" -> notDeleteServer.setTextColor(R.color.theme_font.toColor())
"删档内测" -> deleteServer.setTextColor(R.color.theme_font.toColor())
}
layout.setOnClickListener {
@ -120,7 +120,7 @@ class GameServersTestFragment : BaseFragment<Any>() {
MtaHelper.onEvent("开服表", "开测Tab", "开测时间")
v.isChecked = true
v.setTextColor(R.color.theme.toColor())
v.setTextColor(R.color.theme_font.toColor())
val inflater = LayoutInflater.from(v.context)
val layout = inflater.inflate(R.layout.popup_server_time, null)
@ -159,10 +159,10 @@ class GameServersTestFragment : BaseFragment<Any>() {
hourContainer.removeAllViews()
all.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme))
today.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme))
tomorrow.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme))
after.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme))
all.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme_font))
today.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme_font))
tomorrow.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme_font))
after.setTextColor(DrawableView.getSelectorColorStyle(R.color.text_333333, R.color.theme_font))
layout.setOnClickListener {
popupWindow.dismiss()

View File

@ -114,7 +114,7 @@ class AddKaiFuActivity : ToolBarActivity() {
.setTitleSize(15)
.setOutSideCancelable(false)
.isCyclic(false)
.setSubmitColor(ContextCompat.getColor(this, R.color.theme))
.setSubmitColor(ContextCompat.getColor(this, R.color.theme_font))
.setCancelColor(ContextCompat.getColor(this, R.color.hint))
.setTitleBgColor(Color.WHITE)
.setBgColor(Color.WHITE)

View File

@ -228,7 +228,7 @@ class VideoAdapter(val mContext: Context, val mRecyclerView: RecyclerView, val m
downloadBtn.setBackgroundResource(R.drawable.game_item_btn_plugin_style)
} else if ("打开" == status || "启动" == status) {
downloadBtn.setBackgroundResource(R.drawable.detail_download_open_style)
downloadBtn.setTextColor(ContextCompat.getColor(context, R.color.theme))
downloadBtn.setTextColor(ContextCompat.getColor(context, R.color.theme_font))
} else {
downloadBtn.setBackgroundResource(R.drawable.video_detail_btn_download_up)
}

View File

@ -456,7 +456,7 @@ class UploadVideoActivity : ToolBarActivity() {
uploadProtocolText.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = resources.getColor(R.color.theme)
ds.color = resources.getColor(R.color.theme_font)
ds.isUnderlineText = false
}
@ -468,7 +468,7 @@ class UploadVideoActivity : ToolBarActivity() {
uploadProtocolText.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = resources.getColor(R.color.theme)
ds.color = resources.getColor(R.color.theme_font)
ds.isUnderlineText = false
}

View File

@ -57,7 +57,7 @@ public class AboutFragment extends NormalFragment {
if (msg.what == 0) {
final String version = (String) msg.obj;
mAboutVersion.setText(StringUtils.buildString("发现新版本 V", version));
mAboutVersion.setTextColor(ContextCompat.getColor(getContext(), R.color.theme));
mAboutVersion.setTextColor(ContextCompat.getColor(getContext(), R.color.theme_font));
} else if (msg.what == 1) {
mAboutVersion.setText(R.string.toast_upload_latest);
}

View File

@ -474,9 +474,9 @@ public class SettingsFragment extends NormalFragment {
Button negativeBtn = alertDialog.getButton(android.app.AlertDialog.BUTTON_NEGATIVE);
positiveBtn.setTextSize(14);
positiveBtn.setTextColor(ContextCompat.getColor(getContext(), R.color.theme));
positiveBtn.setTextColor(ContextCompat.getColor(getContext(), R.color.theme_font));
negativeBtn.setTextSize(14);
negativeBtn.setTextColor(ContextCompat.getColor(getContext(), R.color.theme));
negativeBtn.setTextColor(ContextCompat.getColor(getContext(), R.color.theme_font));
if (message != null) {
message.setTextSize(14);
message.setTextColor(ContextCompat.getColor(getContext(), R.color.system_bar));

View File

@ -119,7 +119,7 @@ class MyConcernAdapter extends BaseRecyclerAdapter<ConcernViewHolder> {
holder.concern_item_concern.setBackgroundResource(R.drawable.button_border_gray_oval);
} else {
holder.concern_item_concern.setText(R.string.cancel_concern);
holder.concern_item_concern.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
holder.concern_item_concern.setTextColor(ContextCompat.getColor(mContext, R.color.theme_font));
holder.concern_item_concern.setBackgroundResource(R.drawable.button_border_blue_oval);
}
holder.concern_item_concern.setOnClickListener(v -> {