"页面完善"

master
fangshicai 3 years ago
parent 175fef36d5
commit 1e377bef39

@ -37,20 +37,20 @@
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/activity_goods_details.xml" value="0.1" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/activity_home_page.xml" value="0.2" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/activity_login.xml" value="0.176" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/activity_main.xml" value="0.1" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/activity_main.xml" value="0.264" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/fragment_goods_type.xml" value="0.15208333333333332" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/fragment_home_page.xml" value="0.12" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/fragment_message_page.xml" value="0.13229166666666667" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/fragment_message_page.xml" value="0.16799999999999998" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/fragment_my_page.xml" value="0.176" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/fragment_phone.xml" value="0.10572916666666667" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/fragment_publish_page.xml" value="0.152" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/fragment_shop_page.xml" value="0.2" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/goods_show_item.xml" value="0.128" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/goods_show_item.xml" value="0.264" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/gv_filter_image.xml" value="0.11770833333333333" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/item_book_info.xml" value="0.1" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/item_delivery.xml" value="0.1" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/item_delivery_select.xml" value="0.1" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/item_stagger.xml" value="0.2" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/item_stagger.xml" value="0.264" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/list_good_stype_item.xml" value="0.2" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/layout/third_fragment.xml" value="0.264" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/menu/bottom_navigation_menu.xml" value="0.176" />

@ -61,6 +61,7 @@ public class StaggerAdapter extends RecyclerView.Adapter<StaggerAdapter.InnerHol
String strTvTitle;
String strTvCount;
String imageUrl;
String uerName;
holder.setmPosition(position);
@ -69,9 +70,11 @@ public class StaggerAdapter extends RecyclerView.Adapter<StaggerAdapter.InnerHol
strTvTitle = mData.get(position).getContent();
strTvCount = mData.get(position).getPrice().toString();
imageUrl = (String) mData.get(position).getImageUrlList().get(0);
uerName = mData.get(position).getUsername();
holder.getTvTitle().setText(strTvTitle);
holder.getTvCount().setText(strTvCount);
holder.getmUserName().setText(uerName);
Glide.with(context)
.load(imageUrl)
@ -105,6 +108,8 @@ public class StaggerAdapter extends RecyclerView.Adapter<StaggerAdapter.InnerHol
private final ImageView mImage;
private final TextView mContent;
private final TextView mPrice;
private final TextView mUserName;
public InnerHolder(View itemView){
super(itemView);
@ -113,7 +118,7 @@ public class StaggerAdapter extends RecyclerView.Adapter<StaggerAdapter.InnerHol
mImage = itemView.findViewById(R.id.iv_image);
mContent = itemView.findViewById(R.id.tv_content);
mPrice = itemView.findViewById(R.id.tv_price);
mUserName = itemView.findViewById(R.id.seller_name);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
@ -127,6 +132,7 @@ public class StaggerAdapter extends RecyclerView.Adapter<StaggerAdapter.InnerHol
}
public TextView getmUserName() {return mUserName;}
public TextView getTvTitle() {
return mContent;
}

@ -17,6 +17,7 @@ import com.android.R;
import com.android.activity.LoginActivity;
import com.android.bean.ResponseData;
import com.android.bean.User;
import com.android.databinding.FragmentMyPageBinding;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
@ -27,20 +28,16 @@ import org.greenrobot.eventbus.ThreadMode;
* Use the {@link MyPageFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class MyPageFragment extends Fragment {
public class MyPageFragment extends Fragment implements View.OnClickListener{
private FragmentMyPageBinding binding;
private View rootView;
private TextView textView;
private User user;
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
private View view;
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
public MyPageFragment() {
// Required empty public constructor
@ -60,20 +57,11 @@ public class MyPageFragment extends Fragment {
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment MyPageFragment.
*/
// TODO: Rename and change types and number of parameters
public static MyPageFragment newInstance(String param1, String param2) {
MyPageFragment fragment = new MyPageFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@ -94,24 +82,22 @@ public class MyPageFragment extends Fragment {
EventBus.getDefault().register(this);
}
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
Log.e("1",user.getUserName());
}
@Override
public void onDestroyView() {
binding = null;
super.onDestroyView();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
// rootView = inflater.inflate(R.layout.fragment_my_page, container, false);
// textView = rootView.findViewById(R.id.tv_my);
binding = FragmentMyPageBinding.inflate(inflater,container,false);
view = binding.getRoot();
// Inflate the layout for this fragment
view = inflater.inflate(R.layout.fragment_my_page, container, false);
TextView tvName = view.findViewById(R.id.tv_name);
Button rece_addr = view.findViewById(R.id.btn_my_recevive_goods);
rece_addr.setOnClickListener(new View.OnClickListener() {
@ -130,6 +116,8 @@ public class MyPageFragment extends Fragment {
}
});
tvName.setText(user.getUserName());
binding.btnMyReleasedGoods.setOnClickListener(this);
binding.btnMyBuyGoods.setOnClickListener(this);
return view;
}
@ -138,4 +126,17 @@ public class MyPageFragment extends Fragment {
this.user = responseData.getData();
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.btn_my_buy_goods:
Log.e("1","btn_my_buy_goods");
break;
case R.id.btn_my_released_goods:
Log.e("1","btn_my_recevive_goods");
break;
}
}
}

@ -186,6 +186,7 @@ public class PublishProductFragment extends Fragment implements View.OnClickList
//上传
private void updateImage(List<MultipartBody.Part> parts) {
upModelimpl.UpImage(parts,this);
}
@ -193,8 +194,6 @@ public class PublishProductFragment extends Fragment implements View.OnClickList
public void upImageOnSuccess(ResponseData<ImageBean> responseData) {
imageBean = responseData.getData();
Log.e("str",String.valueOf(imageBean.getImageCode()));
}
@Override

@ -0,0 +1,43 @@
package com.android.bean;
import java.io.Serializable;
import java.util.List;
public class BaseRecords<T> implements Serializable {
private List<T> records;
private Integer current;
private Integer size;
private Integer total;
public List<T> getRecords() {
return records;
}
public void setRecords(List<T> records) {
this.records = records;
}
public Integer getCurrent() {
return current;
}
public void setCurrent(Integer current) {
this.current = current;
}
public Integer getSize() {
return size;
}
public void setSize(Integer size) {
this.size = size;
}
public Integer getTotal() {
return total;
}
public void setTotal(Integer total) {
this.total = total;
}
}

@ -0,0 +1,114 @@
package com.android.bean.queryBean;
import java.util.ArrayList;
public class UserGoodsRecords {
private String buyerAvatar;
private Long buyerId;
private String buyerName;
private Long createTime;
private String goodsDescription;
private Long goodsId;
private Long id;
private ArrayList<String> imageUrlList;
private Integer price;
private String sellerAvatar;
private Long sellerId;
private String sellerName;
public String getBuyerAvatar() {
return buyerAvatar;
}
public void setBuyerAvatar(String buyerAvatar) {
this.buyerAvatar = buyerAvatar;
}
public Long getBuyerId() {
return buyerId;
}
public void setBuyerId(Long buyerId) {
this.buyerId = buyerId;
}
public String getBuyerName() {
return buyerName;
}
public void setBuyerName(String buyerName) {
this.buyerName = buyerName;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public String getGoodsDescription() {
return goodsDescription;
}
public void setGoodsDescription(String goodsDescription) {
this.goodsDescription = goodsDescription;
}
public Long getGoodsId() {
return goodsId;
}
public void setGoodsId(Long goodsId) {
this.goodsId = goodsId;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public ArrayList<String> getImageUrlList() {
return imageUrlList;
}
public void setImageUrlList(ArrayList<String> imageUrlList) {
this.imageUrlList = imageUrlList;
}
public Integer getPrice() {
return price;
}
public void setPrice(Integer price) {
this.price = price;
}
public String getSellerAvatar() {
return sellerAvatar;
}
public void setSellerAvatar(String sellerAvatar) {
this.sellerAvatar = sellerAvatar;
}
public Long getSellerId() {
return sellerId;
}
public void setSellerId(Long sellerId) {
this.sellerId = sellerId;
}
public String getSellerName() {
return sellerName;
}
public void setSellerName(String sellerName) {
this.sellerName = sellerName;
}
}

@ -1,8 +1,10 @@
package com.android.model.goods;
import com.android.bean.BaseRecords;
import com.android.bean.GoodRecords;
import com.android.bean.GoodsType;
import com.android.bean.ResponseData;
import com.android.bean.queryBean.UserGoodsRecords;
import java.io.File;
import java.util.List;
@ -29,12 +31,10 @@ public interface GoodsHttp_interface {
Observable<ResponseData<GoodRecords>> sendGetAllGood(@Query("userId") Long userId,
@QueryMap Map<String, Object> map
);
@GET("tran/trading/buy")
@Headers({"appId:b34ac21286ae45938add627b418a4871",
"appSecret:67526def9de11d4a64f5e80e60ed3372eea69"})
Observable<ResponseData<BaseRecords<UserGoodsRecords>>> sendUserBuyGoods(@Query("userId") Long userId,
@QueryMap Map<String, Object> map);
}

@ -26,4 +26,5 @@ public interface UpHttp_interface {
@Headers({"appId:b34ac21286ae45938add627b418a4871",
"appSecret:67526def9de11d4a64f5e80e60ed3372eea69"})
Observable<ResponseData<Good>> sendAddGoods(@Body Good goods);
}

@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".activity.fragment.MessagePageFragment">
<!-- TODO: Update blank fragment layout -->

@ -90,13 +90,14 @@
android:text="个人订单"/>
<Button
android:background="#ffffff"
android:textSize="13sp"
android:id="@+id/btn_my_buy_goods"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="全部订单>"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" />
android:layout_alignParentRight="true"
android:background="#ffffff"
android:text="全部订单>"
android:textSize="13sp" />
</RelativeLayout>
<LinearLayout
@ -105,6 +106,7 @@
android:orientation="vertical">
<Button
android:background="#00000000"
android:textColor="@color/black"
android:drawableTop="@drawable/my_released"

@ -43,6 +43,7 @@
android:layout_height="18dp"
android:layout_below="@+id/tv_content"
android:textColor="@color/red" />
<TextView
android:id="@+id/str"
android:layout_width="wrap_content"
@ -51,17 +52,34 @@
android:layout_toRightOf="@+id/tv_price"
android:text="@string/moneyType"
android:textColor="@color/red" />
<Button
android:id="@+id/elevatedButton"
<LinearLayout
android:layout_width="wrap_content"
android:layout_toRightOf="@+id/str"
android:layout_below="@+id/tv_content"
android:layout_height="wrap_content"
android:text="加入购物车"
style="Filled button"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="32dp"
/>
>
<TextView
android:text="卖家"
android:layout_marginStart="32dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_marginStart="4dp"
android:id="@+id/seller_name"
android:text="卖家信息"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<!-- <Button-->
<!-- android:id="@+id/elevatedButton"-->
<!-- style="Filled button"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginEnd="32dp"-->
<!-- android:text="加入购物车" />-->
<!-- <Button-->
<!-- android:id="@+id/bt_buy_now"-->
<!-- android:layout_width="64dp"-->

Loading…
Cancel
Save