1、个人信息完善
2、集成聊天功能 3、完成登录
This commit is contained in:
@@ -24,14 +24,14 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
jvmTarget = '17'
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.BannerModel;
|
||||
import com.qxcm.moduleutil.bean.RoomTypeModel;
|
||||
import com.qxcm.moduleutil.bean.TopRoom;
|
||||
|
||||
@@ -17,7 +18,7 @@ public final class VoiceCategoryContacts {
|
||||
void setCategories(List<RoomTypeModel> list);
|
||||
|
||||
|
||||
// void setBanners(List<BannerModel> bannerModels);
|
||||
void setBanners(List<BannerModel> bannerModels);
|
||||
|
||||
void setRoomId(String roomId);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -20,8 +21,11 @@ import com.example.modulevoice.databinding.FragmentVoiceCategoryBinding;
|
||||
import com.example.modulevoice.presenter.VoiceCategoryPresenter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.BannerModel;
|
||||
import com.qxcm.moduleutil.bean.RoomTypeModel;
|
||||
import com.qxcm.moduleutil.bean.TopRoom;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.stx.xhb.xbanner.XBanner;
|
||||
import com.sunfusheng.marqueeview.MarqueeView;
|
||||
import com.zhpan.bannerview.constants.PageStyle;
|
||||
|
||||
@@ -75,7 +79,7 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
// MvpPre.getBanners();
|
||||
MvpPre.getBanners();
|
||||
MvpPre.getCarousels();//顶部推荐
|
||||
MvpPre.getCategories();
|
||||
}
|
||||
@@ -84,13 +88,13 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
|
||||
protected void initView() {
|
||||
|
||||
|
||||
// mBinding.banner.loadImage(new XBanner.XBannerAdapter() {
|
||||
// @Override
|
||||
// public void loadBanner(XBanner banner, Object model, View view, int position) {
|
||||
// BannerModel bannerModel = (BannerModel) model;
|
||||
// ImageUtils.loadCenterCrop(bannerModel.getContent(), (ImageView) view);
|
||||
// }
|
||||
// });
|
||||
mBinding.banner.loadImage(new XBanner.XBannerAdapter() {
|
||||
@Override
|
||||
public void loadBanner(XBanner banner, Object model, View view, int position) {
|
||||
BannerModel bannerModel = (BannerModel) model;
|
||||
ImageUtils.loadCenterCrop(bannerModel.getContent(), (ImageView) view);
|
||||
}
|
||||
});
|
||||
// mBinding.banner.setOnItemClickListener(new XBanner.OnItemClickListener() {
|
||||
// @Override
|
||||
// public void onItemClick(XBanner banner, Object model, View view, int position) {
|
||||
@@ -188,10 +192,11 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
|
||||
mBinding.slidingTabLayout.setCurrentTab(0);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void setBanners(List<BannerModel> list) {
|
||||
// mBinding.banner.setBannerData(R.layout.index_image_banner, list);
|
||||
// }
|
||||
@Override
|
||||
public void setBanners(List<BannerModel> bannerModels) {
|
||||
mBinding.banner.setBannerData(R.layout.index_image_banner, bannerModels);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setRoomId(String roomId) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.speech.tts.Voice;
|
||||
|
||||
import com.example.modulevoice.contacts.VoiceCategoryContacts;
|
||||
import com.qxcm.moduleutil.bean.BannerModel;
|
||||
import com.qxcm.moduleutil.bean.RoomTypeModel;
|
||||
import com.qxcm.moduleutil.bean.TopRoom;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
@@ -94,6 +95,20 @@ public class VoiceCategoryPresenter extends BasePresenter<VoiceCategoryContacts.
|
||||
//
|
||||
// }
|
||||
// });
|
||||
List<BannerModel> bannerModels = new ArrayList<BannerModel>();
|
||||
for (int i = 0; i < 5; i++) {
|
||||
BannerModel bannerModel = new BannerModel();
|
||||
bannerModel.setAd_id("123");
|
||||
bannerModel.setType("123");
|
||||
bannerModel.setTitle("123");
|
||||
bannerModel.setItem_id("123");
|
||||
bannerModel.setLink_url("123");
|
||||
bannerModel.setContent("https://pic.rmb.bdstatic.com/bjh/240727/0794225838d72cc4c12c39c9bc7a986d2625.jpeg@h_1280");
|
||||
bannerModel.setDetail_pictures(null);
|
||||
bannerModels.add(bannerModel);
|
||||
}
|
||||
|
||||
MvpRef.get().setBanners(bannerModels);
|
||||
}
|
||||
@Override
|
||||
public void getCarousels() {
|
||||
|
||||
@@ -23,46 +23,45 @@
|
||||
android:paddingRight="16dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<!-- <com.stx.xhb.xbanner.XBanner-->
|
||||
<!-- android:id="@+id/banner"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- app:AutoPlayTime="3000"-->
|
||||
<!-- app:isAutoPlay="true"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintDimensionRatio="340:96"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:pointsVisibility="false"-->
|
||||
<!-- android:visibility="gone"/>-->
|
||||
|
||||
<!-- <com.stx.xhb.xbanner.XBanner-->
|
||||
<!-- android:id="@+id/banner"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- app:AutoPlayTime="3000"-->
|
||||
<!-- app:isAutoPlay="true"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintDimensionRatio="340:96"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:pointsVisibility="false"-->
|
||||
<!-- android:visibility="gone"/>-->
|
||||
|
||||
|
||||
<com.zhpan.bannerview.BannerViewPager
|
||||
android:id="@+id/banner_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:bvp_indicator_visibility="gone"/>
|
||||
app:bvp_indicator_visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_31"
|
||||
app:layout_constraintTop_toBottomOf="@+id/banner_view_pager"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r25_f3333"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_12">
|
||||
app:layout_constraintTop_toBottomOf="@+id/banner_view_pager">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tv_hot"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_alignParentStart="true"
|
||||
android:src="@mipmap/pp"
|
||||
/>
|
||||
android:src="@mipmap/pp" />
|
||||
|
||||
|
||||
<com.sunfusheng.marqueeview.MarqueeView
|
||||
@@ -70,13 +69,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_toEndOf="@+id/tv_hot"
|
||||
android:layout_toStartOf="@+id/tv_wg"
|
||||
android:layout_toEndOf="@+id/tv_hot"
|
||||
app:mvAnimDuration="1000"
|
||||
app:mvInterval="3000"
|
||||
app:mvSingleLine="true"
|
||||
app:mvTextColor="@color/color_FF333333"
|
||||
app:mvTextSize="@dimen/sp_14"
|
||||
app:mvSingleLine="true"/>
|
||||
app:mvTextSize="@dimen/sp_14" />
|
||||
|
||||
|
||||
<ImageView
|
||||
@@ -85,13 +84,26 @@
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:src="@mipmap/wg"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
android:src="@mipmap/wg" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.stx.xhb.xbanner.XBanner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:AutoPlayTime="3000"
|
||||
app:isAutoPlay="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="340:96"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl"
|
||||
app:pointsVisibility="false" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||
@@ -99,14 +111,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
app:tl_indicator_corner_radius="@dimen/dp_3"
|
||||
app:tl_indicator_drawable="@drawable/index_bg_indicator"
|
||||
app:tl_indicator_height="@dimen/dp_6"
|
||||
app:tl_indicator_margin_bottom="@dimen/dp_3"
|
||||
app:tl_showCateIndicator="false"
|
||||
app:tl_indicator_width="@dimen/dp_28"
|
||||
app:tl_showCateIndicator="false"
|
||||
app:tl_tab_width="@dimen/dp_50"
|
||||
app:tl_textBold="SELECT"
|
||||
app:tl_textSelectColor="@color/color_2B2823"
|
||||
|
||||
7
modulevoice/src/main/res/layout/index_image_banner.xml
Normal file
7
modulevoice/src/main/res/layout/index_image_banner.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.makeramen.roundedimageview.RoundedImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:riv_corner_radius="@dimen/dp_14" />
|
||||
Reference in New Issue
Block a user