Browse Source

no message

master
lh 8 years ago
parent
commit
826bf9d0a7
3 changed files with 38 additions and 2 deletions
  1. +14
    -2
      app/src/main/java/com/qhclh/ytzh/index/shangpin/InHouseActivity.java
  2. +12
    -0
      app/src/main/res/drawable/shape_kuang1.xml
  3. +12
    -0
      app/src/main/res/drawable/shape_kuang2.xml

+ 14
- 2
app/src/main/java/com/qhclh/ytzh/index/shangpin/InHouseActivity.java View File

@ -4,6 +4,7 @@ import android.support.v4.app.FragmentTransaction;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import com.qhclh.ytzh.R; import com.qhclh.ytzh.R;
@ -35,6 +36,13 @@ public class InHouseActivity extends BaseActivity {
@BindView(R.id.tv_inhouse_yes) @BindView(R.id.tv_inhouse_yes)
TextView tv_inhouse_yes; TextView tv_inhouse_yes;
@BindView(R.id.ll_inhouse_all)
LinearLayout ll_inhouse_all;
@BindView(R.id.ll_inhouse_no)
LinearLayout ll_inhouse_no;
@BindView(R.id.ll_inhouse_yes)
LinearLayout ll_inhouse_yes;
///< all ///< all
private static final int TAB_POSITION_ALL = 0; private static final int TAB_POSITION_ALL = 0;
///< no ///< no
@ -112,17 +120,20 @@ public class InHouseActivity extends BaseActivity {
case TAB_POSITION_ALL: { case TAB_POSITION_ALL: {
iv_inhouse_all.setImageResource(R.drawable.shouye_3x); iv_inhouse_all.setImageResource(R.drawable.shouye_3x);
tv_inhouse_all.setTextColor(getResources().getColor(R.color.colorPrimary)); tv_inhouse_all.setTextColor(getResources().getColor(R.color.colorPrimary));
ll_inhouse_all.setBackgroundResource(R.drawable.shape_kuang2);
break; break;
} }
case TAB_POSITION_NO: { case TAB_POSITION_NO: {
iv_inhouse_no.setImageResource(R.drawable.gongzuo_3x); iv_inhouse_no.setImageResource(R.drawable.gongzuo_3x);
tv_inhouse_no.setTextColor(getResources().getColor(R.color.colorPrimary)); tv_inhouse_no.setTextColor(getResources().getColor(R.color.colorPrimary));
ll_inhouse_no.setBackgroundResource(R.drawable.shape_kuang2);
break; break;
} }
case TAB_POSITION_YES: { case TAB_POSITION_YES: {
iv_inhouse_yes.setImageResource(R.drawable.wode_3x); iv_inhouse_yes.setImageResource(R.drawable.wode_3x);
tv_inhouse_yes.setTextColor(getResources().getColor(R.color.colorPrimary)); tv_inhouse_yes.setTextColor(getResources().getColor(R.color.colorPrimary));
ll_inhouse_yes.setBackgroundResource(R.drawable.shape_kuang2);
break; break;
} }
@ -133,14 +144,15 @@ public class InHouseActivity extends BaseActivity {
///< all ///< all
iv_inhouse_all.setImageResource(R.drawable.shouye1_3x); iv_inhouse_all.setImageResource(R.drawable.shouye1_3x);
tv_inhouse_all.setTextColor(getResources().getColor(R.color.grey_767c82)); tv_inhouse_all.setTextColor(getResources().getColor(R.color.grey_767c82));
ll_inhouse_all.setBackgroundResource(R.drawable.shape_kuang1);
///< no ///< no
iv_inhouse_no.setImageResource(R.drawable.gongzuo1_3x); iv_inhouse_no.setImageResource(R.drawable.gongzuo1_3x);
tv_inhouse_no.setTextColor(getResources().getColor(R.color.grey_767c82)); tv_inhouse_no.setTextColor(getResources().getColor(R.color.grey_767c82));
ll_inhouse_no.setBackgroundResource(R.drawable.shape_kuang1);
///< yes ///< yes
iv_inhouse_yes.setImageResource(R.drawable.wode1_3x); iv_inhouse_yes.setImageResource(R.drawable.wode1_3x);
tv_inhouse_yes.setTextColor(getResources().getColor(R.color.grey_767c82)); tv_inhouse_yes.setTextColor(getResources().getColor(R.color.grey_767c82));
ll_inhouse_yes.setBackgroundResource(R.drawable.shape_kuang1);
} }


+ 12
- 0
app/src/main/res/drawable/shape_kuang1.xml View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/transp" />
<stroke
android:width="@dimen/dp_0.5"
android:color="@color/transp" />
<size
android:width="@dimen/dp_20"
android:height="@dimen/dp_20" />
</shape>

+ 12
- 0
app/src/main/res/drawable/shape_kuang2.xml View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/transp" />
<stroke
android:width="@dimen/dp_0.5"
android:color="@color/colorPrimary" />
<size
android:width="@dimen/dp_20"
android:height="@dimen/dp_20" />
</shape>

Loading…
Cancel
Save