1、修复AppController push被禁用的问题
2、修复deprecated api call, Resources.getColor()
This commit is contained in:
@ -3,6 +3,7 @@ package com.gh.gamecenter;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v4.view.ViewPager.OnPageChangeListener;
|
||||
import android.util.DisplayMetrics;
|
||||
@ -137,18 +138,18 @@ public class DownloadManagerActivity extends BaseActivity implements OnClickList
|
||||
public void onPageSelected(int position) {
|
||||
if (position == 1) {
|
||||
EventBus.getDefault().post(new EBUISwitch("DownloadManagerActivity", 1));
|
||||
downloadmanager_tv_download.setTextColor(getResources().getColor(R.color.theme));
|
||||
downloadmanager_tv_update.setTextColor(getResources().getColor(R.color.title));
|
||||
downloadmanager_tv_send.setTextColor(getResources().getColor(R.color.title));
|
||||
downloadmanager_tv_download.setTextColor(ContextCompat.getColor(this, R.color.theme));
|
||||
downloadmanager_tv_update.setTextColor(ContextCompat.getColor(this, R.color.title));
|
||||
downloadmanager_tv_send.setTextColor(ContextCompat.getColor(this, R.color.title));
|
||||
} else if (position == 2) {
|
||||
EventBus.getDefault().post(new EBUISwitch("DownloadManagerActivity", 2));
|
||||
downloadmanager_tv_download.setTextColor(getResources().getColor(R.color.title));
|
||||
downloadmanager_tv_update.setTextColor(getResources().getColor(R.color.theme));
|
||||
downloadmanager_tv_send.setTextColor(getResources().getColor(R.color.title));
|
||||
downloadmanager_tv_download.setTextColor(ContextCompat.getColor(this, R.color.title));
|
||||
downloadmanager_tv_update.setTextColor(ContextCompat.getColor(this, R.color.theme));
|
||||
downloadmanager_tv_send.setTextColor(ContextCompat.getColor(this, R.color.title));
|
||||
} else {
|
||||
downloadmanager_tv_download.setTextColor(getResources().getColor(R.color.title));
|
||||
downloadmanager_tv_update.setTextColor(getResources().getColor(R.color.title));
|
||||
downloadmanager_tv_send.setTextColor(getResources().getColor(R.color.theme));
|
||||
downloadmanager_tv_download.setTextColor(ContextCompat.getColor(this, R.color.title));
|
||||
downloadmanager_tv_update.setTextColor(ContextCompat.getColor(this, R.color.title));
|
||||
downloadmanager_tv_send.setTextColor(ContextCompat.getColor(this, R.color.theme));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user