6.7.0用户端更新:限制举报描述字数
This commit is contained in:
parent
cd8b58a0ec
commit
4c53c990e9
@ -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());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user