Browse Source

1.My Rewards主界面搭建
2.My Rewards Active列表界面搭建
3.My Rewards Expired列表界面搭建
4.My Rewards Used列表界面搭建

Administrator 2 years ago
parent
commit
720ec933c2
31 changed files with 1150 additions and 11 deletions
  1. 6 6
      cpt_main/src/main/java/com/hongyegroup/cpt_main/ui/ProfileFragment.kt
  2. 49 5
      cpt_main/src/main/res/layout/fragment_profile.xml
  3. 2 0
      cpt_rewards/src/main/AndroidManifest.xml
  4. 13 0
      cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/mvvm/MyRewardsActiveViewModel.kt
  5. 13 0
      cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/mvvm/MyRewardsExpiredViewModel.kt
  6. 13 0
      cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/mvvm/MyRewardsUsedViewModel.kt
  7. 128 0
      cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/MyRewardsActivity.kt
  8. 7 0
      cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/RewardsActivity.kt
  9. 57 0
      cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/fragment/MyRewardsActiveFragment.kt
  10. 52 0
      cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/fragment/MyRewardsExpiredFragment.kt
  11. 53 0
      cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/fragment/MyRewardsUsedFragment.kt
  12. BIN
      cpt_rewards/src/main/res/drawable-xhdpi/iv_rewards_expired_icon.webp
  13. BIN
      cpt_rewards/src/main/res/drawable-xhdpi/iv_rewards_non_refundable.webp
  14. BIN
      cpt_rewards/src/main/res/drawable-xhdpi/iv_rewards_redeemed_at.webp
  15. BIN
      cpt_rewards/src/main/res/drawable-xhdpi/iv_rewards_used_icon.webp
  16. BIN
      cpt_rewards/src/main/res/drawable-xxhdpi/iv_rewards_expired_icon.webp
  17. BIN
      cpt_rewards/src/main/res/drawable-xxhdpi/iv_rewards_non_refundable.webp
  18. BIN
      cpt_rewards/src/main/res/drawable-xxhdpi/iv_rewards_redeemed_at.webp
  19. BIN
      cpt_rewards/src/main/res/drawable-xxhdpi/iv_rewards_used_icon.webp
  20. 110 0
      cpt_rewards/src/main/res/layout/activity_my_rewards.xml
  21. 1 0
      cpt_rewards/src/main/res/layout/activity_rewards.xml
  22. 9 0
      cpt_rewards/src/main/res/layout/fragment_my_rewards_active.xml
  23. 201 0
      cpt_rewards/src/main/res/layout/item_rewards_active.xml
  24. 165 0
      cpt_rewards/src/main/res/layout/item_rewards_expired.xml
  25. 215 0
      cpt_rewards/src/main/res/layout/item_rewards_used.xml
  26. 31 0
      cs_cptServices/src/main/java/com/guadou/cs_cptservices/adapter/ViewPagerFragmentAdapter.java
  27. BIN
      cs_cptServices/src/main/res/drawable-xhdpi/notification_white.webp
  28. BIN
      cs_cptServices/src/main/res/drawable-xxhdpi/notification_white.webp
  29. 9 0
      cs_cptServices/src/main/res/drawable/shape_gray_bg_with_blue_border_line.xml
  30. 10 0
      cs_cptServices/src/main/res/drawable/shape_round_blue.xml
  31. 6 0
      cs_cptServices/src/main/res/drawable/shape_round_white.xml

+ 6 - 6
cpt_main/src/main/java/com/hongyegroup/cpt_main/ui/ProfileFragment.kt

@@ -28,11 +28,16 @@ class ProfileFragment : YYBaseVDBFragment<ProfileViewModel, FragmentProfileBindi
 
     override fun init(savedInstanceState: Bundle?) {
 
-        initRV()
+        initView()
         initData()
         initListener()
     }
 
+    private fun initView() {
+
+
+    }
+
     private fun initData() {
         showStateLoading()
         CommUtils.getHandler().postDelayed({
@@ -48,11 +53,6 @@ class ProfileFragment : YYBaseVDBFragment<ProfileViewModel, FragmentProfileBindi
 
     }
 
-
-    private fun initRV() {
-
-    }
-
     override fun scrollTopRefresh() {
 
     }

+ 49 - 5
cpt_main/src/main/res/layout/fragment_profile.xml

@@ -27,6 +27,54 @@
             android:background="#FAFDFF"
             android:orientation="vertical">
 
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="right"
+                android:orientation="vertical"
+               android:background="@drawable/shape_gradient_proifle_title_top">
+
+                <com.guadou.lib_baselib.view.titlebar.StatusbarGrayView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"/>
+
+                <FrameLayout
+                    android:id="@+id/fl_title_right_box"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginRight="@dimen/d_10dp">
+
+                    <ImageView
+                        android:id="@+id/iv_notify_icon"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:padding="@dimen/d_9dp"
+                        android:src="@drawable/notification_white"
+                        android:visibility="visible" />
+
+                    <TextView
+                        android:id="@+id/tv_badge_num"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="start"
+                        android:layout_marginTop="@dimen/d_5dp"
+                        android:background="@drawable/badge_red"
+                        android:maxLength="2"
+                        android:paddingLeft="@dimen/d_5dp"
+                        android:paddingTop="@dimen/d_2dp"
+                        android:paddingRight="@dimen/d_5dp"
+                        android:paddingBottom="@dimen/d_2dp"
+                        android:textColor="@color/white"
+                        android:textSize="8sp"
+                        android:visibility="visible"
+                        tool:text="99" />
+
+                </FrameLayout>
+
+            </LinearLayout>
+
             <com.scwang.smart.refresh.layout.SmartRefreshLayout
                 android:id="@+id/refresh_layout_profile"
                 android:layout_width="match_parent"
@@ -86,9 +134,9 @@
                                         android:id="@+id/text_view_full_name"
                                         android:layout_width="wrap_content"
                                         android:layout_height="wrap_content"
-                                        android:maxWidth="200dp"
                                         android:layout_centerInParent="true"
                                         android:gravity="center"
+                                        android:maxWidth="200dp"
                                         android:text="-"
                                         android:textColor="@color/profile_black_28394a"
                                         android:textSize="24sp"
@@ -326,7 +374,6 @@
                                 android:textSize="@dimen/d_18dp" />
 
 
-
                             <!--  邀请好友   -->
                             <RelativeLayout
                                 android:id="@+id/ll_me_invite_and_earn"
@@ -383,8 +430,6 @@
                             </RelativeLayout>
 
 
-
-
                             <!--Promotions (隐藏了)-->
                             <!--                        <RelativeLayout-->
                             <!--                            android:id="@+id/rl_me_promotion"-->
@@ -427,7 +472,6 @@
                             <!--                        </RelativeLayout>-->
 
 
-
                             <!--Operation Executive Evaluation 评分隐藏-->
                             <!--                        <RelativeLayout-->
                             <!--                            android:id="@+id/rl_me_evaluation"-->

+ 2 - 0
cpt_rewards/src/main/AndroidManifest.xml

@@ -18,6 +18,8 @@
 
         <activity android:name=".ui.RewardsPaymentSuccessActivity"/>
 
+        <activity android:name=".ui.MyRewardsActivity"/>
+
     </application>
 
 </manifest>

+ 13 - 0
cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/mvvm/MyRewardsActiveViewModel.kt

@@ -0,0 +1,13 @@
+package com.hongyegroup.cpt_rewards.mvvm
+
+import com.guadou.cs_cptservices.binding.BaseDataBindingAdapter
+import com.guadou.lib_baselib.base.vm.BaseViewModel
+import com.hongyegroup.cpt_rewards.BR
+import com.hongyegroup.cpt_rewards.R
+
+class MyRewardsActiveViewModel : BaseViewModel() {
+
+    var mActiveRewardsData = ArrayList<String>()
+    val mActiveAdapter by lazy { BaseDataBindingAdapter(R.layout.item_rewards_active, BR.item, mActiveRewardsData) }
+
+}

+ 13 - 0
cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/mvvm/MyRewardsExpiredViewModel.kt

@@ -0,0 +1,13 @@
+package com.hongyegroup.cpt_rewards.mvvm
+
+import com.guadou.cs_cptservices.binding.BaseDataBindingAdapter
+import com.guadou.lib_baselib.base.vm.BaseViewModel
+import com.hongyegroup.cpt_rewards.BR
+import com.hongyegroup.cpt_rewards.R
+
+class MyRewardsExpiredViewModel : BaseViewModel() {
+
+    var mExpiredRewardsData = ArrayList<String>()
+    val mExpiredAdapter by lazy { BaseDataBindingAdapter(R.layout.item_rewards_expired, BR.item, mExpiredRewardsData) }
+
+}

+ 13 - 0
cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/mvvm/MyRewardsUsedViewModel.kt

@@ -0,0 +1,13 @@
+package com.hongyegroup.cpt_rewards.mvvm
+
+import com.guadou.cs_cptservices.binding.BaseDataBindingAdapter
+import com.guadou.lib_baselib.base.vm.BaseViewModel
+import com.hongyegroup.cpt_rewards.BR
+import com.hongyegroup.cpt_rewards.R
+
+class MyRewardsUsedViewModel : BaseViewModel() {
+
+    var mUsedRewardsData = ArrayList<String>()
+    val mUsedAdapter by lazy { BaseDataBindingAdapter(R.layout.item_rewards_used, BR.item, mUsedRewardsData) }
+
+}

+ 128 - 0
cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/MyRewardsActivity.kt

@@ -0,0 +1,128 @@
+package com.hongyegroup.cpt_rewards.ui
+
+import android.content.Intent
+import android.os.Bundle
+import android.widget.TextView
+import androidx.fragment.app.Fragment
+import androidx.viewpager.widget.ViewPager
+import com.guadou.cs_cptservices.adapter.ViewPagerFragmentAdapter
+import com.guadou.lib_baselib.base.activity.BaseVDBActivity
+import com.guadou.lib_baselib.base.vm.BaseViewModel
+import com.guadou.lib_baselib.bean.DataBindingConfig
+import com.guadou.lib_baselib.utils.CommUtils
+import com.hongyegroup.cpt_rewards.BR
+import com.hongyegroup.cpt_rewards.R
+import com.hongyegroup.cpt_rewards.databinding.ActivityMyRewardsBinding
+import com.hongyegroup.cpt_rewards.ui.fragment.MyRewardsActiveFragment
+import com.hongyegroup.cpt_rewards.ui.fragment.MyRewardsExpiredFragment
+import com.hongyegroup.cpt_rewards.ui.fragment.MyRewardsUsedFragment
+
+class MyRewardsActivity : BaseVDBActivity<BaseViewModel, ActivityMyRewardsBinding>() {
+
+    val mClickProxy by lazy { ClickProxy() }
+
+    var mTableList = ArrayList<TextView>()
+    var mFragments = ArrayList<Fragment>()
+    val mViewPagerAdapter by lazy { ViewPagerFragmentAdapter(supportFragmentManager, mFragments) }
+
+    companion object {
+
+        fun startInstance() {
+            val context = CommUtils.getContext()
+            val intent = Intent(context, MyRewardsActivity::class.java)
+            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+            context.startActivity(intent)
+        }
+
+    }
+
+    override fun init(savedInstanceState: Bundle?) {
+
+        initView()
+        initListener()
+
+    }
+
+    override fun getDataBindingConfig(): DataBindingConfig {
+
+        return DataBindingConfig(R.layout.activity_my_rewards)
+            .addBindingParams(BR.click, mClickProxy)
+
+    }
+
+    private fun initListener() {
+
+        //ViewPager滑动监听
+        mBinding.viewPagerMyRewards.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
+            override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
+
+            }
+
+            override fun onPageSelected(position: Int) {
+
+                setIndicator(position)
+
+            }
+
+            override fun onPageScrollStateChanged(state: Int) {
+
+            }
+        })
+
+    }
+
+    private fun initView() {
+
+        mTableList.add(mBinding.tvTabActive)
+        mTableList.add(mBinding.tvTabExpired)
+        mTableList.add(mBinding.tvTabUsed)
+
+        mFragments.add(MyRewardsActiveFragment())
+        mFragments.add(MyRewardsExpiredFragment())
+        mFragments.add(MyRewardsUsedFragment())
+
+        mBinding.viewPagerMyRewards.adapter = mViewPagerAdapter
+        mBinding.viewPagerMyRewards.offscreenPageLimit = 2
+
+    }
+
+    //设置View Pager Table
+    private fun setIndicator(position: Int) {
+
+        for (index in mTableList.indices) {
+
+            val tableTv = mTableList[index]
+
+            if (index == position) {
+
+                tableTv.setTextColor(CommUtils.getColor(R.color.white))
+                tableTv.setBackgroundResource(R.drawable.shape_round_blue)
+
+            } else {
+
+                tableTv.setTextColor(CommUtils.getColor(R.color.black))
+                tableTv.setBackgroundResource(R.drawable.shape_round_white)
+
+            }
+        }
+    }
+
+    override fun startObserve() {
+
+    }
+
+    /**
+     * DataBinding事件处理
+     */
+    inner class ClickProxy {
+
+        //切换ViewPager
+        fun changeViewPager(position: Int){
+
+            mBinding.viewPagerMyRewards.setCurrentItem(position)
+
+        }
+
+    }
+
+}

+ 7 - 0
cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/RewardsActivity.kt

@@ -136,5 +136,12 @@ class RewardsActivity : BaseVDBActivity<RewardsViewModel, ActivityRewardsBinding
 
         }
 
+        //跳转到My Rewards界面
+        fun gotoMyRewardsActivity(){
+
+            MyRewardsActivity.startInstance()
+
+        }
+
     }
 }

+ 57 - 0
cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/fragment/MyRewardsActiveFragment.kt

@@ -0,0 +1,57 @@
+package com.hongyegroup.cpt_rewards.ui.fragment
+
+import android.os.Bundle
+import android.view.View
+import androidx.databinding.ViewDataBinding
+import com.guadou.lib_baselib.base.fragment.BaseVDBLazyLoadingFragment
+import com.guadou.lib_baselib.base.vm.BaseViewModel
+import com.guadou.lib_baselib.bean.DataBindingConfig
+import com.guadou.lib_baselib.ext.vertical
+import com.guadou.lib_baselib.utils.CommUtils
+import com.hongyegroup.cpt_rewards.R
+import com.hongyegroup.cpt_rewards.databinding.FragmentMyRewardsActiveBinding
+import com.hongyegroup.cpt_rewards.mvvm.MyRewardsActiveViewModel
+
+class MyRewardsActiveFragment : BaseVDBLazyLoadingFragment<MyRewardsActiveViewModel, FragmentMyRewardsActiveBinding>() {
+
+
+    override fun getDataBindingConfig(): DataBindingConfig {
+
+        return DataBindingConfig(R.layout.fragment_my_rewards_active)
+
+    }
+
+    override fun startObserve() {
+
+    }
+
+    override fun init(savedInstanceState: Bundle?) {
+
+
+    }
+
+    override fun initViews(view: View) {
+        super.initViews(view)
+
+        for (index in 0..9){
+
+            mViewModel.mActiveRewardsData.add("")
+
+        }
+
+        mBinding.recyclerViewMyRewardsActive.vertical().adapter=mViewModel.mActiveAdapter
+        mViewModel.mActiveAdapter.notifyDataSetChanged()
+
+
+    }
+
+    override fun onLazyInitData() {
+
+        CommUtils.getHandler().postDelayed(Runnable {
+
+            showStateSuccess()
+
+        }, 200)
+
+    }
+}

+ 52 - 0
cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/fragment/MyRewardsExpiredFragment.kt

@@ -0,0 +1,52 @@
+package com.hongyegroup.cpt_rewards.ui.fragment
+
+import android.os.Bundle
+import android.view.View
+import com.guadou.lib_baselib.base.fragment.BaseVDBLazyLoadingFragment
+import com.guadou.lib_baselib.bean.DataBindingConfig
+import com.guadou.lib_baselib.ext.vertical
+import com.guadou.lib_baselib.utils.CommUtils
+import com.hongyegroup.cpt_rewards.R
+import com.hongyegroup.cpt_rewards.databinding.FragmentMyRewardsActiveBinding
+import com.hongyegroup.cpt_rewards.mvvm.MyRewardsExpiredViewModel
+
+class MyRewardsExpiredFragment:BaseVDBLazyLoadingFragment<MyRewardsExpiredViewModel,FragmentMyRewardsActiveBinding>() {
+
+    override fun getDataBindingConfig(): DataBindingConfig {
+
+        return DataBindingConfig(R.layout.fragment_my_rewards_active)
+
+    }
+
+    override fun startObserve() {
+
+    }
+
+    override fun init(savedInstanceState: Bundle?) {
+
+    }
+
+    override fun initViews(view: View) {
+        super.initViews(view)
+
+        for (index in 0..8){
+
+            mViewModel.mExpiredRewardsData.add("")
+
+        }
+
+        mBinding.recyclerViewMyRewardsActive.vertical().adapter=mViewModel.mExpiredAdapter
+        mViewModel.mExpiredAdapter.notifyDataSetChanged()
+
+    }
+
+    override fun onLazyInitData() {
+
+        CommUtils.getHandler().postDelayed(Runnable {
+
+            showStateSuccess()
+
+        }, 200)
+
+    }
+}

+ 53 - 0
cpt_rewards/src/main/java/com/hongyegroup/cpt_rewards/ui/fragment/MyRewardsUsedFragment.kt

@@ -0,0 +1,53 @@
+package com.hongyegroup.cpt_rewards.ui.fragment
+
+import android.os.Bundle
+import android.view.View
+import com.guadou.lib_baselib.base.fragment.BaseVDBLazyLoadingFragment
+import com.guadou.lib_baselib.bean.DataBindingConfig
+import com.guadou.lib_baselib.ext.vertical
+import com.guadou.lib_baselib.utils.CommUtils
+import com.hongyegroup.cpt_rewards.R
+import com.hongyegroup.cpt_rewards.databinding.FragmentMyRewardsActiveBinding
+import com.hongyegroup.cpt_rewards.mvvm.MyRewardsExpiredViewModel
+import com.hongyegroup.cpt_rewards.mvvm.MyRewardsUsedViewModel
+
+class MyRewardsUsedFragment:BaseVDBLazyLoadingFragment<MyRewardsUsedViewModel,FragmentMyRewardsActiveBinding>() {
+
+    override fun getDataBindingConfig(): DataBindingConfig {
+
+        return DataBindingConfig(R.layout.fragment_my_rewards_active)
+
+    }
+
+    override fun startObserve() {
+
+    }
+
+    override fun init(savedInstanceState: Bundle?) {
+
+    }
+
+    override fun initViews(view: View) {
+        super.initViews(view)
+
+        for (index in 0..8){
+
+            mViewModel.mUsedRewardsData.add("")
+
+        }
+
+        mBinding.recyclerViewMyRewardsActive.vertical().adapter=mViewModel.mUsedAdapter
+        mViewModel.mUsedAdapter.notifyDataSetChanged()
+
+    }
+
+    override fun onLazyInitData() {
+
+        CommUtils.getHandler().postDelayed(Runnable {
+
+            showStateSuccess()
+
+        }, 200)
+
+    }
+}

BIN
cpt_rewards/src/main/res/drawable-xhdpi/iv_rewards_expired_icon.webp


BIN
cpt_rewards/src/main/res/drawable-xhdpi/iv_rewards_non_refundable.webp


BIN
cpt_rewards/src/main/res/drawable-xhdpi/iv_rewards_redeemed_at.webp


BIN
cpt_rewards/src/main/res/drawable-xhdpi/iv_rewards_used_icon.webp


BIN
cpt_rewards/src/main/res/drawable-xxhdpi/iv_rewards_expired_icon.webp


BIN
cpt_rewards/src/main/res/drawable-xxhdpi/iv_rewards_non_refundable.webp


BIN
cpt_rewards/src/main/res/drawable-xxhdpi/iv_rewards_redeemed_at.webp


BIN
cpt_rewards/src/main/res/drawable-xxhdpi/iv_rewards_used_icon.webp


+ 110 - 0
cpt_rewards/src/main/res/layout/activity_my_rewards.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout 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"
+    xmlns:binding="http://schemas.android.com/apk/res-auto"
+    tools:ignore="MissingDefaultResource">
+
+    <data>
+
+        <variable
+            name="click"
+            type="com.hongyegroup.cpt_rewards.ui.MyRewardsActivity.ClickProxy" />
+
+    </data>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/page_bg_f4"
+        android:orientation="vertical">
+
+        <com.guadou.lib_baselib.view.titlebar.EasyTitleBar
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            app:Easy_title="我的奖励" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/shape_rewards_white_bottom_15conner_bg"
+            android:orientation="horizontal"
+            android:paddingLeft="@dimen/d_15dp"
+            android:paddingTop="@dimen/d_8dp"
+            android:paddingRight="@dimen/d_15dp"
+            android:paddingBottom="@dimen/d_8dp">
+
+            <com.guadou.lib_baselib.font_text_view.TextViewLight
+                android:id="@+id/tv_tab_active"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:background="@drawable/shape_round_blue"
+                android:gravity="center"
+                android:paddingTop="@dimen/d_8dp"
+                android:paddingBottom="@dimen/d_8dp"
+                android:text="可用的"
+                android:onClick="@{()->click.changeViewPager(0)}"
+                android:textColor="@color/white"
+                android:textSize="@dimen/d_15sp" />
+
+            <com.guadou.lib_baselib.font_text_view.TextViewLight
+                android:id="@+id/tv_tab_refund"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d_9dp"
+                android:layout_weight="1"
+                android:background="@drawable/shape_round_white"
+                android:gravity="center"
+                android:paddingTop="@dimen/d_8dp"
+                android:paddingBottom="@dimen/d_8dp"
+                android:visibility="gone"
+                android:text="Refund"
+                android:textColor="@color/black"
+                android:textSize="@dimen/d_15sp" />
+
+            <com.guadou.lib_baselib.font_text_view.TextViewLight
+                android:id="@+id/tv_tab_expired"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d_9dp"
+                android:layout_weight="1"
+                android:background="@drawable/shape_round_white"
+                android:gravity="center"
+                android:paddingTop="@dimen/d_8dp"
+                android:paddingBottom="@dimen/d_8dp"
+                android:onClick="@{()->click.changeViewPager(1)}"
+                android:text="过期"
+                android:textColor="@color/black"
+                android:textSize="@dimen/d_15sp" />
+
+            <com.guadou.lib_baselib.font_text_view.TextViewLight
+                android:id="@+id/tv_tab_used"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d_9dp"
+                android:layout_weight="1"
+                android:background="@drawable/shape_round_white"
+                android:gravity="center"
+                android:paddingTop="@dimen/d_8dp"
+                android:paddingBottom="@dimen/d_8dp"
+                android:onClick="@{()->click.changeViewPager(2)}"
+                android:text="已使用"
+                android:textColor="@color/black"
+                android:textSize="@dimen/d_15sp" />
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="10dp"
+            android:background="@color/page_bg_f4" />
+
+        <androidx.viewpager.widget.ViewPager
+            android:id="@+id/view_pager_my_rewards"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+
+    </LinearLayout>
+
+</layout>

+ 1 - 0
cpt_rewards/src/main/res/layout/activity_rewards.xml

@@ -110,6 +110,7 @@
                 android:layout_marginTop="@dimen/d_10dp"
                 android:background="@drawable/shape_15round_white"
                 android:gravity="center_vertical"
+                binding:clicks="@{click.gotoMyRewardsActivity}"
                 android:paddingLeft="@dimen/d_15dp"
                 android:paddingTop="@dimen/d_5dp"
                 android:paddingRight="@dimen/d_15dp"

+ 9 - 0
cpt_rewards/src/main/res/layout/fragment_my_rewards_active.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <androidx.recyclerview.widget.RecyclerView
+        android:id="@+id/recycler_view_my_rewards_active"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+
+</layout>

+ 201 - 0
cpt_rewards/src/main/res/layout/item_rewards_active.xml

@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <data>
+        
+        <variable
+            name="item"
+            type="String" />
+        
+    </data>
+    
+    <LinearLayout
+        android:id="@+id/ll_item_rewards_active_root"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/shape_rewards_white_15conner_bg"
+            android:orientation="vertical"
+            android:paddingLeft="@dimen/d_15dp"
+            android:paddingRight="@dimen/d_15dp"
+            android:paddingBottom="@dimen/d_25dp">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d_20dp"
+                android:orientation="horizontal">
+
+                <ImageView
+                    android:id="@+id/iv_item_rewards_active_image"
+                    android:layout_width="87dp"
+                    android:layout_height="58dp"
+                    android:scaleType="centerCrop"
+                    android:background="@color/page_bg_f4" />
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical"
+                    android:paddingLeft="10dp">
+
+                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                        android:id="@+id/tv_item_rewards_active_title"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="-2dp"
+                        android:ellipsize="end"
+                        android:lines="2"
+                        android:text="Cute children multifunctional umbrella Cute children multifunctional umbrellaCute children multifunctional umbrella"
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/d_16sp" />
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/d_5dp"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal">
+
+                        <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                            android:id="@+id/tv_item_rewards_active_point"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="300"
+                            android:textColor="@color/profile_red"
+                            android:textSize="@dimen/d_17sp" />
+
+                        <com.guadou.lib_baselib.font_text_view.TextViewLight
+                            android:id="@+id/tv_item_rewards_active_original_point"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="@dimen/d_5dp"
+                            android:text="350"
+                            android:textColor="@color/item_light_gray"
+                            android:textSize="@dimen/d_14sp" />
+
+                        <com.guadou.lib_baselib.font_text_view.TextViewLight
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="@dimen/d_5dp"
+                            android:text="points"
+                            android:textColor="@color/item_light_gray"
+                            android:textSize="@dimen/d_15sp" />
+
+                    </LinearLayout>
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <!--Redeem from-->
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d_10dp"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <ImageView
+                    android:layout_width="@dimen/d_19dp"
+                    android:layout_height="@dimen/d_19dp"
+                    android:scaleType="centerCrop"
+                    android:src="@drawable/iv_promotion_rewards_redeem_from" />
+
+                <com.guadou.lib_baselib.font_text_view.TextViewLight
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d_8dp"
+                    android:text="兑换时间:"
+                    android:textColor="@color/item_light_gray"
+                    android:textSize="@dimen/d_14sp" />
+
+                <com.guadou.lib_baselib.font_text_view.TextViewLight
+                    android:id="@+id/tv_item_rewards_active_redeem_from"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d_8dp"
+                    android:text="17 Mar 2020 until 15 Jul 2020"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/d_14sp" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d_8dp"
+                android:orientation="horizontal"
+                android:visibility="gone">
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:src="@drawable/iv_rewards_non_refundable" />
+
+                <com.guadou.lib_baselib.font_text_view.TextViewRegular
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d_8dp"
+                    android:text="This Rewards is non-refundable."
+                    android:textColor="@color/profile_red"
+                    android:textSize="@dimen/d_14sp" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d_20dp"
+                android:orientation="horizontal"
+                android:visibility="gone">
+
+                <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                    android:layout_width="0dp"
+                    android:layout_height="@dimen/d_40dp"
+                    android:layout_weight="1"
+                    android:background="@drawable/shape_gray_bg_with_blue_border_line"
+                    android:gravity="center"
+                    android:text="Refund"
+                    android:textColor="@color/app_blue"
+                    android:textSize="@dimen/d_15sp" />
+
+                <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                    android:layout_width="0dp"
+                    android:layout_height="@dimen/d_40dp"
+                    android:layout_marginLeft="@dimen/d_30dp"
+                    android:layout_weight="1"
+                    android:background="@color/app_blue"
+                    android:gravity="center"
+                    android:text="兑换"
+                    android:textColor="@color/white"
+                    android:textSize="@dimen/d_15sp" />
+
+            </LinearLayout>
+
+            <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                android:id="@+id/tv_item_rewards_active_redeem_now"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/d_40dp"
+                android:layout_marginTop="@dimen/d_20dp"
+                android:background="@color/app_blue"
+                android:gravity="center"
+                android:text="兑换"
+                android:textColor="@color/white"
+                android:textSize="@dimen/d_15sp" />
+
+        </LinearLayout>
+
+
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/d_10dp"
+            android:src="@color/page_bg_f4" />
+
+    </LinearLayout>
+
+</layout>

+ 165 - 0
cpt_rewards/src/main/res/layout/item_rewards_expired.xml

@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <LinearLayout
+        android:id="@+id/ll_item_rewards_expired_root"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/shape_rewards_white_15conner_bg"
+            android:paddingLeft="@dimen/d_15dp"
+            android:paddingRight="@dimen/d_15dp"
+            android:paddingBottom="@dimen/d_20dp">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                android:paddingBottom="@dimen/d_5dp">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/d_20dp"
+                    android:orientation="horizontal">
+
+                    <ImageView
+                        android:id="@+id/iv_item_rewards_expired"
+                        android:layout_width="87dp"
+                        android:layout_height="58dp"
+                        android:background="@color/page_bg_f4"
+                        android:scaleType="centerCrop" />
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:orientation="vertical"
+                        android:paddingLeft="10dp">
+
+                        <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                            android:id="@+id/tv_item_rewards_expired_title"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="-2dp"
+                            android:ellipsize="end"
+                            android:lines="2"
+                            android:text="Cute children multifunctional umbrella Cute children multifunctional umbrellaCute children multifunctional umbrella"
+                            android:textColor="@color/black"
+                            android:textSize="@dimen/d_16sp" />
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="@dimen/d_5dp"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal">
+
+                            <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                                android:id="@+id/tv_item_rewards_expired_point"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="300"
+                                android:textColor="@color/profile_red"
+                                android:textSize="@dimen/d_17sp" />
+
+                            <com.guadou.lib_baselib.font_text_view.TextViewLight
+                                android:id="@+id/tv_item_rewards_expired_original_point"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginLeft="@dimen/d_5dp"
+                                android:text="350"
+                                android:textColor="@color/item_light_gray"
+                                android:textSize="@dimen/d_14sp" />
+
+                            <com.guadou.lib_baselib.font_text_view.TextViewLight
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginLeft="@dimen/d_5dp"
+                                android:text="积分"
+                                android:textColor="@color/item_light_gray"
+                                android:textSize="@dimen/d_15sp" />
+
+                        </LinearLayout>
+
+                    </LinearLayout>
+
+                </LinearLayout>
+
+                <!--Redeem from-->
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/d_10dp"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+                    <ImageView
+                        android:layout_width="@dimen/d_19dp"
+                        android:layout_height="@dimen/d_19dp"
+                        android:scaleType="centerCrop"
+                        android:src="@drawable/iv_promotion_rewards_redeem_from" />
+
+                    <com.guadou.lib_baselib.font_text_view.TextViewLight
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_8dp"
+                        android:text="兑换时间:"
+                        android:textColor="@color/item_light_gray"
+                        android:textSize="@dimen/d_14sp" />
+
+                    <com.guadou.lib_baselib.font_text_view.TextViewLight
+                        android:id="@+id/tv_item_rewards_expired_redeem_from"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_8dp"
+                        android:text="17 Mar 2020 until 15 Jul 2020"
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/d_14sp" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/d_8dp"
+                    android:orientation="horizontal"
+                    android:visibility="gone">
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:src="@drawable/iv_rewards_non_refundable" />
+
+                    <com.guadou.lib_baselib.font_text_view.TextViewRegular
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d_8dp"
+                        android:text="This Rewards is non-refundable."
+                        android:textColor="@color/profile_red"
+                        android:textSize="@dimen/d_14sp" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentBottom="true"
+                android:src="@drawable/iv_rewards_expired_icon" />
+
+        </RelativeLayout>
+
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/d_10dp"
+            android:src="@color/page_bg_f4" />
+
+    </LinearLayout>
+
+</layout>

+ 215 - 0
cpt_rewards/src/main/res/layout/item_rewards_used.xml

@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <LinearLayout
+        android:id="@+id/ll_item_rewards_used_root"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/shape_rewards_white_15conner_bg"
+            android:orientation="vertical"
+            android:paddingLeft="@dimen/d_15dp"
+            android:paddingRight="@dimen/d_15dp"
+            android:paddingBottom="@dimen/d_25dp">
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/d_20dp"
+                        android:orientation="horizontal">
+
+                        <ImageView
+                            android:id="@+id/iv_item_rewards_used"
+                            android:layout_width="87dp"
+                            android:layout_height="58dp"
+                            android:background="@color/page_bg_f4"
+                            android:scaleType="centerCrop" />
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:orientation="vertical"
+                            android:paddingLeft="10dp">
+
+                            <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                                android:id="@+id/tv_item_rewards_used_title"
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content"
+                                android:layout_marginTop="-2dp"
+                                android:ellipsize="end"
+                                android:lines="2"
+                                android:text="Cute children multifunctional umbrella Cute children multifunctional umbrellaCute children multifunctional umbrella"
+                                android:textColor="@color/black"
+                                android:textSize="@dimen/d_16sp" />
+
+                            <LinearLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content"
+                                android:layout_marginTop="@dimen/d_5dp"
+                                android:gravity="center_vertical"
+                                android:orientation="horizontal">
+
+                                <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                                    android:id="@+id/tv_item_rewards_used_point"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:text="300"
+                                    android:textColor="@color/profile_red"
+                                    android:textSize="@dimen/d_17sp" />
+
+                                <com.guadou.lib_baselib.font_text_view.TextViewLight
+                                    android:id="@+id/tv_item_rewards_used_original_point"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginLeft="@dimen/d_5dp"
+                                    android:text="350"
+                                    android:textColor="@color/item_light_gray"
+                                    android:textSize="@dimen/d_14sp" />
+
+                                <com.guadou.lib_baselib.font_text_view.TextViewLight
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginLeft="@dimen/d_5dp"
+                                    android:text="积分"
+                                    android:textColor="@color/item_light_gray"
+                                    android:textSize="@dimen/d_15sp" />
+
+                            </LinearLayout>
+
+                        </LinearLayout>
+
+                    </LinearLayout>
+
+                    <!--Redeem from-->
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/d_10dp"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal">
+
+                        <ImageView
+                            android:layout_width="@dimen/d_19dp"
+                            android:layout_height="@dimen/d_19dp"
+                            android:scaleType="centerCrop"
+                            android:src="@drawable/iv_promotion_rewards_redeem_from" />
+
+                        <com.guadou.lib_baselib.font_text_view.TextViewLight
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="@dimen/d_8dp"
+                            android:text="兑换时间:"
+                            android:textColor="@color/item_light_gray"
+                            android:textSize="@dimen/d_14sp" />
+
+                        <com.guadou.lib_baselib.font_text_view.TextViewLight
+                            android:id="@+id/tv_item_rewards_used_redeem_from"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="@dimen/d_8dp"
+                            android:text="17 Mar 2020 until 15 Jul 2020"
+                            android:textColor="@color/black"
+                            android:textSize="@dimen/d_14sp" />
+
+                    </LinearLayout>
+
+                    <!--Redeem at-->
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/d_10dp"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal">
+
+                        <ImageView
+                            android:layout_width="@dimen/d_19dp"
+                            android:layout_height="@dimen/d_19dp"
+                            android:scaleType="centerCrop"
+                            android:src="@drawable/iv_rewards_redeemed_at" />
+
+                        <com.guadou.lib_baselib.font_text_view.TextViewLight
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="@dimen/d_8dp"
+                            android:text="兑换时间:"
+                            android:textColor="@color/item_light_gray"
+                            android:textSize="@dimen/d_14sp" />
+
+                        <com.guadou.lib_baselib.font_text_view.TextViewLight
+                            android:id="@+id/tv_item_rewards_used_redeem_at"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="@dimen/d_8dp"
+                            android:text="2 July 2019, 17:23"
+                            android:textColor="@color/black"
+                            android:textSize="@dimen/d_14sp" />
+
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/d_8dp"
+                        android:orientation="horizontal"
+                        android:visibility="gone">
+
+                        <ImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:src="@drawable/iv_rewards_non_refundable" />
+
+                        <com.guadou.lib_baselib.font_text_view.TextViewRegular
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="@dimen/d_8dp"
+                            android:text="This Rewards is non-refundable."
+                            android:textColor="@color/profile_red"
+                            android:textSize="@dimen/d_14sp" />
+
+                    </LinearLayout>
+
+                </LinearLayout>
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_alignParentRight="true"
+                    android:layout_alignParentBottom="true"
+                    android:src="@drawable/iv_rewards_used_icon" />
+
+            </RelativeLayout>
+
+            <com.guadou.lib_baselib.font_text_view.TextViewMedium
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/d_40dp"
+                android:layout_marginTop="@dimen/d_20dp"
+                android:background="@color/app_blue"
+                android:gravity="center"
+                android:text="兑换"
+                android:textColor="@color/white"
+                android:textSize="@dimen/d_15sp"
+                android:visibility="gone" />
+
+        </LinearLayout>
+
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/d_10dp"
+            android:src="@color/page_bg_f4" />
+
+    </LinearLayout>
+
+</layout>

+ 31 - 0
cs_cptServices/src/main/java/com/guadou/cs_cptservices/adapter/ViewPagerFragmentAdapter.java

@@ -0,0 +1,31 @@
+package com.guadou.cs_cptservices.adapter;
+
+
+import java.util.List;
+
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentStatePagerAdapter;
+
+/**
+ * 首页Fragment-ViewPager的适配器
+ */
+public class ViewPagerFragmentAdapter extends FragmentStatePagerAdapter {
+
+    private List<Fragment> mFragments;
+
+    public ViewPagerFragmentAdapter(FragmentManager fragmentManager, List<Fragment> fragments) {
+        super(fragmentManager);
+        mFragments = fragments;
+    }
+
+    @Override
+    public Fragment getItem(int position) {
+        return mFragments.get(position);
+    }
+
+    @Override
+    public int getCount() {
+        return mFragments.size() == 0 ? 0 : mFragments.size();
+    }
+}

BIN
cs_cptServices/src/main/res/drawable-xhdpi/notification_white.webp


BIN
cs_cptServices/src/main/res/drawable-xxhdpi/notification_white.webp


+ 9 - 0
cs_cptServices/src/main/res/drawable/shape_gray_bg_with_blue_border_line.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <solid android:color="#FFF3F9FF" />
+    <stroke
+        android:width="@dimen/d_0.5dp"
+        android:color="@color/app_blue" />
+
+</shape>

+ 10 - 0
cs_cptServices/src/main/res/drawable/shape_round_blue.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:tools="http://schemas.android.com/tools"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    tools:ignore="MissingDefaultResource">
+
+    <solid android:color="@color/app_blue"/>
+
+    <corners android:radius="5dp"/>
+
+</shape>

+ 6 - 0
cs_cptServices/src/main/res/drawable/shape_round_white.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/white"/>
+    <stroke android:color="@color/gray" android:width="0.7dp"/>
+    <corners android:radius="5dp"/>
+</shape>