[add] 我的分享Bean,列表UI
This commit is contained in:
@@ -1,24 +1,114 @@
|
|||||||
package com.zhidao.mogo.module.event.panel.adapter;
|
package com.zhidao.mogo.module.event.panel.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
public class ShareEventAdapter extends RecyclerView.Adapter {
|
import com.zhidao.mogo.module.event.panel.R;
|
||||||
|
import com.zhidao.mogo.module.event.panel.bean.ShareEventDescription;
|
||||||
|
import com.zhidao.mogo.module.event.panel.bean.ShareEventItem;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class ShareEventAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||||
|
private Context context;
|
||||||
|
private ArrayList<ShareEventItem> dataArrayList;
|
||||||
|
private Object Tag = "ShareEventAdapter";
|
||||||
|
private final LayoutInflater shareLayoutInflater;
|
||||||
|
|
||||||
|
public static enum ITEM_TYPE {
|
||||||
|
ITEM_TYPE_NUM_DES,
|
||||||
|
ITEM_TYPE_SHARE_LIST
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShareEventAdapter(Context context, ArrayList<ShareEventItem> dataArrayList) {
|
||||||
|
this.context = context;
|
||||||
|
this.dataArrayList = dataArrayList;
|
||||||
|
shareLayoutInflater = LayoutInflater.from(context);
|
||||||
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
return null;
|
//根据viewType创建自定义布局
|
||||||
|
if (viewType == ITEM_TYPE.ITEM_TYPE_NUM_DES.ordinal()) {
|
||||||
|
View v = shareLayoutInflater.inflate(R.layout.module_event_panel_share_event_description, parent,
|
||||||
|
false);
|
||||||
|
shareDescriptionViewHolder holder = new shareDescriptionViewHolder(v);
|
||||||
|
return holder;
|
||||||
|
} else {
|
||||||
|
View v = shareLayoutInflater.inflate(R.layout.module_event_panel_my_share_item, parent,
|
||||||
|
false);
|
||||||
|
shareItemViewHolder holder = new shareItemViewHolder(v);
|
||||||
|
return holder;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
if (position < 1) {
|
||||||
|
ShareEventDescription data = new ShareEventDescription();
|
||||||
|
data.shareNum = "12";
|
||||||
|
data.approveNum = "10";
|
||||||
|
((shareDescriptionViewHolder) holder).shareNumTextView.setText(data.shareNum);
|
||||||
|
((shareDescriptionViewHolder) holder).approveNumTextView.setText(data.approveNum);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ShareEventItem data = dataArrayList.get(position-1);
|
||||||
|
((shareItemViewHolder) holder).caseStyleTextView.setText(data.caseStyle);
|
||||||
|
((shareItemViewHolder) holder).caseAddressTextView.setText(data.caseAddress);
|
||||||
|
((shareItemViewHolder) holder).caseTimeTextView.setText(data.caseTime);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
return 0;
|
return dataArrayList.size() + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemViewType(int position) {
|
||||||
|
int type = position == 0 ? ITEM_TYPE.ITEM_TYPE_NUM_DES.ordinal() : ITEM_TYPE.ITEM_TYPE_SHARE_LIST.ordinal();
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 分享列表
|
||||||
|
* */
|
||||||
|
class shareItemViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private TextView caseStyleTextView;
|
||||||
|
private TextView caseAddressTextView;
|
||||||
|
private TextView caseTimeTextView;
|
||||||
|
// private TextView caseUsefulTextView;
|
||||||
|
|
||||||
|
public shareItemViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
caseStyleTextView = itemView.findViewById(R.id.road_case_style);
|
||||||
|
caseAddressTextView = itemView.findViewById(R.id.road_case_address);
|
||||||
|
caseTimeTextView = itemView.findViewById(R.id.road_case_share_time);
|
||||||
|
// caseUsefulTextView = itemView.findViewById(R.id.road_case_useful_num);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 分享次数,热心指数...
|
||||||
|
* */
|
||||||
|
class shareDescriptionViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private TextView shareNumTextView;
|
||||||
|
private TextView approveNumTextView;
|
||||||
|
|
||||||
|
public shareDescriptionViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
shareNumTextView = itemView.findViewById(R.id.share_num);
|
||||||
|
approveNumTextView = itemView.findViewById(R.id.share_approve);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.zhidao.mogo.module.event.panel.bean;
|
||||||
|
|
||||||
|
public class ShareEventDescription {
|
||||||
|
public String shareNum;
|
||||||
|
public String approveNum;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.zhidao.mogo.module.event.panel.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class ShareEventItem implements Serializable {
|
||||||
|
public String caseStyle;
|
||||||
|
public String caseAddress;
|
||||||
|
public String caseTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ class MyShareFragment : MvpFragment<MyShareFragment, MySharePresenter>() {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
override fun getLayoutId(): Int = R.layout.module_event_panel_fragment_my_share
|
override fun getLayoutId(): Int = R.layout.module_event_panel_my_share_item
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化控件,必须在初始化完成之后才可以实例化presenter,避免
|
* 初始化控件,必须在初始化完成之后才可以实例化presenter,避免
|
||||||
|
|||||||
@@ -4,26 +4,26 @@ import android.os.Bundle;
|
|||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.mogo.commons.mvp.MvpFragment;
|
import com.mogo.commons.mvp.MvpFragment;
|
||||||
import com.zhidao.mogo.module.event.panel.R;
|
import com.zhidao.mogo.module.event.panel.R;
|
||||||
import com.zhidao.mogo.module.event.panel.adapter.ShareEventAdapter;
|
import com.zhidao.mogo.module.event.panel.adapter.ShareEventAdapter;
|
||||||
|
import com.zhidao.mogo.module.event.panel.bean.ShareEventItem;
|
||||||
import com.zhidao.mogo.module.event.panel.presenter.ShareEventsPresenter;
|
import com.zhidao.mogo.module.event.panel.presenter.ShareEventsPresenter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class ShareEventsFragment extends MvpFragment<ShareEventsFragment, ShareEventsPresenter> {
|
public class ShareEventsFragment extends MvpFragment<ShareEventsFragment, ShareEventsPresenter> {
|
||||||
|
|
||||||
|
private RecyclerView recyclerView;
|
||||||
private RecyclerView listview;
|
|
||||||
private View view;
|
private View view;
|
||||||
private ShareEventAdapter adapter;
|
private ShareEventAdapter adapter;
|
||||||
|
private ArrayList<ShareEventItem> dataArrayList = new ArrayList<ShareEventItem>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@@ -38,23 +38,29 @@ public class ShareEventsFragment extends MvpFragment<ShareEventsFragment, ShareE
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
view = inflater.inflate(R.layout.module_event_panel_fragment_my_share, container, false);
|
view = inflater.inflate(R.layout.module_event_panel_share_event_recylerview, container, false);
|
||||||
initRecyclerView();
|
initRecyclerView();
|
||||||
initData();
|
initData();
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initData() {
|
private void initRecyclerView() {
|
||||||
|
recyclerView = view.findViewById(R.id.road_case_share_list);
|
||||||
|
adapter = new ShareEventAdapter(getActivity(),dataArrayList);
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
LinearLayoutManager linearLayoutManager =
|
||||||
|
new LinearLayoutManager( getActivity(), LinearLayoutManager.VERTICAL, false );
|
||||||
|
recyclerView.setLayoutManager(linearLayoutManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initRecyclerView() {
|
private void initData() {
|
||||||
listview = findViewById(R.id.road_case_share_list);
|
for (int i = 0; i < 12; i++) {
|
||||||
listview.setAdapter(adapter);
|
ShareEventItem data = new ShareEventItem();
|
||||||
listview.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
|
data.caseStyle = "道路拥堵";
|
||||||
//分割线
|
data.caseAddress = "环球贸易中心";
|
||||||
listview.addItemDecoration(new DividerItemDecoration(getActivity(),DividerItemDecoration.VERTICAL));
|
data.caseTime = "2020-07-21 12:00:00";
|
||||||
|
dataArrayList.add(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/clPanelContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:id="@+id/road_case_liset_item">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/road_case_style"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="#0000FF"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingLeft="20dp"
|
|
||||||
android:paddingTop="20dp"
|
|
||||||
android:text="道路类型"
|
|
||||||
android:textColor="#ffffff"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/road_case_address"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/road_case_style"
|
|
||||||
android:background="#0000FF"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingLeft="15dp"
|
|
||||||
android:text="东城区北三环"
|
|
||||||
android:textColor="#ffffff"
|
|
||||||
android:textSize="25sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/road_case_share_time"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/road_case_address"
|
|
||||||
android:background="#0000FF"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingLeft="20dp"
|
|
||||||
android:text="时间:"
|
|
||||||
android:textColor="#ffffff"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/road_case_useless"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginTop="25dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:background="@drawable/amap_bus" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/road_case_useless_num"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_below="@id/road_case_useless"
|
|
||||||
android:layout_alignLeft="@id/road_case_useless"
|
|
||||||
android:layout_alignRight="@id/road_case_useless"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="10"
|
|
||||||
android:textColor="#FF4233"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/road_case_uselful"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_alignTop="@id/road_case_useless"
|
|
||||||
android:layout_alignBottom="@id/road_case_useless"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_toLeftOf="@id/road_case_useless"
|
|
||||||
android:background="@drawable/amap_ride" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/road_case_useful_num"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_below="@id/road_case_useless"
|
|
||||||
android:layout_alignLeft="@id/road_case_uselful"
|
|
||||||
android:layout_alignRight="@id/road_case_uselful"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="5"
|
|
||||||
android:textColor="#FF4233"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/road_case_liset_item"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/road_case_style"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingTop="20dp"
|
||||||
|
android:text="道路类型"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/road_case_address"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/road_case_style"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="15dp"
|
||||||
|
android:text="东城区北三环"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="25sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/road_case_share_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/road_case_address"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:text="时间:"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/road_case_useless"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginTop="25dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:background="@drawable/amap_bus" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/road_case_useless_num"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_below="@id/road_case_useless"
|
||||||
|
android:layout_alignLeft="@id/road_case_useless"
|
||||||
|
android:layout_alignRight="@id/road_case_useless"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="10"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/road_case_uselful"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignTop="@id/road_case_useless"
|
||||||
|
android:layout_alignBottom="@id/road_case_useless"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_toLeftOf="@id/road_case_useless"
|
||||||
|
android:background="@drawable/amap_ride" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/road_case_useful_num"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_below="@id/road_case_useless"
|
||||||
|
android:layout_alignLeft="@id/road_case_uselful"
|
||||||
|
android:layout_alignRight="@id/road_case_uselful"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="5"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/share_num"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="0"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="25sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/shre_num_des"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="分享次数"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:background="#FFFFFF" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/share_approve"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="0"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="25sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/share_approve_des"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="车友认同次数"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:background="#FFFFFF" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/share_index"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="@drawable/amap_ride" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/share_index_des"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="热心指数"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/road_case_share_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
android:orientation="vertical"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
android:background="#000000"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/road_case_share_list"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:overScrollMode="never"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?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="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/share_event_guide_des"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:background="#0000ff"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="小窍门:分享路况、点赞其他车友,有助于提高热心指数"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="16sp">
|
||||||
|
|
||||||
|
</TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/share_event_null_des"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_below="@+id/share_event_guide_des"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="你还没有分享过道路事件,快去试试吧" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/shre_event_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/share_event_null_des"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:text="去分享"
|
||||||
|
android:textSize="25sp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<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">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/share_linear"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="#0000ff"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/share_num"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="0"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="25sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/shre_num_des"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="分享次数"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:background="#FFFFFF" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="#0000ff"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/share_approve"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="0"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="25sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/share_approve_des"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="车友认同次数"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:background="#FFFFFF" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="#0000ff"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/share_index"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:background="@drawable/amap_ride" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/share_index_des"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="热心指数"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/share_event_guide_des"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_below="@+id/share_linear"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:background="#0000ff"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="小窍门:分享路况、点赞其他车友,有助于提高热心指数"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="16sp">
|
|
||||||
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/share_event_null_des"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="100dp"
|
|
||||||
android:layout_below="@+id/share_event_guide_des"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="你还没有分享过道路事件,快去试试吧" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/shre_event_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/share_event_null_des"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:background="#FFFFFF"
|
|
||||||
android:text="去分享"
|
|
||||||
android:textSize="25sp" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
Reference in New Issue
Block a user