Переглянути джерело

Merge branch 'master' of http://git.wmzhubo.com/guadoutech/PartTimeJob_CN_Android

Administrator 2 роки тому
батько
коміт
2344b9a1b0
24 змінених файлів з 192 додано та 101 видалено
  1. 2 1
      cpt_main/src/main/java/com/hongyegroup/cpt_main/ui/HomeFragment.kt
  2. 6 4
      cpt_newsfeed/src/main/AndroidManifest.xml
  3. 10 2
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/router/NewsFeedComponentServiceImpl.kt
  4. 1 1
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedDetailActivity.kt
  5. 1 1
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedFollowsActivity.kt
  6. 39 0
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/activity/NewsFeedMainActivity.kt
  7. 4 6
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedPostActivity.kt
  8. 2 1
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedProfileActivity.kt
  9. 1 1
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedFansFragment.kt
  10. 1 1
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedFollowFragment.kt
  11. 3 1
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedListFragment.kt
  12. 41 37
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedMainFragment.kt
  13. 1 1
      cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedProfileFragment.kt
  14. 1 1
      cpt_newsfeed/src/main/res/layout/activity_newsfeed_detail.xml
  15. 1 1
      cpt_newsfeed/src/main/res/layout/activity_newsfeed_follows.xml
  16. 9 0
      cpt_newsfeed/src/main/res/layout/activity_newsfeed_main.xml
  17. 1 1
      cpt_newsfeed/src/main/res/layout/activity_newsfeed_post.xml
  18. 1 1
      cpt_newsfeed/src/main/res/layout/fragment_newsfeed_fans.xml
  19. 1 1
      cpt_newsfeed/src/main/res/layout/fragment_newsfeed_follow.xml
  20. 63 38
      cpt_newsfeed/src/main/res/layout/fragment_newsfeed_main.xml
  21. 1 1
      cpt_newsfeed/src/main/res/layout/fragment_newsfeed_profile.xml
  22. BIN
      cs_cptServices/src/main/res/drawable-xhdpi/title_blue_search_icon.webp
  23. BIN
      cs_cptServices/src/main/res/drawable-xxhdpi/title_blue_search_icon.webp
  24. 2 0
      cs_router/src/main/java/com/guadou/cs_router/newsfeed/INewsFeedComponentServer.kt

+ 2 - 1
cpt_main/src/main/java/com/hongyegroup/cpt_main/ui/HomeFragment.kt

@@ -143,7 +143,8 @@ class HomeFragment : YYBaseVDBLoadingFragment<HomeViewModel, FragmentHomeBinding
 
 
         //去奖励模块
         //去奖励模块
         fun gotoRewardsPage() {
         fun gotoRewardsPage() {
-            YYRouterService.rewardsComponentServer?.startRewardsDailyPage()
+//            YYRouterService.rewardsComponentServer?.startRewardsDailyPage()
+            YYRouterService.newsfeedComponentServer?.startNewsFeedHomePage()
         }
         }
 
 
         //去兼职页面
         //去兼职页面

+ 6 - 4
cpt_newsfeed/src/main/AndroidManifest.xml

@@ -4,13 +4,15 @@
 
 
     <application android:allowBackup="true">
     <application android:allowBackup="true">
 
 
-        <activity android:name=".ui.NewsFeedDetailActivity" />
+        <activity android:name=".ui.activity.NewsFeedDetailActivity" />
 
 
-        <activity android:name=".ui.NewsFeedPostActivity" />
+        <activity android:name=".ui.activity.NewsFeedPostActivity" />
 
 
-        <activity android:name=".ui.NewsFeedFollowsActivity" />
+        <activity android:name=".ui.activity.NewsFeedFollowsActivity" />
 
 
-        <activity android:name=".ui.NewsFeedProfileActivity" />
+        <activity android:name=".ui.activity.NewsFeedProfileActivity" />
+
+        <activity android:name=".ui.activity.NewsFeedMainActivity"/>
 
 
     </application>
     </application>
 
 

+ 10 - 2
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/router/NewsFeedComponentServiceImpl.kt

@@ -5,12 +5,20 @@ import androidx.fragment.app.Fragment
 import com.alibaba.android.arouter.facade.annotation.Route
 import com.alibaba.android.arouter.facade.annotation.Route
 import com.guadou.cs_router.ARouterPath
 import com.guadou.cs_router.ARouterPath
 import com.guadou.cs_router.newsfeed.INewsFeedComponentServer
 import com.guadou.cs_router.newsfeed.INewsFeedComponentServer
-import com.hongyegroup.cpt_newsfeed.ui.NewsFeedMainFragment
+import com.hongyegroup.cpt_newsfeed.ui.activity.NewsFeedMainActivity
+import com.hongyegroup.cpt_newsfeed.ui.activity.NewsFeedPostActivity
+import com.hongyegroup.cpt_newsfeed.ui.fragment.NewsFeedMainFragment
 
 
 @Route(path = ARouterPath.PATH_SERVICE_NEWSFEED, name = "NewsFeed模块路由服务")
 @Route(path = ARouterPath.PATH_SERVICE_NEWSFEED, name = "NewsFeed模块路由服务")
 class NewsFeedComponentServiceImpl : INewsFeedComponentServer {
 class NewsFeedComponentServiceImpl : INewsFeedComponentServer {
 
 
+    //去NewsFeed的首页
+    override fun startNewsFeedHomePage() {
+        NewsFeedMainActivity.startInstance()
+    }
+
     override fun startNewsFeedPostPage() {
     override fun startNewsFeedPostPage() {
+        NewsFeedPostActivity.startInstance()
     }
     }
 
 
     override fun obtainNewsFeedMainFragment(): Fragment {
     override fun obtainNewsFeedMainFragment(): Fragment {
@@ -18,7 +26,7 @@ class NewsFeedComponentServiceImpl : INewsFeedComponentServer {
     }
     }
 
 
     override fun init(context: Context?) {
     override fun init(context: Context?) {
-    }
 
 
+    }
 
 
 }
 }

+ 1 - 1
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedDetailActivity.kt

@@ -1,4 +1,4 @@
-package com.hongyegroup.cpt_newsfeed.ui
+package com.hongyegroup.cpt_newsfeed.ui.activity
 
 
 import android.content.Intent
 import android.content.Intent
 import android.os.Bundle
 import android.os.Bundle

+ 1 - 1
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedFollowsActivity.kt

@@ -1,4 +1,4 @@
-package com.hongyegroup.cpt_newsfeed.ui
+package com.hongyegroup.cpt_newsfeed.ui.activity
 
 
 import android.content.Intent
 import android.content.Intent
 import android.os.Bundle
 import android.os.Bundle

+ 39 - 0
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/activity/NewsFeedMainActivity.kt

@@ -0,0 +1,39 @@
+package com.hongyegroup.cpt_newsfeed.ui.activity
+
+import android.os.Bundle
+import com.guadou.cs_cptservices.base.activity.YYBaseVMActivity
+import com.guadou.lib_baselib.base.vm.EmptyViewModel
+import com.guadou.lib_baselib.ext.commContext
+import com.guadou.lib_baselib.ext.gotoActivity
+import com.guadou.lib_baselib.utils.StatusBarUtils
+import com.hongyegroup.cpt_newsfeed.R
+import com.hongyegroup.cpt_newsfeed.ui.fragment.NewsFeedMainFragment
+
+/**
+ * 朋友圈主页 实际上为空容器
+ * 内部加载Fragment实现
+ */
+class NewsFeedMainActivity : YYBaseVMActivity<EmptyViewModel>() {
+
+    companion object {
+        fun startInstance() {
+            commContext().gotoActivity<NewsFeedMainActivity>()
+        }
+    }
+
+    override fun getLayoutIdRes(): Int = R.layout.activity_newsfeed_main
+
+    override fun startObserve() {
+    }
+
+    override fun init(savedInstanceState: Bundle?) {
+
+        StatusBarUtils.immersive(this)
+
+        supportFragmentManager.beginTransaction()
+            .add(R.id.fragment_container, NewsFeedMainFragment())
+            .commitAllowingStateLoss()
+    }
+
+
+}

+ 4 - 6
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedPostActivity.kt

@@ -1,10 +1,11 @@
-package com.hongyegroup.cpt_newsfeed.ui
+package com.hongyegroup.cpt_newsfeed.ui.activity
 
 
 import android.content.Intent
 import android.content.Intent
 import android.os.Bundle
 import android.os.Bundle
 import com.guadou.cs_cptservices.base.activity.YYBaseVDBActivity
 import com.guadou.cs_cptservices.base.activity.YYBaseVDBActivity
 import com.guadou.lib_baselib.bean.DataBindingConfig
 import com.guadou.lib_baselib.bean.DataBindingConfig
-import com.guadou.lib_baselib.utils.CommUtils
+import com.guadou.lib_baselib.ext.commContext
+import com.guadou.lib_baselib.ext.gotoActivity
 import com.guadou.lib_baselib.utils.KeyboardUtils
 import com.guadou.lib_baselib.utils.KeyboardUtils
 import com.hongyegroup.cpt_newsfeed.BR
 import com.hongyegroup.cpt_newsfeed.BR
 import com.hongyegroup.cpt_newsfeed.R
 import com.hongyegroup.cpt_newsfeed.R
@@ -20,10 +21,7 @@ class NewsFeedPostActivity : YYBaseVDBActivity<NewsFeedPostViewModel, ActivityNe
 
 
     companion object {
     companion object {
         fun startInstance() {
         fun startInstance() {
-            val context = CommUtils.getContext()
+            commContext().gotoActivity<NewsFeedPostActivity>()
-            val intent = Intent(context, NewsFeedPostActivity::class.java)
-            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
-            context.startActivity(intent)
         }
         }
     }
     }
 
 

+ 2 - 1
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedProfileActivity.kt

@@ -1,4 +1,4 @@
-package com.hongyegroup.cpt_newsfeed.ui
+package com.hongyegroup.cpt_newsfeed.ui.activity
 
 
 import android.content.Intent
 import android.content.Intent
 import android.os.Bundle
 import android.os.Bundle
@@ -6,6 +6,7 @@ import com.guadou.lib_baselib.base.activity.BaseVMActivity
 import com.guadou.lib_baselib.base.vm.EmptyViewModel
 import com.guadou.lib_baselib.base.vm.EmptyViewModel
 import com.guadou.lib_baselib.utils.CommUtils
 import com.guadou.lib_baselib.utils.CommUtils
 import com.hongyegroup.cpt_newsfeed.R
 import com.hongyegroup.cpt_newsfeed.R
+import com.hongyegroup.cpt_newsfeed.ui.fragment.NewsFeedProfileFragment
 
 
 /**
 /**
  * 个人的主页 实际上为空容器
  * 个人的主页 实际上为空容器

+ 1 - 1
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedFansFragment.kt

@@ -1,4 +1,4 @@
-package com.hongyegroup.cpt_newsfeed.ui
+package com.hongyegroup.cpt_newsfeed.ui.fragment
 
 
 import android.os.Bundle
 import android.os.Bundle
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBLazyLoadingFragment
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBLazyLoadingFragment

+ 1 - 1
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedFollowFragment.kt

@@ -1,4 +1,4 @@
-package com.hongyegroup.cpt_newsfeed.ui
+package com.hongyegroup.cpt_newsfeed.ui.fragment
 
 
 import android.os.Bundle
 import android.os.Bundle
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBLazyLoadingFragment
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBLazyLoadingFragment

+ 3 - 1
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedListFragment.kt

@@ -1,4 +1,4 @@
-package com.hongyegroup.cpt_newsfeed.ui
+package com.hongyegroup.cpt_newsfeed.ui.fragment
 
 
 import android.os.Bundle
 import android.os.Bundle
 import android.view.View
 import android.view.View
@@ -19,6 +19,8 @@ import com.scwang.smart.refresh.layout.listener.OnRefreshListener
 
 
 /**
 /**
  * 多类型的动态列表页面
  * 多类型的动态列表页面
+ *
+ *@param type 0 是朋友圈  1是已关注
  */
  */
 class NewsFeedListFragment(private val type: Int) : YYBaseVDBLazyLoadingFragment<NewsFeedFollowingViewModel, FragmentNewsfeedFollowingBinding>(),
 class NewsFeedListFragment(private val type: Int) : YYBaseVDBLazyLoadingFragment<NewsFeedFollowingViewModel, FragmentNewsfeedFollowingBinding>(),
     IFragmentRefresh, OnRefreshListener, OnLoadMoreListener {
     IFragmentRefresh, OnRefreshListener, OnLoadMoreListener {

+ 41 - 37
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedMainFragment.kt

@@ -1,12 +1,10 @@
-package com.hongyegroup.cpt_newsfeed.ui
+package com.hongyegroup.cpt_newsfeed.ui.fragment
 
 
-import android.content.Intent
 import android.os.Bundle
 import android.os.Bundle
 import android.view.View
 import android.view.View
-import androidx.viewpager.widget.ViewPager
+import androidx.viewpager2.widget.ViewPager2
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBFragment
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBFragment
 import com.guadou.cs_cptservices.interfaces.IFragmentRefresh
 import com.guadou.cs_cptservices.interfaces.IFragmentRefresh
-import com.guadou.lib_baselib.base.Ghost
 import com.guadou.lib_baselib.bean.DataBindingConfig
 import com.guadou.lib_baselib.bean.DataBindingConfig
 import com.guadou.lib_baselib.engine.toast
 import com.guadou.lib_baselib.engine.toast
 import com.guadou.lib_baselib.ext.bindFragment
 import com.guadou.lib_baselib.ext.bindFragment
@@ -15,6 +13,7 @@ import com.hongyegroup.cpt_newsfeed.BR
 import com.hongyegroup.cpt_newsfeed.R
 import com.hongyegroup.cpt_newsfeed.R
 import com.hongyegroup.cpt_newsfeed.databinding.FragmentNewsfeedMainBinding
 import com.hongyegroup.cpt_newsfeed.databinding.FragmentNewsfeedMainBinding
 import com.hongyegroup.cpt_newsfeed.mvvm.NewsFeedMainViewModel
 import com.hongyegroup.cpt_newsfeed.mvvm.NewsFeedMainViewModel
+import com.hongyegroup.cpt_newsfeed.ui.activity.NewsFeedPostActivity
 
 
 /**
 /**
  * 首页动态广场的页面
  * 首页动态广场的页面
@@ -23,8 +22,8 @@ import com.hongyegroup.cpt_newsfeed.mvvm.NewsFeedMainViewModel
 class NewsFeedMainFragment : YYBaseVDBFragment<NewsFeedMainViewModel, FragmentNewsfeedMainBinding>(), IFragmentRefresh {
 class NewsFeedMainFragment : YYBaseVDBFragment<NewsFeedMainViewModel, FragmentNewsfeedMainBinding>(), IFragmentRefresh {
 
 
     private var mCurPage = 1
     private var mCurPage = 1
-    private lateinit var mNewsFeedMonentsFragment: NewsFeedListFragment
     private lateinit var mNewsFeedFollowingFragment: NewsFeedListFragment
     private lateinit var mNewsFeedFollowingFragment: NewsFeedListFragment
+    private lateinit var mNewsFeedMonentsFragment: NewsFeedListFragment
     private lateinit var mNewsFeedProfileFragment: NewsFeedProfileFragment
     private lateinit var mNewsFeedProfileFragment: NewsFeedProfileFragment
 
 
     override fun getDataBindingConfig(): DataBindingConfig {
     override fun getDataBindingConfig(): DataBindingConfig {
@@ -42,19 +41,17 @@ class NewsFeedMainFragment : YYBaseVDBFragment<NewsFeedMainViewModel, FragmentNe
     }
     }
 
 
     private fun initAdapter() {
     private fun initAdapter() {
-        mNewsFeedMonentsFragment = NewsFeedListFragment(0)
         mNewsFeedFollowingFragment = NewsFeedListFragment(1)
         mNewsFeedFollowingFragment = NewsFeedListFragment(1)
+        mNewsFeedMonentsFragment = NewsFeedListFragment(0)
         mNewsFeedProfileFragment = NewsFeedProfileFragment("8558", true)
         mNewsFeedProfileFragment = NewsFeedProfileFragment("8558", true)
 
 
         mViewModel.mFragments.add(mNewsFeedMonentsFragment)
         mViewModel.mFragments.add(mNewsFeedMonentsFragment)
         mViewModel.mFragments.add(mNewsFeedFollowingFragment)
         mViewModel.mFragments.add(mNewsFeedFollowingFragment)
         mViewModel.mFragments.add(mNewsFeedProfileFragment)
         mViewModel.mFragments.add(mNewsFeedProfileFragment)
 
 
-        mBinding.viewPager.bindFragment(childFragmentManager, mViewModel.mFragments)
+        mBinding.viewPager.bindFragment(childFragmentManager, this.lifecycle, mViewModel.mFragments)
 
 
-        mBinding.viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
+        mBinding.viewPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
-            override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
-            override fun onPageScrollStateChanged(state: Int) {}
             override fun onPageSelected(position: Int) {
             override fun onPageSelected(position: Int) {
                 mCurPage = position
                 mCurPage = position
                 setIndicator(position)
                 setIndicator(position)
@@ -75,28 +72,28 @@ class NewsFeedMainFragment : YYBaseVDBFragment<NewsFeedMainViewModel, FragmentNe
         mCurPage = position
         mCurPage = position
         when (position) {
         when (position) {
             0 -> {
             0 -> {
-                mBinding.textMoments.setTextColor(CommUtils.getColor(R.color.app_blue))
+                mBinding.textFlowing.setTextColor(CommUtils.getColor(R.color.app_blue))
-                mBinding.viewFollowLine.visibility = View.VISIBLE
+                mBinding.viewFollowingLine.visibility = View.VISIBLE
-                mBinding.textFollowing.setTextColor(CommUtils.getColor(R.color.gray_88))
+                mBinding.textMoments.setTextColor(CommUtils.getColor(R.color.gray_88))
-                mBinding.viewForYouLine.visibility = View.GONE
+                mBinding.viewMonentLine.visibility = View.GONE
-                mBinding.textPulished.setTextColor(CommUtils.getColor(R.color.gray_88))
+                mBinding.textProfile.setTextColor(CommUtils.getColor(R.color.gray_88))
-                mBinding.viewPublished.visibility = View.GONE
+                mBinding.viewProfile.visibility = View.GONE
             }
             }
             1 -> {
             1 -> {
-                mBinding.textMoments.setTextColor(CommUtils.getColor(R.color.gray_88))
+                mBinding.textFlowing.setTextColor(CommUtils.getColor(R.color.gray_88))
-                mBinding.viewFollowLine.visibility = View.GONE
+                mBinding.viewFollowingLine.visibility = View.GONE
-                mBinding.textFollowing.setTextColor(CommUtils.getColor(R.color.app_blue))
+                mBinding.textMoments.setTextColor(CommUtils.getColor(R.color.app_blue))
-                mBinding.viewForYouLine.visibility = View.VISIBLE
+                mBinding.viewMonentLine.visibility = View.VISIBLE
-                mBinding.textPulished.setTextColor(CommUtils.getColor(R.color.gray_88))
+                mBinding.textProfile.setTextColor(CommUtils.getColor(R.color.gray_88))
-                mBinding.viewPublished.visibility = View.GONE
+                mBinding.viewProfile.visibility = View.GONE
             }
             }
             else -> {
             else -> {
+                mBinding.textFlowing.setTextColor(CommUtils.getColor(R.color.gray_88))
+                mBinding.viewFollowingLine.visibility = View.GONE
                 mBinding.textMoments.setTextColor(CommUtils.getColor(R.color.gray_88))
                 mBinding.textMoments.setTextColor(CommUtils.getColor(R.color.gray_88))
-                mBinding.viewFollowLine.visibility = View.GONE
+                mBinding.viewMonentLine.visibility = View.GONE
-                mBinding.textFollowing.setTextColor(CommUtils.getColor(R.color.gray_88))
+                mBinding.textProfile.setTextColor(CommUtils.getColor(R.color.app_blue))
-                mBinding.viewForYouLine.visibility = View.GONE
+                mBinding.viewProfile.visibility = View.VISIBLE
-                mBinding.textPulished.setTextColor(CommUtils.getColor(R.color.app_blue))
-                mBinding.viewPublished.visibility = View.VISIBLE
             }
             }
         }
         }
     }
     }
@@ -114,19 +111,29 @@ class NewsFeedMainFragment : YYBaseVDBFragment<NewsFeedMainViewModel, FragmentNe
      */
      */
     inner class ClickProxy {
     inner class ClickProxy {
 
 
-        //切换到朋友圈
+        //返回页面
-        fun switchMoments() {
+        fun pageBack() {
+            mActivity.finish()
+        }
+
+        //去搜索页面
+        fun gotoSearchPage() {
+          toast("去搜索页面")
+        }
+
+        //切换已关注的
+        fun switchFollowing() {
             if (mCurPage == 0) {
             if (mCurPage == 0) {
-                mNewsFeedMonentsFragment.scrollTopRefresh()
+                mNewsFeedFollowingFragment.scrollTopRefresh()
             } else {
             } else {
                 setCurrentPage(0)
                 setCurrentPage(0)
             }
             }
         }
         }
 
 
-        //切换已关注的
+        //切换到朋友圈
-        fun switchFollowing() {
+        fun switchMoments() {
             if (mCurPage == 1) {
             if (mCurPage == 1) {
-                mNewsFeedFollowingFragment.scrollTopRefresh()
+                mNewsFeedMonentsFragment.scrollTopRefresh()
             } else {
             } else {
                 setCurrentPage(1)
                 setCurrentPage(1)
             }
             }
@@ -143,10 +150,7 @@ class NewsFeedMainFragment : YYBaseVDBFragment<NewsFeedMainViewModel, FragmentNe
 
 
         //去发布页面
         //去发布页面
         fun gotoPostPage() {
         fun gotoPostPage() {
-            Ghost.launchActivityForResult(mActivity, Intent(mActivity, NewsFeedPostActivity::class.java)) {
+            NewsFeedPostActivity.startInstance()
-                val name = it?.getStringExtra("name")
-                toast("获取回调 name:" + name)
-            }
         }
         }
 
 
     }
     }

+ 1 - 1
cpt_newsfeed/src/main/java/com/hongyegroup/cpt_newsfeed/ui/NewsFeedProfileFragment.kt

@@ -1,4 +1,4 @@
-package com.hongyegroup.cpt_newsfeed.ui
+package com.hongyegroup.cpt_newsfeed.ui.fragment
 
 
 import android.os.Bundle
 import android.os.Bundle
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBLazyLoadingFragment
 import com.guadou.cs_cptservices.base.fragment.YYBaseVDBLazyLoadingFragment

+ 1 - 1
cpt_newsfeed/src/main/res/layout/activity_newsfeed_detail.xml

@@ -13,7 +13,7 @@
 
 
         <variable
         <variable
             name="click"
             name="click"
-            type="com.hongyegroup.cpt_newsfeed.ui.NewsFeedDetailActivity.ClickProxy" />
+            type="com.hongyegroup.cpt_newsfeed.ui.activity.NewsFeedDetailActivity.ClickProxy" />
 
 
     </data>
     </data>
 
 

+ 1 - 1
cpt_newsfeed/src/main/res/layout/activity_newsfeed_follows.xml

@@ -13,7 +13,7 @@
 
 
         <variable
         <variable
             name="click"
             name="click"
-            type="com.hongyegroup.cpt_newsfeed.ui.NewsFeedFollowsActivity.ClickProxy" />
+            type="com.hongyegroup.cpt_newsfeed.ui.activity.NewsFeedFollowsActivity.ClickProxy" />
 
 
     </data>
     </data>
 
 

+ 9 - 0
cpt_newsfeed/src/main/res/layout/activity_newsfeed_main.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/fragment_container"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:viewBindingIgnore="true">
+
+</FrameLayout>

+ 1 - 1
cpt_newsfeed/src/main/res/layout/activity_newsfeed_post.xml

@@ -13,7 +13,7 @@
 
 
         <variable
         <variable
             name="click"
             name="click"
-            type="com.hongyegroup.cpt_newsfeed.ui.NewsFeedPostActivity.ClickProxy" />
+            type="com.hongyegroup.cpt_newsfeed.ui.activity.NewsFeedPostActivity.ClickProxy" />
 
 
     </data>
     </data>
 
 

+ 1 - 1
cpt_newsfeed/src/main/res/layout/fragment_newsfeed_fans.xml

@@ -13,7 +13,7 @@
 
 
         <variable
         <variable
             name="click"
             name="click"
-            type="com.hongyegroup.cpt_newsfeed.ui.NewsFeedFansFragment.ClickProxy" />
+            type="com.hongyegroup.cpt_newsfeed.ui.fragment.NewsFeedFansFragment.ClickProxy" />
 
 
         <import type="android.text.TextUtils" />
         <import type="android.text.TextUtils" />
 
 

+ 1 - 1
cpt_newsfeed/src/main/res/layout/fragment_newsfeed_follow.xml

@@ -13,7 +13,7 @@
 
 
         <variable
         <variable
             name="click"
             name="click"
-            type="com.hongyegroup.cpt_newsfeed.ui.NewsFeedFollowFragment.ClickProxy" />
+            type="com.hongyegroup.cpt_newsfeed.ui.fragment.NewsFeedFollowFragment.ClickProxy" />
 
 
         <import type="android.text.TextUtils" />
         <import type="android.text.TextUtils" />
 
 

+ 63 - 38
cpt_newsfeed/src/main/res/layout/fragment_newsfeed_main.xml

@@ -13,7 +13,7 @@
 
 
         <variable
         <variable
             name="click"
             name="click"
-            type="com.hongyegroup.cpt_newsfeed.ui.NewsFeedMainFragment.ClickProxy" />
+            type="com.hongyegroup.cpt_newsfeed.ui.fragment.NewsFeedMainFragment.ClickProxy" />
 
 
     </data>
     </data>
 
 
@@ -31,91 +31,116 @@
         <androidx.constraintlayout.widget.ConstraintLayout
         <androidx.constraintlayout.widget.ConstraintLayout
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="@dimen/d_46dp"
             android:layout_height="@dimen/d_46dp"
-            android:paddingLeft="@dimen/d_40dp"
+            android:paddingLeft="@dimen/d_15dp"
-            android:paddingRight="@dimen/d_40dp">
+            android:paddingRight="@dimen/d_15dp">
+
+            <ImageView
+                android:id="@+id/iv_title_back"
+                style="@style/SelectableItemBackgroundLess"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d_3dp"
+                android:layout_marginTop="@dimen/d_12dp"
+                android:src="@mipmap/iv_blue_back"
+                android:theme="@style/RippleWhite"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                binding:clicks="@{click.pageBack}" />
+
+            <ImageButton
+                android:id="@+id/iv_title_search"
+                style="@style/SelectableItemBackgroundLess"
+                android:layout_width="@dimen/d_20dp"
+                android:layout_height="@dimen/d_20dp"
+                android:src="@drawable/title_blue_search_icon"
+                android:theme="@style/RippleWhite"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                binding:clicks="@{click.gotoSearchPage}" />
 
 
             <com.guadou.lib_baselib.font_text_view.TextViewBold
             <com.guadou.lib_baselib.font_text_view.TextViewBold
-                android:id="@+id/text_moments"
+                android:id="@+id/text_flowing"
                 android:layout_width="wrap_content"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
                 android:onClick="@{()->click.switchMoments()}"
                 android:onClick="@{()->click.switchMoments()}"
-                android:text="朋友圈"
+                android:text="已关注"
                 android:textColor="@color/gray_88"
                 android:textColor="@color/gray_88"
                 android:textSize="@dimen/d_16sp"
                 android:textSize="@dimen/d_16sp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintLeft_toRightOf="@id/iv_title_back"
-                app:layout_constraintRight_toLeftOf="@id/text_following"
+                app:layout_constraintRight_toLeftOf="@id/text_moments"
                 app:layout_constraintTop_toTopOf="parent" />
                 app:layout_constraintTop_toTopOf="parent" />
 
 
             <View
             <View
-                android:id="@+id/view_follow_line"
+                android:id="@+id/view_following_line"
                 android:layout_width="0dp"
                 android:layout_width="0dp"
                 android:layout_height="2.5dp"
                 android:layout_height="2.5dp"
                 android:background="@drawable/shape_blue_round3"
                 android:background="@drawable/shape_blue_round3"
                 android:visibility="gone"
                 android:visibility="gone"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="@id/text_moments"
+                app:layout_constraintLeft_toLeftOf="@id/text_flowing"
-                app:layout_constraintRight_toRightOf="@id/text_moments" />
+                app:layout_constraintRight_toRightOf="@id/text_flowing" />
 
 
             <com.guadou.lib_baselib.font_text_view.TextViewBold
             <com.guadou.lib_baselib.font_text_view.TextViewBold
-                android:id="@+id/text_following"
+                android:id="@+id/text_moments"
                 android:layout_width="wrap_content"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
                 android:onClick="@{()->click.switchFollowing()}"
                 android:onClick="@{()->click.switchFollowing()}"
-                android:text="已关注"
+                android:text="朋友圈"
                 android:textColor="@color/app_blue"
                 android:textColor="@color/app_blue"
                 android:textSize="@dimen/d_16sp"
                 android:textSize="@dimen/d_16sp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toRightOf="@id/text_moments"
+                app:layout_constraintLeft_toRightOf="@id/text_flowing"
-                app:layout_constraintRight_toLeftOf="@id/text_pulished"
+                app:layout_constraintRight_toLeftOf="@id/text_profile"
                 app:layout_constraintTop_toTopOf="parent" />
                 app:layout_constraintTop_toTopOf="parent" />
 
 
-            <!--  已关注的数量    -->
+            <!--            &lt;!&ndash;  已关注的数量    &ndash;&gt;-->
-            <com.guadou.lib_baselib.font_text_view.TextViewBold
+            <!--            <com.guadou.lib_baselib.font_text_view.TextViewBold-->
-                android:layout_width="18dp"
+            <!--                android:layout_width="18dp"-->
-                android:layout_height="11.5dp"
+            <!--                android:layout_height="11.5dp"-->
-                android:background="@drawable/unread_red_bg"
+            <!--                android:background="@drawable/unread_red_bg"-->
-                android:gravity="center"
+            <!--                android:gravity="center"-->
-                android:text="9"
+            <!--                android:text="9"-->
-                android:textColor="@color/white"
+            <!--                android:textColor="@color/white"-->
-                android:textSize="@dimen/d_9sp"
+            <!--                android:textSize="@dimen/d_9sp"-->
-                app:layout_constraintBottom_toTopOf="@id/text_following"
+            <!--                app:layout_constraintBottom_toTopOf="@id/text_following"-->
-                app:layout_constraintLeft_toRightOf="@id/text_following"
+            <!--                app:layout_constraintLeft_toRightOf="@id/text_following"-->
-                app:layout_constraintRight_toRightOf="@id/text_following"
+            <!--                app:layout_constraintRight_toRightOf="@id/text_following"-->
-                app:layout_constraintTop_toTopOf="@id/text_following" />
+            <!--                app:layout_constraintTop_toTopOf="@id/text_following" />-->
 
 
             <View
             <View
-                android:id="@+id/view_for_you_line"
+                android:id="@+id/view_monent_line"
                 android:layout_width="0dp"
                 android:layout_width="0dp"
                 android:layout_height="2.5dp"
                 android:layout_height="2.5dp"
                 android:background="@drawable/shape_blue_round3"
                 android:background="@drawable/shape_blue_round3"
                 android:visibility="visible"
                 android:visibility="visible"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="@id/text_following"
+                app:layout_constraintLeft_toLeftOf="@id/text_moments"
-                app:layout_constraintRight_toRightOf="@id/text_following" />
+                app:layout_constraintRight_toRightOf="@id/text_moments" />
 
 
             <com.guadou.lib_baselib.font_text_view.TextViewBold
             <com.guadou.lib_baselib.font_text_view.TextViewBold
-                android:id="@+id/text_pulished"
+                android:id="@+id/text_profile"
                 android:layout_width="wrap_content"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
                 android:onClick="@{()->click.switchPulished()}"
                 android:onClick="@{()->click.switchPulished()}"
-                android:text="我的发布"
+                android:text="个人信息"
                 android:textColor="@color/gray_88"
                 android:textColor="@color/gray_88"
                 android:textSize="@dimen/d_16sp"
                 android:textSize="@dimen/d_16sp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toRightOf="@id/text_following"
+                app:layout_constraintLeft_toRightOf="@id/text_moments"
-                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintRight_toLeftOf="@id/iv_title_search"
                 app:layout_constraintTop_toTopOf="parent" />
                 app:layout_constraintTop_toTopOf="parent" />
 
 
             <View
             <View
-                android:id="@+id/view_published"
+                android:id="@+id/view_profile"
                 android:layout_width="0dp"
                 android:layout_width="0dp"
                 android:layout_height="2.5dp"
                 android:layout_height="2.5dp"
                 android:background="@drawable/shape_blue_round3"
                 android:background="@drawable/shape_blue_round3"
                 android:visibility="gone"
                 android:visibility="gone"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="@id/text_pulished"
+                app:layout_constraintLeft_toLeftOf="@id/text_profile"
-                app:layout_constraintRight_toRightOf="@id/text_pulished" />
+                app:layout_constraintRight_toRightOf="@id/text_profile" />
 
 
         </androidx.constraintlayout.widget.ConstraintLayout>
         </androidx.constraintlayout.widget.ConstraintLayout>
 
 
@@ -172,7 +197,7 @@
 
 
             </com.google.android.material.appbar.AppBarLayout>
             </com.google.android.material.appbar.AppBarLayout>
 
 
-            <androidx.viewpager.widget.ViewPager
+            <androidx.viewpager2.widget.ViewPager2
                 android:id="@+id/view_pager"
                 android:id="@+id/view_pager"
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_height="match_parent"

+ 1 - 1
cpt_newsfeed/src/main/res/layout/fragment_newsfeed_profile.xml

@@ -13,7 +13,7 @@
 
 
         <variable
         <variable
             name="click"
             name="click"
-            type="com.hongyegroup.cpt_newsfeed.ui.NewsFeedProfileFragment.ClickProxy" />
+            type="com.hongyegroup.cpt_newsfeed.ui.fragment.NewsFeedProfileFragment.ClickProxy" />
 
 
         <import type="android.text.TextUtils" />
         <import type="android.text.TextUtils" />
 
 

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


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


+ 2 - 0
cs_router/src/main/java/com/guadou/cs_router/newsfeed/INewsFeedComponentServer.kt

@@ -5,6 +5,8 @@ import com.alibaba.android.arouter.facade.template.IProvider
 
 
 interface INewsFeedComponentServer : IProvider {
 interface INewsFeedComponentServer : IProvider {
 
 
+    fun startNewsFeedHomePage()
+
     fun startNewsFeedPostPage()
     fun startNewsFeedPostPage()
 
 
     fun obtainNewsFeedMainFragment(): Fragment
     fun obtainNewsFeedMainFragment(): Fragment