From 5c8c30a39442743161e1457a4e67ee8061390073 Mon Sep 17 00:00:00 2001 From: jianbo <263303411@qq.com> Date: Fri, 11 Sep 2020 10:44:51 +0800 Subject: [PATCH] d --- .../seven/main/find/ConversationActivity.java | 6 +- .../seven/main/find/QuestionsFragment.java | 7 +- .../main/find/adapter/QuestionsAdapter.java | 8 +- .../find/adapter/holder/BottomViewHolder.java | 9 +- .../main/find/entity/QuestionsEntity.java | 20 +++ .../com/fenghoo/seven/widget/ItemProView.java | 119 +++++++++++------- .../activity_refactor_marking_detail.xml | 2 +- app/src/main/res/layout/fragment_kehu.xml | 4 +- .../main/res/layout/fragment_questions.xml | 4 +- .../main/res/layout/item_question_left.xml | 1 + app/src/main/res/values/styles.xml | 1 + 11 files changed, 121 insertions(+), 60 deletions(-) diff --git a/app/src/main/java/com/fenghoo/seven/main/find/ConversationActivity.java b/app/src/main/java/com/fenghoo/seven/main/find/ConversationActivity.java index f1ab204..f4c213c 100644 --- a/app/src/main/java/com/fenghoo/seven/main/find/ConversationActivity.java +++ b/app/src/main/java/com/fenghoo/seven/main/find/ConversationActivity.java @@ -34,9 +34,11 @@ public class ConversationActivity extends BaseActivity { dataBean = (privateListBean.ResultBean.DataBean) getIntent().getSerializableExtra("dataBean"); String private_id = dataBean.getPrivate_id(); String dy_uid = dataBean.getDy_uid(); + String nick_name = dataBean.getNick_name(); + String nick_img = dataBean.getNick_img(); - mTitleBar.setTitle("抖音昵称"+"**"); - getSupportFragmentManager().beginTransaction().replace(R.id.container,new QuestionsFragment(private_id,dy_uid)).commit(); + mTitleBar.setTitle(nick_name); + getSupportFragmentManager().beginTransaction().replace(R.id.container,new QuestionsFragment(private_id,dy_uid,nick_img)).commit(); } public void onEvent(SixEvent event) { diff --git a/app/src/main/java/com/fenghoo/seven/main/find/QuestionsFragment.java b/app/src/main/java/com/fenghoo/seven/main/find/QuestionsFragment.java index cd58a4a..7a07cc4 100644 --- a/app/src/main/java/com/fenghoo/seven/main/find/QuestionsFragment.java +++ b/app/src/main/java/com/fenghoo/seven/main/find/QuestionsFragment.java @@ -62,10 +62,12 @@ public class QuestionsFragment extends BaseTreeFragment data; private String private_id; private String dy_uid; + private String nick_img; - public QuestionsFragment(String private_id,String dy_uid){ + public QuestionsFragment(String private_id,String dy_uid,String nick_img){ this.private_id=private_id; this.dy_uid=dy_uid; + this.nick_img=nick_img; } @Override @@ -173,6 +175,8 @@ public class QuestionsFragment extends BaseTreeFragment { TextView tvContent; + CircleImageView cirimage_left; private FrameLayout view_content_fl; private LinearLayout view_content_ll; @@ -125,6 +127,7 @@ public class QuestionsAdapter extends BaseRecycleAdapter data; private String question; + public String getImg() { + return img; + } + + public void setImg(String img) { + this.img = img; + } + + private String img; + + public String getImgr() { + return imgr; + } + + public void setImgr(String imgr) { + this.imgr = imgr; + } + + private String imgr; + public String getMessage_type() { return message_type; } diff --git a/app/src/main/java/com/fenghoo/seven/widget/ItemProView.java b/app/src/main/java/com/fenghoo/seven/widget/ItemProView.java index 2de15b8..57c98e7 100644 --- a/app/src/main/java/com/fenghoo/seven/widget/ItemProView.java +++ b/app/src/main/java/com/fenghoo/seven/widget/ItemProView.java @@ -77,7 +77,7 @@ public class ItemProView extends FrameLayout { initAttrs(attrs); - setUpView(); + // setUpView(); } /** @@ -88,28 +88,29 @@ public class ItemProView extends FrameLayout { private void initAttrs(AttributeSet attrs) { TypedArray typedArray = getContext().obtainStyledAttributes(attrs, R.styleable.ItemProView); - mIv_icon_01 = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_01, R.drawable.shape_pro_yuan); - mIv_icon_01_h = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_01, R.drawable.shape_pro_yuan_hui); - mIv_icon_02 = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_02, R.drawable.shape_pro_yuan); - mIv_icon_02_h = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_02, R.drawable.shape_pro_yuan_hui); - mIv_icon_03 = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_03, R.drawable.shape_pro_yuan); - mIv_icon_03_h = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_03, R.drawable.shape_pro_yuan_hui); + mIv_icon_01 = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_01_t, R.drawable.shape_pro_yuan); + mIv_icon_01_h = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_01_t, R.drawable.shape_pro_yuan_hui); +// mIv_icon_02 = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_02, R.drawable.shape_pro_yuan); +// mIv_icon_02_h = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_02, R.drawable.shape_pro_yuan_hui); +// mIv_icon_03 = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_03, R.drawable.shape_pro_yuan); +// mIv_icon_03_h = typedArray.getResourceId(R.styleable.ItemProView_iv_icon_03, R.drawable.shape_pro_yuan_hui); + mTv_item_pro_01 = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_01, R.drawable.shape_pro_tv); mTv_item_pro_01_h = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_01, R.drawable.shape_pro_tv_hui); - mTv_item_pro_02 = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_02, R.drawable.shape_pro_tv); - mTv_item_pro_02_h = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_02, R.drawable.shape_pro_tv_hui); - mTv_item_pro_03 = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_03, R.drawable.shape_pro_tv); - mTv_item_pro_03_h = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_03, R.drawable.shape_pro_tv_hui); +// mTv_item_pro_02 = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_02, R.drawable.shape_pro_tv); +// mTv_item_pro_02_h = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_02, R.drawable.shape_pro_tv_hui); +// mTv_item_pro_03 = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_03, R.drawable.shape_pro_tv); +// mTv_item_pro_03_h = typedArray.getResourceId(R.styleable.ItemProView_tv_item_pro_03, R.drawable.shape_pro_tv_hui); mView_line_01 = typedArray.getResourceId(R.styleable.ItemProView_view_line_01, R.color.colortheme); mView_line_01_h = typedArray.getResourceId(R.styleable.ItemProView_view_line_01, R.color.ffb1b1b1); - mView_line_02 = typedArray.getResourceId(R.styleable.ItemProView_view_line_02, R.color.colortheme); - mView_line_02_h = typedArray.getResourceId(R.styleable.ItemProView_view_line_02, R.color.ffb1b1b1); - mView_line_03 = typedArray.getResourceId(R.styleable.ItemProView_view_line_03, R.color.colortheme); - mView_line_03_h = typedArray.getResourceId(R.styleable.ItemProView_view_line_03, R.color.ffb1b1b1); - mView_line_04 = typedArray.getResourceId(R.styleable.ItemProView_view_line_04, R.color.colortheme); - mView_line_04_h = typedArray.getResourceId(R.styleable.ItemProView_view_line_04, R.color.ffb1b1b1); +// mView_line_02 = typedArray.getResourceId(R.styleable.ItemProView_view_line_02, R.color.colortheme); +// mView_line_02_h = typedArray.getResourceId(R.styleable.ItemProView_view_line_02, R.color.ffb1b1b1); +// mView_line_03 = typedArray.getResourceId(R.styleable.ItemProView_view_line_03, R.color.colortheme); +// mView_line_03_h = typedArray.getResourceId(R.styleable.ItemProView_view_line_03, R.color.ffb1b1b1); +// mView_line_04 = typedArray.getResourceId(R.styleable.ItemProView_view_line_04, R.color.colortheme); +// mView_line_04_h = typedArray.getResourceId(R.styleable.ItemProView_view_line_04, R.color.ffb1b1b1); typedArray.recycle(); } @@ -118,9 +119,9 @@ public class ItemProView extends FrameLayout { */ private void setUpView() { - iv_icon_01.setImageResource(mIv_icon_01_h) ; - iv_icon_02.setImageResource(mIv_icon_01_h) ; - iv_icon_03.setImageResource(mIv_icon_01_h) ; +// iv_icon_01.setImageResource(mIv_icon_01_h) ; +// iv_icon_02.setImageResource(mIv_icon_01_h) ; +// iv_icon_03.setImageResource(mIv_icon_01_h) ; tv_item_pro_01.setBackgroundResource(mTv_item_pro_01_h); tv_item_pro_01.setTextColor(getResources().getColor(R.color.ffb1b1b1)); tv_item_pro_02.setBackgroundResource(mTv_item_pro_01_h); @@ -134,7 +135,7 @@ public class ItemProView extends FrameLayout { } - public void refresh(String stutas,String order_state,String ygd_state,String enter_state,String numtwo,String numthree){ + public void refresh(String stutas,String ygd_state,String enter_state,String order_state,String numtwo,String numthree){ if(AbStrUtil.isEmpty(numtwo)){ left_tvtwo.setVisibility(View.INVISIBLE); @@ -156,47 +157,36 @@ public class ItemProView extends FrameLayout { } - if(order_state.equals("1")&&ygd_state.equals("0")&&enter_state.equals("0")){ + + if(ygd_state.equals("0")&&enter_state.equals("0")&&order_state.equals("0")){ stutas="0"; } - if(order_state.equals("0")&&ygd_state.equals("0")&&enter_state.equals("0")){ + if(ygd_state.equals("0")&&enter_state.equals("0")&&order_state.equals("1")){ stutas="1"; } - if(order_state.equals("0")&&ygd_state.equals("1")&&enter_state.equals("0")){ + if(ygd_state.equals("0")&&enter_state.equals("1")&&order_state.equals("0")){ stutas="2"; } - if(order_state.equals("0")&&ygd_state.equals("1")&&enter_state.equals("1")){ + if(ygd_state.equals("0")&&enter_state.equals("1")&&order_state.equals("1")){ stutas="3"; } - if(order_state.equals("1")&&ygd_state.equals("0")&&enter_state.equals("1")){ + if(ygd_state.equals("1")&&enter_state.equals("0")&&order_state.equals("0")){ stutas="4"; } - if(order_state.equals("1")&&ygd_state.equals("1")&&enter_state.equals("0")){ + if(ygd_state.equals("1")&&enter_state.equals("0")&&order_state.equals("1")){ stutas="5"; } - if(order_state.equals("1")&&ygd_state.equals("1")&&enter_state.equals("1")){ + if(ygd_state.equals("1")&&enter_state.equals("1")&&order_state.equals("0")){ stutas="6"; } + if(ygd_state.equals("1")&&enter_state.equals("1")&&order_state.equals("1")){ + stutas="7"; + } Log.e("状态==",stutas); switch (stutas) { - case "0"://100三个字段的状态 - iv_icon_01.setImageResource(mIv_icon_01_h) ; - iv_icon_02.setImageResource(mIv_icon_01_h) ; - iv_icon_03.setImageResource(mIv_icon_01_h) ; - tv_item_pro_01.setBackgroundResource(R.mipmap.icon_pro_ima_bq); - tv_item_pro_01.setTextColor(getResources().getColor(R.color.ffb1b1b1)); - tv_item_pro_02.setBackgroundResource(mTv_item_pro_01_h); - tv_item_pro_02.setTextColor(getResources().getColor(R.color.ffb1b1b1)); - tv_item_pro_03.setBackgroundResource(mTv_item_pro_01_h); - tv_item_pro_03.setTextColor(getResources().getColor(R.color.ffb1b1b1)); - view_line_01.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); - view_line_02.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); - view_line_03.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); - view_line_04.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); - break; - case "1"://000三个字段的状态 + case "0"://000三个字段的状态 iv_icon_01.setImageResource(mIv_icon_01_h) ; iv_icon_02.setImageResource(mIv_icon_01_h) ; iv_icon_03.setImageResource(mIv_icon_01_h) ; @@ -211,6 +201,22 @@ public class ItemProView extends FrameLayout { view_line_03.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); view_line_04.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); break; + case "1"://001三个字段的状态 + iv_icon_01.setImageResource(mIv_icon_01_h) ; + iv_icon_02.setImageResource(mIv_icon_01_h) ; + iv_icon_03.setImageResource(mIv_icon_01_h) ; + tv_item_pro_01.setBackgroundResource(mTv_item_pro_01_h); + tv_item_pro_01.setTextColor(getResources().getColor(R.color.ffb1b1b1)); + tv_item_pro_02.setBackgroundResource(mTv_item_pro_01_h); + tv_item_pro_02.setTextColor(getResources().getColor(R.color.ffb1b1b1)); + tv_item_pro_03.setBackgroundResource(R.mipmap.icon_pro_ima_cj); + tv_item_pro_03.setText(""); + tv_item_pro_03.setTextColor(getResources().getColor(R.color.colortheme)); + view_line_01.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); + view_line_02.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); + view_line_03.setBackgroundColor(getResources().getColor(R.color.colortheme)); + view_line_04.setBackgroundColor(getResources().getColor(R.color.colortheme)); + break; case "2"://010 iv_icon_01.setImageResource(mIv_icon_01_h) ; iv_icon_02.setImageResource(mIv_icon_01) ; @@ -245,7 +251,26 @@ public class ItemProView extends FrameLayout { view_line_03.setBackgroundColor(getResources().getColor(R.color.colortheme)); view_line_04.setBackgroundColor(getResources().getColor(R.color.colortheme)); break; - case "4"://101 + case "4"://100三个字段的状态 + + iv_icon_01.setImageResource(mIv_icon_01) ; + iv_icon_02.setImageResource(mIv_icon_01_h) ; + iv_icon_03.setImageResource(mIv_icon_01_h) ; + + + tv_item_pro_01.setBackgroundResource(R.mipmap.icon_pro_ima_bq); + tv_item_pro_01.setText(""); + tv_item_pro_01.setTextColor(getResources().getColor(R.color.ffb1b1b1)); + tv_item_pro_02.setBackgroundResource(mTv_item_pro_01_h); + tv_item_pro_02.setTextColor(getResources().getColor(R.color.ffb1b1b1)); + tv_item_pro_03.setBackgroundResource(mTv_item_pro_01_h); + tv_item_pro_03.setTextColor(getResources().getColor(R.color.ffb1b1b1)); + view_line_01.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); + view_line_02.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); + view_line_03.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); + view_line_04.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); + break; + case "5"://101 iv_icon_01.setImageResource(mIv_icon_01) ; iv_icon_02.setImageResource(mIv_icon_01_h) ; iv_icon_03.setImageResource(mIv_icon_01) ; @@ -262,7 +287,7 @@ public class ItemProView extends FrameLayout { view_line_03.setBackgroundColor(getResources().getColor(R.color.colortheme)); view_line_04.setBackgroundColor(getResources().getColor(R.color.colortheme)); break; - case "5"://110 + case "6"://110 iv_icon_01.setImageResource(mIv_icon_01) ; iv_icon_02.setImageResource(mIv_icon_01) ; iv_icon_03.setImageResource(mIv_icon_01_h) ; @@ -279,7 +304,7 @@ public class ItemProView extends FrameLayout { view_line_03.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); view_line_04.setBackgroundColor(getResources().getColor(R.color.ffb1b1b1)); break; - case "6"://111 + case "7"://111 iv_icon_01.setImageResource(mIv_icon_01) ; iv_icon_02.setImageResource(mIv_icon_01) ; iv_icon_03.setImageResource(mIv_icon_01) ; diff --git a/app/src/main/res/layout/activity_refactor_marking_detail.xml b/app/src/main/res/layout/activity_refactor_marking_detail.xml index 85a84f7..e6c47a1 100644 --- a/app/src/main/res/layout/activity_refactor_marking_detail.xml +++ b/app/src/main/res/layout/activity_refactor_marking_detail.xml @@ -15,6 +15,6 @@ android:layout_below="@+id/title_bar" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginBottom="49dp" /> + /> diff --git a/app/src/main/res/layout/fragment_kehu.xml b/app/src/main/res/layout/fragment_kehu.xml index 5cbd05f..6c9e9f7 100644 --- a/app/src/main/res/layout/fragment_kehu.xml +++ b/app/src/main/res/layout/fragment_kehu.xml @@ -129,8 +129,8 @@ diff --git a/app/src/main/res/layout/fragment_questions.xml b/app/src/main/res/layout/fragment_questions.xml index 72dc054..072f295 100644 --- a/app/src/main/res/layout/fragment_questions.xml +++ b/app/src/main/res/layout/fragment_questions.xml @@ -83,8 +83,8 @@ android:layout_alignParentRight="true" android:layout_marginRight="5dp" android:layout_marginBottom="60dp" - android:layout_width="50dp" - android:layout_height="50dp" + android:layout_width="70dp" + android:layout_height="70dp" android:clickable="true" android:background="@mipmap/icon_fudong" /> diff --git a/app/src/main/res/layout/item_question_left.xml b/app/src/main/res/layout/item_question_left.xml index 444485d..27f4e04 100644 --- a/app/src/main/res/layout/item_question_left.xml +++ b/app/src/main/res/layout/item_question_left.xml @@ -7,6 +7,7 @@ android:padding="13dp"> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index ded94db..884e458 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -159,6 +159,7 @@ +