|
|
@@ -2,6 +2,7 @@ package cn.muchinfo.rma.view.base.home.xhcp
|
|
|
|
|
|
import android.annotation.SuppressLint
|
|
|
import android.content.Intent
|
|
|
+import android.graphics.Color
|
|
|
import android.graphics.Rect
|
|
|
import android.net.Uri
|
|
|
import android.os.Bundle
|
|
|
@@ -99,10 +100,10 @@ class XhcpHomeFragment : BaseFragment<XhcpHomeViewModel>(){
|
|
|
|
|
|
fun initMessageMenuData() {
|
|
|
|
|
|
- tabsArray.add("通知公告")
|
|
|
- uiMessageList.add(xhcpAnnouncementUI.root)
|
|
|
tabsArray.add("新闻资讯")
|
|
|
uiMessageList.add(informationUI.root)
|
|
|
+ tabsArray.add("通知公告")
|
|
|
+ uiMessageList.add(xhcpAnnouncementUI.root)
|
|
|
|
|
|
pagerAdapter = object : PagerAdapter() {
|
|
|
|
|
|
@@ -174,9 +175,10 @@ class XhcpHomeFragment : BaseFragment<XhcpHomeViewModel>(){
|
|
|
GlobalScope.launch(Dispatchers.Main) {
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
viewModel.queryNotice()
|
|
|
+
|
|
|
verticalLayout {
|
|
|
+ // 标题栏
|
|
|
linearLayout {
|
|
|
background = resources.getDrawable(R.color.main_title_bg_color)
|
|
|
verticalLayout {
|
|
|
@@ -223,6 +225,7 @@ class XhcpHomeFragment : BaseFragment<XhcpHomeViewModel>(){
|
|
|
})
|
|
|
verticalLayout {
|
|
|
background = resources.getDrawable(R.color.white)
|
|
|
+ // banner
|
|
|
inflateLayout<BGABanner>(R.layout.banner) {
|
|
|
// TODO 目前没有banner
|
|
|
viewModel.bannerList.bindOptional(context) {
|
|
|
@@ -304,7 +307,7 @@ class XhcpHomeFragment : BaseFragment<XhcpHomeViewModel>(){
|
|
|
background = resources.getDrawable(R.color.white)
|
|
|
viewPager = this
|
|
|
adapter = pagerAdapter
|
|
|
- }.lparams(matchParent, matchParent)
|
|
|
+ }.lparams(matchParent, autoSize(1000))
|
|
|
|
|
|
segment.setupWithViewPager(viewPager)
|
|
|
segment.selectTab(selectedTabIndex)
|
|
|
@@ -330,6 +333,8 @@ class XhcpInformationUI(private val baseFragment: Fragment, private val viewModu
|
|
|
val root = _FrameLayout(baseFragment.context!!).apply {
|
|
|
verticalLayout {
|
|
|
viewModule.querySiteColumnDetail()
|
|
|
+
|
|
|
+ backgroundColor = Color.WHITE
|
|
|
statusLayout(contentBlock = {
|
|
|
statusLayout = this
|
|
|
// bindTaskStatus(viewModule.status)
|