Commit ab9603dd by 霍志良

feat:修改UI

parent 7199799a
...@@ -2,6 +2,8 @@ package com.yidianling.im.session.viewholder; ...@@ -2,6 +2,8 @@ package com.yidianling.im.session.viewholder;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.text.SpannableString;
import android.text.style.ImageSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
...@@ -86,6 +88,8 @@ public class MsgViewHolderBusinessCard extends MsgViewHolderBase { ...@@ -86,6 +88,8 @@ public class MsgViewHolderBusinessCard extends MsgViewHolderBase {
scoreExpert.setText(customBusinessCard.feedbackRate.toString()); scoreExpert.setText(customBusinessCard.feedbackRate.toString());
scoreExpert.invalidate();
commentCount.setText(customBusinessCard.commentNum+"人评价"); commentCount.setText(customBusinessCard.commentNum+"人评价");
cerfiticateYear.setText(customBusinessCard.workYears); cerfiticateYear.setText(customBusinessCard.workYears);
serviceCount.setText(customBusinessCard.orderNum); serviceCount.setText(customBusinessCard.orderNum);
...@@ -101,7 +105,7 @@ public class MsgViewHolderBusinessCard extends MsgViewHolderBase { ...@@ -101,7 +105,7 @@ public class MsgViewHolderBusinessCard extends MsgViewHolderBase {
); );
ImageView startIMG= view.findViewById(R.id.feedBackRate); ImageView startIMG= view.findViewById(R.id.feedBackRate);
if (customBusinessCard.feedbackRate >= j) { if (customBusinessCard.feedbackRate > j) {
startIMG.setBackground(context.getResources().getDrawable(R.drawable.m_im_full_star)); startIMG.setBackground(context.getResources().getDrawable(R.drawable.m_im_full_star));
} else if (customBusinessCard.feedbackRate < j && customBusinessCard.feedbackRate > j - 1) { } else if (customBusinessCard.feedbackRate < j && customBusinessCard.feedbackRate > j - 1) {
startIMG.setBackground(context.getResources().getDrawable(R.drawable.m_im_half_star)); startIMG.setBackground(context.getResources().getDrawable(R.drawable.m_im_half_star));
...@@ -110,7 +114,6 @@ public class MsgViewHolderBusinessCard extends MsgViewHolderBase { ...@@ -110,7 +114,6 @@ public class MsgViewHolderBusinessCard extends MsgViewHolderBase {
} }
m_im_ll_feedbackRate.addView(view); m_im_ll_feedbackRate.addView(view);
} }
} }
@Override @Override
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#60959595" /> <solid android:color="#20ffffff" />
<corners <corners
android:radius="2dp"/> android:radius="2dp"/>
</shape> </shape>
...@@ -121,11 +121,12 @@ ...@@ -121,11 +121,12 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
android:includeFontPadding="false" android:includeFontPadding="false"
android:padding="0dp"
android:layout_marginTop="@dimen/platform_dp_8" android:layout_marginTop="@dimen/platform_dp_8"
android:textSize="17sp" android:textSize="17sp"
android:gravity="bottom" android:fontFamily="@font/platform_din_bold"
android:foregroundGravity="bottom"
android:textColor="@color/im_color_FF5040" android:textColor="@color/im_color_FF5040"
app:layout_constraintTop_toBottomOf="@id/m_im_ll_feedbackRate"
> >
</TextView> </TextView>
<TextView <TextView
...@@ -133,6 +134,7 @@ ...@@ -133,6 +134,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="0000人评价" android:text="0000人评价"
android:textSize="7sp" android:textSize="7sp"
android:id="@+id/commentCount" android:id="@+id/commentCount"
app:layout_constraintTop_toBottomOf="@id/scoreExpert" app:layout_constraintTop_toBottomOf="@id/scoreExpert"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
...@@ -151,7 +153,7 @@ ...@@ -151,7 +153,7 @@
app:layout_constraintLeft_toRightOf="@id/scoreExpert" app:layout_constraintLeft_toRightOf="@id/scoreExpert"
app:layout_constraintBottom_toBottomOf="@id/scoreExpert" app:layout_constraintBottom_toBottomOf="@id/scoreExpert"
android:layout_marginLeft="@dimen/platform_dp_4" android:layout_marginLeft="@dimen/platform_dp_4"
android:layout_marginBottom="@dimen/platform_dp_2" android:layout_marginBottom="@dimen/platform_dp_4"
> >
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -177,6 +179,7 @@ ...@@ -177,6 +179,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="999" android:text="999"
android:textSize="14sp" android:textSize="14sp"
android:fontFamily="@font/platform_din_bold"
android:textColor="@color/im_color_242424" android:textColor="@color/im_color_242424"
android:id="@+id/cerfiticateYear" android:id="@+id/cerfiticateYear"
> >
...@@ -204,6 +207,7 @@ ...@@ -204,6 +207,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="999" android:text="999"
android:textSize="14sp" android:textSize="14sp"
android:fontFamily="@font/platform_din_bold"
android:textColor="@color/im_color_242424" android:textColor="@color/im_color_242424"
android:id="@+id/serviceCount" android:id="@+id/serviceCount"
> >
...@@ -230,6 +234,7 @@ ...@@ -230,6 +234,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="999" android:text="999"
android:textSize="14sp" android:textSize="14sp"
android:fontFamily="@font/platform_din_bold"
android:textColor="@color/im_color_242424" android:textColor="@color/im_color_242424"
android:id="@+id/serviceTime" android:id="@+id/serviceTime"
> >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment