Commit a744608d authored by 小费同学阿's avatar 小费同学阿 💬 Committed by 杨秀秀

67027 【企业app-android】诉求管理的处理中的界面问题见标注

parent aea14c55
package com.xx.hbhbcompany.fragment.adapter; package com.xx.hbhbcompany.fragment.adapter;
import static androidx.constraintlayout.helper.widget.MotionEffect.TAG;
import static com.xx.hbhbcompany.utils.RetrofitClient.baseImgUrl; import static com.xx.hbhbcompany.utils.RetrofitClient.baseImgUrl;
import android.app.ActionBar; import android.app.ActionBar;
import android.content.Context; import android.content.Context;
import android.graphics.Color;
import android.util.Log; import android.util.Log;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView;
import androidx.core.view.ViewCompat;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
import com.google.android.flexbox.FlexboxLayout;
import com.xx.hbhbcompany.R; import com.xx.hbhbcompany.R;
import com.xx.hbhbcompany.data.http.respons.AppealBean; import com.xx.hbhbcompany.data.http.respons.AppealBean;
import com.xx.hbhbcompany.data.http.respons.AppealFilesBean; import com.xx.hbhbcompany.data.http.respons.AppealFilesBean;
import com.xx.hbhbcompany.data.http.respons.OperationBean;
import com.xx.hbhbcompany.databinding.ItemAppealDetailBinding; import com.xx.hbhbcompany.databinding.ItemAppealDetailBinding;
import com.xx.hbhbcompany.databinding.ItemOperationListBinding; import com.xx.hbhbcompany.databinding.ItemOperationListBinding;
import com.xx.xxviewlibrary.base.xxBaseRecyclerViewAdapter; import com.xx.xxviewlibrary.base.xxBaseRecyclerViewAdapter;
...@@ -41,8 +51,42 @@ public class AppealOperationListAdapter extends xxBaseRecyclerViewAdapter<ItemOp ...@@ -41,8 +51,42 @@ public class AppealOperationListAdapter extends xxBaseRecyclerViewAdapter<ItemOp
@Override @Override
protected void covert(ItemOperationListBinding dataBind, AppealBean.OperationsBean data, int position) { protected void covert(ItemOperationListBinding dataBind, AppealBean.OperationsBean data, int position) {
/*创建流动布局*/
FlexboxLayout flexboxLayout = (FlexboxLayout) dataBind.flexboxLayout;
/*往里塞部门名称*/
TextView deptName = new TextView(this.mContext);
deptName.setText(this.mList.get(position).getDeptName());
// 设置字段之间的间距
FlexboxLayout.LayoutParams paramsDeptName = new FlexboxLayout.LayoutParams(
FlexboxLayout.LayoutParams.WRAP_CONTENT,
FlexboxLayout.LayoutParams.WRAP_CONTENT
);
/*间距*/
paramsDeptName.setMargins(0, 0, 10, 0);
deptName.setLayoutParams(paramsDeptName);
// 设置字段的颜色和文字大小
deptName.setTextColor(Color.parseColor("#333333"));
deptName.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
// 设置其他属性,如字体大小、颜色等
flexboxLayout.addView(deptName);
/*往里塞负责人名称*/
TextView createBy = new TextView(this.mContext);
createBy.setText(this.mList.get(position).getCreateBy());
// 设置字段之间的间距
FlexboxLayout.LayoutParams paramsCreateBy = new FlexboxLayout.LayoutParams(
FlexboxLayout.LayoutParams.WRAP_CONTENT,
FlexboxLayout.LayoutParams.WRAP_CONTENT
);
/*间距*/
paramsCreateBy.setMargins(0, 0, 10, 0);
createBy.setLayoutParams(paramsCreateBy);
// 设置字段的颜色和文字大小
createBy.setTextColor(Color.parseColor("#333333"));
createBy.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
// 设置其他属性,如字体大小、颜色等
flexboxLayout.addView(createBy);
dataBind.imageList.removeAllViews();
for (AppealBean.FilesBean file : for (AppealBean.FilesBean file :
data.getFiles()) { data.getFiles()) {
ImageView imageView = new ImageView(mContext); ImageView imageView = new ImageView(mContext);
......
...@@ -57,37 +57,19 @@ ...@@ -57,37 +57,19 @@
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <com.google.android.flexbox.FlexboxLayout
android:layout_width="wrap_content" android:id="@+id/flexbox_layout"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:orientation="vertical"> android:layout_weight="1"
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{operationsBean.deptName}"
android:textColor="#222222"
android:textSize="16dp"
android:singleLine="true"
android:ellipsize="end" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{operationsBean.createBy}" app:flexWrap="wrap">
android:textColor="#222222"
android:textSize="16dp"
android:layout_marginStart="8dp"
android:singleLine="true"
android:ellipsize="end" />
</LinearLayout> </com.google.android.flexbox.FlexboxLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_gravity="top"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="3"
android:gravity="right" android:gravity="right"
android:orientation="horizontal"> android:orientation="horizontal">
<!--操作状态位-红色--> <!--操作状态位-红色-->
......
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