1、修改登录功能并验证,除了支付宝登录其他都已验证
2、完成个人中心的功能,个人主页完成、钱包完成、背包完成
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
package com.example.modulecircle.adapter;
|
||||
|
||||
import android.media.MediaPlayer;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulecircle.R;
|
||||
import com.qxcm.moduleutil.adapter.OneImageYuanJiaoAdapter;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.widget.MyGridView;
|
||||
import com.qxcm.moduleutil.widget.img.FullScreenUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewHolder> {
|
||||
public CirleListAdapter() {
|
||||
super(R.layout.item_cirle_list);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, CircleListBean item) {
|
||||
helper.addOnClickListener(R.id.dianzan)
|
||||
.addOnClickListener(R.id.dy_lookmore_tv)
|
||||
.addOnClickListener(R.id.dy_head_image)
|
||||
.addOnClickListener(R.id.dy_more_image)
|
||||
.addOnClickListener(R.id.dy_oneimage_iv);
|
||||
|
||||
//先让单图,多图,音频的布局显示
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.iv_jubao).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// ARouter.getInstance().build(AroutUtil.COMMUNITY_JUBAO).withString("uid", item.getUid() + "").navigation();
|
||||
}
|
||||
});
|
||||
//昵称
|
||||
helper.setText(R.id.dy_name_text, item.getUserNickName());
|
||||
|
||||
//头像
|
||||
ImageUtils.loadHeadCC(item.getUserAvatar(), (ImageView) helper.getView(R.id.dy_head_image));
|
||||
|
||||
//动态内容以富文本展示
|
||||
String content = item.getContent();
|
||||
if (content == null || content.length() == 0) {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_content_tv).setVisibility(View.GONE);
|
||||
} else {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_content_tv).setVisibility(View.VISIBLE);
|
||||
}
|
||||
helper.getView(R.id.dy_lookmore_tv).getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
|
||||
@Override
|
||||
public boolean onPreDraw() {
|
||||
//这个回调会调用多次,获取完行数记得注销监听
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
int lineCount = view.getLineCount();
|
||||
if (lineCount >= 7) {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||
} else {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
helper.setText(R.id.dy_content_tv, content);
|
||||
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
view.setVisibility(View.GONE);
|
||||
} else {
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
view.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
//点赞
|
||||
helper.setText(R.id.dy_fabulous, item.getLike());
|
||||
// if (item.is_praise() == 1) {
|
||||
// TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
// dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan2));
|
||||
// helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_yidianzan);
|
||||
// } else {
|
||||
// TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
// dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan1));
|
||||
// helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_dianzan);
|
||||
// }
|
||||
|
||||
//分享数
|
||||
helper.setText(R.id.dy_zs, item.getIsShare());
|
||||
//评论数
|
||||
helper.setText(R.id.dy_comment, item.getComment() + "");
|
||||
|
||||
|
||||
//时间
|
||||
|
||||
if (!item.getTime().isEmpty()) {
|
||||
try {
|
||||
helper.setText(R.id.dy_time_text, item.getTime());
|
||||
} catch (NumberFormatException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (item.getImages().size() != 0) {
|
||||
String[] arrIv = item.getImages().toArray(new String[item.getImages().size()]);
|
||||
int length = arrIv.length;
|
||||
|
||||
|
||||
OneImageYuanJiaoAdapter oneImageYuanJiaoAdapter = new OneImageYuanJiaoAdapter(mContext);
|
||||
MyGridView recyclerView = helper.getView(R.id.dy_image_recyc);
|
||||
recyclerView.setNumColumns(3);
|
||||
recyclerView.setAdapter(oneImageYuanJiaoAdapter);
|
||||
oneImageYuanJiaoAdapter.getList_adapter().clear();
|
||||
|
||||
for (int j = 0; j < arrIv.length; j++) {
|
||||
oneImageYuanJiaoAdapter.getList_adapter().add(arrIv[j]);
|
||||
}
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||
|
||||
oneImageYuanJiaoAdapter.notifyDataSetChanged();
|
||||
|
||||
recyclerView.setOnItemClickListener((parent, view, position, id) -> {
|
||||
FullScreenUtil.showFullScreenDialog(mContext, position, oneImageYuanJiaoAdapter.getList_adapter());
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,35 +1,22 @@
|
||||
package com.example.modulecircle.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.adapter.CirleCategoryBannerAdapter;
|
||||
import com.example.modulecircle.adapter.CirleListAdapter;
|
||||
import com.qxcm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.example.modulecircle.contacts.CircleContacts;
|
||||
import com.example.modulecircle.databinding.FragmentCircleBinding;
|
||||
import com.example.modulecircle.databinding.FragmentCircleCategoryBinding;
|
||||
import com.example.modulecircle.presenter.CirclePresenter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.BaseListData;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.bean.RoomTypeModel;
|
||||
import com.zhpan.bannerview.constants.PageStyle;
|
||||
import com.zhpan.bannerview.indicator.DrawableIndicator;
|
||||
import com.zhpan.indicator.base.IIndicator;
|
||||
import com.zhpan.indicator.enums.IndicatorSlideMode;
|
||||
|
||||
@@ -1,304 +0,0 @@
|
||||
<?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:background="@drawable/bg_r16_fff"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="15sp"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingRight="15sp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.qxcm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/dy_head_image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_name_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#212121"
|
||||
android:textStyle="bold"
|
||||
android:text="萌新驾到"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_time_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="发布于12:52"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#999999"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/delete"-->
|
||||
<!-- android:layout_width="25dp"-->
|
||||
<!-- android:layout_height="25dp"-->
|
||||
<!-- android:layout_gravity="right"-->
|
||||
<!-- android:scaleType="center"-->
|
||||
<!-- android:src="@mipmap/icon_dongtai_del2"-->
|
||||
<!-- android:visibility="gone" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gensui"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/no_follow"
|
||||
android:gravity="center"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/diandian"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:background="@mipmap/shequ_dongtai_gengduo"
|
||||
android:gravity="center"
|
||||
android:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/aaa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<com.qxcm.moduleutil.widget.MyGridView
|
||||
android:id="@+id/dy_image_recyc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:numColumns="3"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/dy_oneimage_iv"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_corner_radius="5dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_content_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="7"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_lookmore_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:text="查看更多"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/weizhixinxi" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAddress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="未知"
|
||||
android:textColor="#ffa7a5ae"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_more_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1.7"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right"
|
||||
android:src="@mipmap/mx"
|
||||
android:visibility="visible" />
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="1dp"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/pinglun"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pinglun_image"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/dongtai_hudong_pinglun" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_comment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dianzan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dianzan_image"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/dongtai_hudong_dianzan" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_fabulous"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/zs"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/zs_image"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/zs" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_zs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_jubao"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,5 +1,2 @@
|
||||
<resources>
|
||||
<string name="app_name">modulecircle</string>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user