|
@@ -8,8 +8,6 @@ import android.view.ViewGroup
|
|
|
import android.widget.ImageView
|
|
import android.widget.ImageView
|
|
|
import android.widget.ProgressBar
|
|
import android.widget.ProgressBar
|
|
|
import android.widget.RelativeLayout
|
|
import android.widget.RelativeLayout
|
|
|
-import com.google.android.material.tabs.TabLayout
|
|
|
|
|
-
|
|
|
|
|
import android.widget.TextView
|
|
import android.widget.TextView
|
|
|
import androidx.appcompat.app.AppCompatActivity
|
|
import androidx.appcompat.app.AppCompatActivity
|
|
|
import androidx.lifecycle.MutableLiveData
|
|
import androidx.lifecycle.MutableLiveData
|
|
@@ -21,7 +19,6 @@ import cn.muchinfo.rma.global.GlobalDataCollection
|
|
|
import cn.muchinfo.rma.global.data.ContractData
|
|
import cn.muchinfo.rma.global.data.ContractData
|
|
|
import cn.muchinfo.rma.global.data.WrTradeOrderDetailData
|
|
import cn.muchinfo.rma.global.data.WrTradeOrderDetailData
|
|
|
import cn.muchinfo.rma.global.data.chart.HistoryTikData
|
|
import cn.muchinfo.rma.global.data.chart.HistoryTikData
|
|
|
-import cn.muchinfo.rma.global.isBlankString
|
|
|
|
|
import cn.muchinfo.rma.global.isZeroBlankString
|
|
import cn.muchinfo.rma.global.isZeroBlankString
|
|
|
import cn.muchinfo.rma.global.toPercentage
|
|
import cn.muchinfo.rma.global.toPercentage
|
|
|
import cn.muchinfo.rma.lifecycle.bindOptional
|
|
import cn.muchinfo.rma.lifecycle.bindOptional
|
|
@@ -37,7 +34,11 @@ import cn.muchinfo.rma.view.base.future.trade.GoodsTradeActivity
|
|
|
import cn.muchinfo.rma.view.base.yrdzpurchase.dealdetails.YrdzDealDetailsActivity
|
|
import cn.muchinfo.rma.view.base.yrdzpurchase.dealdetails.YrdzDealDetailsActivity
|
|
|
import cn.muchinfo.rma.view.base.yrdzpurchase.listed.PurchaseListedActivity
|
|
import cn.muchinfo.rma.view.base.yrdzpurchase.listed.PurchaseListedActivity
|
|
|
import cn.muchinfo.rma.view.eventbus.QuoteMessageEvent
|
|
import cn.muchinfo.rma.view.eventbus.QuoteMessageEvent
|
|
|
-import com.blankj.utilcode.util.*
|
|
|
|
|
|
|
+import com.blankj.utilcode.util.ActivityUtils
|
|
|
|
|
+import com.blankj.utilcode.util.ConvertUtils
|
|
|
|
|
+import com.blankj.utilcode.util.SPUtils
|
|
|
|
|
+import com.blankj.utilcode.util.TimeUtils
|
|
|
|
|
+import com.google.android.material.tabs.TabLayout
|
|
|
import com.qmuiteam.qmui.util.QMUIDisplayHelper
|
|
import com.qmuiteam.qmui.util.QMUIDisplayHelper
|
|
|
import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
|
|
import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
|
|
|
import com.qmuiteam.qmui.widget.tab.QMUITabSegment
|
|
import com.qmuiteam.qmui.widget.tab.QMUITabSegment
|
|
@@ -45,7 +46,10 @@ import mtp.polymer.com.autowidget.adapter.BaseAdapter
|
|
|
import org.greenrobot.eventbus.EventBus
|
|
import org.greenrobot.eventbus.EventBus
|
|
|
import org.greenrobot.eventbus.Subscribe
|
|
import org.greenrobot.eventbus.Subscribe
|
|
|
import org.greenrobot.eventbus.ThreadMode
|
|
import org.greenrobot.eventbus.ThreadMode
|
|
|
-import org.jetbrains.anko.*
|
|
|
|
|
|
|
+import org.jetbrains.anko._FrameLayout
|
|
|
|
|
+import org.jetbrains.anko.matchParent
|
|
|
|
|
+import org.jetbrains.anko.textColor
|
|
|
|
|
+import org.jetbrains.anko.verticalLayout
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 图表相关
|
|
* 图表相关
|
|
@@ -328,6 +332,8 @@ class YrdzChartActivity : BaseActivity<YrdzChartViewModel>() , View.OnClickListe
|
|
|
tabLayout.addTab(tabLayout.newTab().setText("1 分").setTag(1))
|
|
tabLayout.addTab(tabLayout.newTab().setText("1 分").setTag(1))
|
|
|
tabLayout.addTab(tabLayout.newTab().setText("5 分").setTag(2))
|
|
tabLayout.addTab(tabLayout.newTab().setText("5 分").setTag(2))
|
|
|
tabLayout.addTab(tabLayout.newTab().setText("30 分").setTag(3))
|
|
tabLayout.addTab(tabLayout.newTab().setText("30 分").setTag(3))
|
|
|
|
|
+ tabLayout.addTab(tabLayout.newTab().setText("1 时").setTag(4))
|
|
|
|
|
+ tabLayout.addTab(tabLayout.newTab().setText("4 时").setTag(240))
|
|
|
|
|
|
|
|
tabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener{
|
|
tabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener{
|
|
|
override fun onTabReselected(tab: TabLayout.Tab?) {
|
|
override fun onTabReselected(tab: TabLayout.Tab?) {
|
|
@@ -346,7 +352,7 @@ class YrdzChartActivity : BaseActivity<YrdzChartViewModel>() , View.OnClickListe
|
|
|
viewModel.queryTimeChart()
|
|
viewModel.queryTimeChart()
|
|
|
progressBar.visibility = View.VISIBLE
|
|
progressBar.visibility = View.VISIBLE
|
|
|
}
|
|
}
|
|
|
- 1,2,3,11,12,13,14 -> {
|
|
|
|
|
|
|
+ 1,2,3,11,12,13,14,4,240 -> {
|
|
|
kChartView.visibility = View.VISIBLE
|
|
kChartView.visibility = View.VISIBLE
|
|
|
timeChartView.visibility = View.INVISIBLE
|
|
timeChartView.visibility = View.INVISIBLE
|
|
|
viewModel.queryKChart( tab.tag.toString())
|
|
viewModel.queryKChart( tab.tag.toString())
|
|
@@ -396,7 +402,6 @@ class YrdzChartActivity : BaseActivity<YrdzChartViewModel>() , View.OnClickListe
|
|
|
timeChartView.refreshDate(ChartDataAdapter().getHisTikData(viewModel.outGoodsCode))
|
|
timeChartView.refreshDate(ChartDataAdapter().getHisTikData(viewModel.outGoodsCode))
|
|
|
// 这里更新最新价
|
|
// 这里更新最新价
|
|
|
viewModel.refreshTimePrice(timeChartView)
|
|
viewModel.refreshTimePrice(timeChartView)
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|