Merge remote-tracking branch 'origin/dev_1.1.2' into dev_1.1.2
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
package com.mogo.module.v2x.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -12,7 +9,6 @@ import android.widget.RatingBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
@@ -64,11 +60,16 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
false);
|
||||
shareEmptyViewHolder holder = new shareEmptyViewHolder(v);
|
||||
return holder;
|
||||
} else {
|
||||
View v = shareLayoutInflater.inflate(R.layout.module_v2x_event_share_load_status, parent,
|
||||
} else if (viewType == V2XShareEventItemEnum.ITEM_TYPE_LOAD_MORE_STATUS){
|
||||
View v = shareLayoutInflater.inflate(R.layout.item_v2x_event_share_load_more, parent,
|
||||
false);
|
||||
shareLoadStatusViewHolder holder = new shareLoadStatusViewHolder(v);
|
||||
return holder;
|
||||
}else {
|
||||
View v = shareLayoutInflater.inflate(R.layout.item_v2x_event_share_no_more, parent,
|
||||
false);
|
||||
shareLoadNoMoreViewHolder holder = new shareLoadNoMoreViewHolder(v);
|
||||
return holder;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,13 +149,7 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
}
|
||||
|
||||
}
|
||||
} else if (holder instanceof shareLoadStatusViewHolder) {
|
||||
V2XShareEventLoadMoreItem item = (V2XShareEventLoadMoreItem) dataArrayList.get(dataArrayList.size() - 1);
|
||||
((shareLoadStatusViewHolder) holder).statusButton.setText(item.getStatusText());
|
||||
((shareLoadStatusViewHolder) holder).statusButton.setClickable(item.isClickable());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -244,4 +239,14 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 没有更多记录了
|
||||
* */
|
||||
class shareLoadNoMoreViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public shareLoadNoMoreViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,13 +132,9 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
//当前页有数据
|
||||
dataArrayList.addAll(resultData.getResult().getPage().getContent());
|
||||
item.setViewType(V2XShareEventItemEnum.ITEM_TYPE_LOAD_MORE_STATUS);
|
||||
item.setStatusText("查看更早记录");
|
||||
item.setClickable(true);
|
||||
} else {
|
||||
//当前页没有数据
|
||||
item.setViewType(V2XShareEventItemEnum.ITEM_TYPE_NO_MORE);
|
||||
item.setStatusText("没有更多了");
|
||||
item.setClickable(false);
|
||||
}
|
||||
if (total > 10) {
|
||||
dataArrayList.add(item);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="24px" />
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#5CC1FF"
|
||||
android:startColor="#256BFF"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="40px"
|
||||
android:paddingTop="40px">
|
||||
|
||||
<Button
|
||||
android:id="@+id/event_share_load_status"
|
||||
android:layout_width="220px"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="12px"
|
||||
android:paddingBottom="12px"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/bg_v2x_event_share_type_blue"
|
||||
android:text="查看更早记录"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="18px" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="40px"
|
||||
android:paddingBottom="40px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_share_load_no_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:alpha="0.6"
|
||||
android:paddingTop="12px"
|
||||
android:paddingBottom="12px"
|
||||
android:text="没有更多记录了"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="18px" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_line"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0.5px"
|
||||
android:alpha="0.5"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="46px"
|
||||
android:layout_marginRight="16px"
|
||||
android:layout_toLeftOf="@id/event_share_load_no_more"
|
||||
android:background="#FFFFFF" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_line"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0.5px"
|
||||
android:alpha="0.5"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16px"
|
||||
android:layout_marginRight="46px"
|
||||
android:layout_toRightOf="@id/event_share_load_no_more"
|
||||
android:background="#FFFFFF" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/event_share_load_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="没有更多了"
|
||||
android:textColor="#000000"
|
||||
android:textSize="18sp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user