6.7.0用户端更新:限制举报描述字数

This commit is contained in:
余前卫 2024-06-13 15:51:27 +08:00
parent cd8b58a0ec
commit 4c53c990e9
2 changed files with 6 additions and 3 deletions

View File

@ -26,7 +26,7 @@ public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.Ba
@Override @Override
public void onBindViewHolder(BaseAdapter.BaseViewHolder holder, int position) { public void onBindViewHolder(BaseAdapter.BaseViewHolder holder, int position) {
T t = data.get(position); T t = data.get(position);
bindData(holder, t); convert(holder, t);
} }
@Override @Override
@ -34,7 +34,7 @@ public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.Ba
return data == null ? 0 : data.size(); return data == null ? 0 : data.size();
} }
public abstract void bindData(BaseViewHolder holder, T t); public abstract void convert(BaseViewHolder holder, T t);
public abstract int getItemLayoutId(); public abstract int getItemLayoutId();
@ -45,6 +45,9 @@ public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.Ba
public BaseViewHolder(View itemView) { public BaseViewHolder(View itemView) {
super(itemView); super(itemView);
views = new HashMap<>(); views = new HashMap<>();
if (onItemClickListener != null){
itemView.setOnClickListener(v ->onItemClickListener.onItemClick(getAdapterPosition()) );
}
} }
public View getView(int id) { public View getView(int id) {
@ -54,7 +57,6 @@ public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.Ba
views.put(id, view); views.put(id, view);
if (onItemClickListener != null){ if (onItemClickListener != null){
view.setOnClickListener(v -> { view.setOnClickListener(v -> {
onItemClickListener.onItemClick(getAdapterPosition());
onItemClickListener.onItemChildClick(v, getAdapterPosition()); onItemClickListener.onItemChildClick(v, getAdapterPosition());
}); });
} }

View File

@ -16,6 +16,7 @@
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:gravity="top" android:gravity="top"
android:padding="5dp" android:padding="5dp"
android:maxLength="50"
android:hint="@string/video_report_tip_2" android:hint="@string/video_report_tip_2"
android:textColor="@color/textColor" android:textColor="@color/textColor"
android:textSize="14sp" android:textSize="14sp"