Explorar o código

修改部分问题

Pq hai 1 ano
pai
achega
abac33e787

+ 2 - 2
BaseLibrary/src/main/java/com/cooleshow/base/utils/GlideImageLoaderUtils.java

@@ -210,8 +210,8 @@ public class GlideImageLoaderUtils {
      */
     public void loadCustRoundCircleImage(Context context, Object url, ImageView imageView, int radious) {
         RequestOptions options = new RequestOptions()
-                .placeholder(R.drawable.bg_loading)
-                .error(R.drawable.bg_loading)
+                .placeholder(-1)
+                .error(-1)
                 //.priority(Priority.HIGH)
                 .transform(new RadiusTransformation(context, radious))
                 .diskCacheStrategy(DiskCacheStrategy.NONE);

+ 2 - 1
chatModule/src/main/java/com/cooleshow/chatmodule/adapter/AddPhotoListAdapter.java

@@ -5,6 +5,7 @@ import android.widget.ImageView;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.base.utils.GlideImageLoaderUtils;
 import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.chatmodule.R;
 import com.cooleshow.chatmodule.utils.helper.IMThemManager;
@@ -35,7 +36,7 @@ public class AddPhotoListAdapter extends BaseQuickAdapter<LocalMedia, BaseViewHo
             ivIcon.setImageResource(addPicDefaultImgRes != -1 ? addPicDefaultImgRes : R.drawable.tc_ic_update_photo);
         } else {
             iv_del.setVisibility(View.VISIBLE);
-            GlideUtils.INSTANCE.loadImageCenterCrop(getContext(), item.getPath(), ivIcon);
+            GlideImageLoaderUtils.getInstance().loadCustRoundCircleImage(getContext(),item.getPath(), ivIcon,10);
         }
 
     }

+ 36 - 2
chatModule/src/main/java/com/cooleshow/chatmodule/ui/ImAppealActivity.java

@@ -5,7 +5,9 @@ import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Parcelable;
+import android.text.Editable;
 import android.text.TextUtils;
+import android.text.TextWatcher;
 import android.view.View;
 import android.widget.Button;
 import android.widget.EditText;
@@ -39,6 +41,7 @@ import com.tbruyelle.rxpermissions3.RxPermissions;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
@@ -67,6 +70,28 @@ public class ImAppealActivity extends BaseMVPActivity<TcActivityImAppealBinding,
     private String type;
     private String memo;
 
+    private TextWatcher mTextWatcher = new TextWatcher() {
+        @Override
+        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+        }
+
+        @Override
+        public void onTextChanged(CharSequence s, int start, int before, int count) {
+            updateWordNumText();
+        }
+
+        @Override
+        public void afterTextChanged(Editable s) {
+
+        }
+    };
+
+    private void updateWordNumText() {
+        int length = et_content.getText().toString().length();
+        viewBinding.tvEditNum.setText(String.format(Locale.getDefault(), "%d/200", length));
+    }
+
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         StyleConfig.setTheme(this);
@@ -113,8 +138,8 @@ public class ImAppealActivity extends BaseMVPActivity<TcActivityImAppealBinding,
         addPhotoListAdapter.setOnItemChildClickListener(new OnItemChildClickListener() {
             @Override
             public void onItemChildClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
-                if(position<addPhotoListAdapter.getData().size()){
-                    if(view.getId() == R.id.iv_del){
+                if (position < addPhotoListAdapter.getData().size()) {
+                    if (view.getId() == R.id.iv_del) {
                         addPhotoListAdapter.removeAt(position);
                         addNewEmpty();
                         return;
@@ -141,6 +166,7 @@ public class ImAppealActivity extends BaseMVPActivity<TcActivityImAppealBinding,
                 }
             }
         });
+        et_content.addTextChangedListener(mTextWatcher);
     }
 
     private void toSelectPic() {
@@ -281,4 +307,12 @@ public class ImAppealActivity extends BaseMVPActivity<TcActivityImAppealBinding,
         ToastUtil.getInstance().showShort("已收到您的投诉,我们会认真审核并处理");
         finish();
     }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        if (et_content != null) {
+            et_content.removeTextChangedListener(mTextWatcher);
+        }
+    }
 }

BIN=BIN
chatModule/src/main/res/drawable-xhdpi/tc_ic_update_photo.png


BIN=BIN
chatModule/src/main/res/drawable-xxhdpi/tc_ic_update_photo.png


+ 34 - 17
chatModule/src/main/res/layout/tc_activity_im_appeal.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
@@ -11,9 +11,12 @@
 
     <androidx.core.widget.NestedScrollView
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="0dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/toolbar_include">
 
         <LinearLayout
+            android:paddingBottom="94dp"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:orientation="vertical">
@@ -71,6 +74,18 @@
                     android:theme="@style/MyEditText"
                     app:layout_constraintTop_toBottomOf="@+id/tv_task_title" />
 
+                <TextView
+                    android:id="@+id/tv_edit_num"
+                    android:layout_marginEnd="12dp"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_task_title"
+                    app:layout_constraintTop_toTopOf="@+id/tv_task_title"
+                    android:text="0/200"
+                    android:textSize="@dimen/sp_14"
+                    android:textColor="@color/color_aaaaaa"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+
             </androidx.constraintlayout.widget.ConstraintLayout>
 
             <androidx.constraintlayout.widget.ConstraintLayout
@@ -128,22 +143,24 @@
 
             </androidx.constraintlayout.widget.ConstraintLayout>
 
-            <Button
-                android:id="@+id/btn_commit"
-                style="?android:attr/borderlessButtonStyle"
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/dp_45"
-                android:layout_marginStart="@dimen/dp_28"
-                android:layout_marginTop="@dimen/dp_55"
-                android:layout_marginEnd="@dimen/dp_28"
-                android:layout_marginBottom="@dimen/dp_95"
-                android:background="@drawable/btn_primary_default_shape"
-                android:text="提交"
-                android:textColor="@color/white"
-                android:textSize="@dimen/dp_16" />
-
 
         </LinearLayout>
 
     </androidx.core.widget.NestedScrollView>
-</LinearLayout>
+
+    <Button
+        android:id="@+id/btn_commit"
+        style="?android:attr/borderlessButtonStyle"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dp_44"
+        android:layout_marginStart="@dimen/dp_25"
+        android:layout_marginEnd="@dimen/dp_25"
+        android:layout_marginBottom="@dimen/dp_40"
+        android:background="@drawable/btn_primary_default_shape"
+        android:text="提交"
+        android:textColor="@color/white"
+        android:textSize="@dimen/dp_18"
+        android:textStyle="bold"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent" />
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 2 - 2
chatModule/src/main/res/layout/tc_notice_list_item.xml

@@ -55,8 +55,8 @@
         android:layout_height="19dp"
         android:layout_marginStart="@dimen/dp_8"
         android:background="@drawable/bg_orange_line_45_shape"
-        android:paddingStart="@dimen/dp_10"
-        android:paddingEnd="@dimen/dp_10"
+        android:paddingStart="@dimen/dp_8"
+        android:paddingEnd="@dimen/dp_8"
         android:text="置顶"
         android:gravity="center"
         android:includeFontPadding="false"

BIN=BIN
institution/src/main/res/drawable-xhdpi/jg_tc_ic_update_photo.png


BIN=BIN
institution/src/main/res/drawable-xxhdpi/jg_tc_ic_update_photo.png