/** 初始化所有panner处于非focus样式 * */ private void initPaneTextColor() { tvPane1.setTextColor(getResources().getColor(R.color.white)); tvPane2.setTextColor(getResources().getColor(R.color.white)); tvPane3.setTextColor(getResources().getColor(R.color.white)); mChildPane1.setBackgroundResource(R.drawable.v1_base_btn_white__unpress); mChildPane2.setBackgroundResource(R.drawable.v1_base_btn_white__unpress); mChildPane3.setBackgroundResource(R.drawable.v1_base_btn_white__unpress); }
/** * 使panner显示foces样式 * * @param position */ private void setPannerToFoces(int position) { initPaneTextColor(); switch (position) { case 0: tvPane1.setTextColor(getResources().getColor(R.color.yellow)); mChildPane1.setBackgroundResource(R.drawable.v1_base_btn_yellow__unpress); break; case 1: tvPane2.setTextColor(getResources().getColor(R.color.yellow)); mChildPane2.setBackgroundResource(R.drawable.v1_base_btn_yellow__unpress); break; case 2: tvPane3.setTextColor(getResources().getColor(R.color.yellow)); mChildPane3.setBackgroundResource(R.drawable.v1_base_btn_yellow__unpress); break; default: initPaneTextColor(); break; } }