修改首页
This commit is contained in:
@@ -207,28 +207,30 @@ public class BottomTab extends LinearLayout implements View.OnClickListener {
|
||||
if (0 == targetPosition) {
|
||||
((TextView) findViewById(R.id.bottom_tab_main_text)).setTextColor(ContextCompat.getColor(mContext, R.color.zhimi_bottom_text_selected));
|
||||
((ImageView) findViewById(R.id.bottom_tab_main_image)).setImageResource(R.drawable.ic_tab_home2);
|
||||
setImageLayoutParams(findViewById(R.id.bottom_tab_main_image), 28);
|
||||
setImageLayoutParams(findViewById(R.id.bottom_tab_main_image), 24);
|
||||
}
|
||||
if (1 == targetPosition) {
|
||||
((TextView) findViewById(R.id.bottom_tab_dynamic_text)).setTextColor(ContextCompat.getColor(mContext, R.color.zhimi_bottom_text_selected));
|
||||
((ImageView) findViewById(R.id.bottom_tab_dynamic_image)).setImageResource(R.drawable.ic_tab_dynamic2);
|
||||
setImageLayoutParams(findViewById(R.id.bottom_tab_dynamic_image), 28);
|
||||
setImageLayoutParams(findViewById(R.id.bottom_tab_dynamic_image), 24);
|
||||
} else if (3 == targetPosition) {
|
||||
((TextView) findViewById(R.id.bottom_tab_news_text)).setTextColor(ContextCompat.getColor(mContext, R.color.zhimi_bottom_text_selected));
|
||||
if (TextUtils.isEmpty(avatar)) {
|
||||
bottom_tab_news_image.setImageResource(R.drawable.ic_tab_news2);
|
||||
setImageLayoutParams(bottom_tab_news_image, 28);
|
||||
} else {
|
||||
setImageLayoutParams(bottom_tab_news_image, 28);
|
||||
}
|
||||
// if (TextUtils.isEmpty(avatar)) {
|
||||
// bottom_tab_news_image.setImageResource(R.drawable.ic_tab_news2);
|
||||
// setImageLayoutParams(bottom_tab_news_image, 24);
|
||||
// } else {
|
||||
// setImageLayoutParams(bottom_tab_news_image, 24);
|
||||
// }
|
||||
((ImageView) findViewById(R.id.bottom_tab_news_image)).setImageResource(R.drawable.ic_tab_news2);
|
||||
setImageLayoutParams(bottom_tab_news_image, 24);
|
||||
} else if (4 == targetPosition) {
|
||||
((TextView) findViewById(R.id.bottom_tab_settings_text)).setTextColor(ContextCompat.getColor(mContext, R.color.zhimi_bottom_text_selected));
|
||||
((ImageView) findViewById(R.id.bottom_tab_settings_image)).setImageResource(R.drawable.ic_tab_my2);
|
||||
setImageLayoutParams(findViewById(R.id.bottom_tab_settings_image), 28);
|
||||
setImageLayoutParams(findViewById(R.id.bottom_tab_settings_image), 24);
|
||||
} else if (2 == targetPosition) {
|
||||
((TextView) findViewById(R.id.bottom_tab_ranking_text)).setTextColor(ContextCompat.getColor(mContext, R.color.zhimi_bottom_text_selected));
|
||||
((ImageView) findViewById(R.id.main_fragment_video)).setImageResource(R.drawable.ic_tab_ranking2);
|
||||
setImageLayoutParams(findViewById(R.id.main_fragment_video), 28);
|
||||
setImageLayoutParams(findViewById(R.id.main_fragment_video), 24);
|
||||
}
|
||||
|
||||
if (targetPosition == currentPosition) {
|
||||
@@ -245,12 +247,14 @@ public class BottomTab extends LinearLayout implements View.OnClickListener {
|
||||
setImageLayoutParams(findViewById(R.id.bottom_tab_dynamic_image), 24);
|
||||
} else if (3 == currentPosition) {
|
||||
((TextView) findViewById(R.id.bottom_tab_news_text)).setTextColor(ContextCompat.getColor(mContext, R.color.zhimi_bottom_text));
|
||||
if (TextUtils.isEmpty(avatar)) {
|
||||
bottom_tab_news_image.setImageResource(R.drawable.ic_tab_news1);
|
||||
setImageLayoutParams(bottom_tab_news_image, 24);
|
||||
} else {
|
||||
setImageLayoutParams(bottom_tab_news_image, 28);
|
||||
}
|
||||
// if (TextUtils.isEmpty(avatar)) {
|
||||
// bottom_tab_news_image.setImageResource(R.drawable.ic_tab_news1);
|
||||
// setImageLayoutParams(bottom_tab_news_image, 24);
|
||||
// } else {
|
||||
// setImageLayoutParams(bottom_tab_news_image, 28);
|
||||
// }
|
||||
setImageLayoutParams(bottom_tab_news_image, 24);
|
||||
((ImageView) findViewById(R.id.bottom_tab_news_image)).setImageResource(R.drawable.ic_tab_news1);
|
||||
} else if (4 == currentPosition) {
|
||||
((TextView) findViewById(R.id.bottom_tab_settings_text)).setTextColor(ContextCompat.getColor(mContext, R.color.zhimi_bottom_text));
|
||||
((ImageView) findViewById(R.id.bottom_tab_settings_image)).setImageResource(R.drawable.ic_tab_my1);
|
||||
@@ -292,18 +296,18 @@ public class BottomTab extends LinearLayout implements View.OnClickListener {
|
||||
mNewsCountView.setVisibility(VISIBLE);
|
||||
}
|
||||
Log.i("TAG", "setNewCount: ----------->" + avatar);
|
||||
if (!TextUtils.isEmpty(avatar)) {
|
||||
bottom_tab_news_image.setImageURI(avatar);
|
||||
setImageLayoutParams(bottom_tab_news_image, 28);
|
||||
} else {
|
||||
if (3 == mCurrentPosition) {
|
||||
bottom_tab_news_image.setImageResource(R.drawable.ic_tab_news2);
|
||||
setImageLayoutParams(bottom_tab_news_image, 28);
|
||||
} else {
|
||||
bottom_tab_news_image.setImageResource(R.drawable.ic_tab_news1);
|
||||
setImageLayoutParams(bottom_tab_news_image, 24);
|
||||
}
|
||||
}
|
||||
// if (!TextUtils.isEmpty(avatar)) {
|
||||
// bottom_tab_news_image.setImageURI(avatar);
|
||||
// setImageLayoutParams(bottom_tab_news_image, 28);
|
||||
// } else {
|
||||
// if (3 == mCurrentPosition) {
|
||||
// bottom_tab_news_image.setImageResource(R.drawable.ic_tab_news2);
|
||||
// setImageLayoutParams(bottom_tab_news_image, 28);
|
||||
// } else {
|
||||
// bottom_tab_news_image.setImageResource(R.drawable.ic_tab_news1);
|
||||
// setImageLayoutParams(bottom_tab_news_image, 24);
|
||||
// }
|
||||
// }
|
||||
|
||||
// String manufacturer = Build.MANUFACTURER;
|
||||
// if (manufacturer != null && manufacturer.length() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user