Merge branch 'dev' into demo/shunyi_v2v_merge
This commit is contained in:
@@ -2,11 +2,14 @@ package com.mogo.module.guide.fragment
|
||||
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack
|
||||
import com.mogo.module.guide.GuideBizManager
|
||||
import com.mogo.module.guide.R
|
||||
import com.mogo.module.guide.util.AnalyticsUtil
|
||||
import com.mogo.module.guide.util.AnalyticsUtil.INVOKE_TRACK_PASS_TIME
|
||||
import com.mogo.module.guide.util.AnalyticsUtil.INVOKE_TRACK_PLAY_PASS_ID
|
||||
import com.mogo.module.guide.util.AnalyticsUtil.INVOKE_TRACK_PLAY_TIME
|
||||
import com.mogo.module.guide.util.speak
|
||||
import com.mogo.utils.logger.Logger
|
||||
import com.zhpan.indicator.enums.IndicatorSlideMode
|
||||
@@ -14,13 +17,14 @@ import com.zhpan.indicator.enums.IndicatorStyle
|
||||
import kotlinx.android.synthetic.main.module_guide_fragment.*
|
||||
import kotlinx.android.synthetic.main.module_guide_item_include.*
|
||||
|
||||
|
||||
class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideConstract.View {
|
||||
|
||||
companion object {
|
||||
const val TAG = "GuideFragment"
|
||||
}
|
||||
|
||||
private var duringTime: Long = 0L
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.module_guide_fragment
|
||||
}
|
||||
@@ -33,10 +37,11 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
|
||||
|
||||
override fun initViews() {
|
||||
Logger.d(TAG, "init Views")
|
||||
duringTime = System.currentTimeMillis()
|
||||
adapter = GuideAdapter(this)
|
||||
moduleGuideViewPager.adapter = adapter
|
||||
(moduleGuideViewPager.getChildAt(0) as RecyclerView).layoutManager!!.isItemPrefetchEnabled = false
|
||||
moduleGuideIndicator.setSliderColor(context!!.resources.getColor(R.color.module_guide_indicator_dark),context!!.resources.getColor(R.color.module_guide_indicator_white))
|
||||
moduleGuideIndicator.setSliderColor(context!!.resources.getColor(R.color.module_guide_indicator_dark), context!!.resources.getColor(R.color.module_guide_indicator_white))
|
||||
.setSliderWidth(context!!.resources.getDimension(R.dimen.dp_22))
|
||||
.setSlideMode(IndicatorSlideMode.NORMAL)
|
||||
.setIndicatorStyle(IndicatorStyle.CIRCLE)
|
||||
@@ -53,19 +58,19 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
|
||||
}
|
||||
}
|
||||
|
||||
fun visibleLeft(){
|
||||
fun visibleLeft() {
|
||||
module_guide_page_left.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
fun invisibleLeft(){
|
||||
fun invisibleLeft() {
|
||||
module_guide_page_left.visibility = View.GONE
|
||||
}
|
||||
|
||||
fun visibleRight(){
|
||||
fun visibleRight() {
|
||||
module_guide_page_right.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
fun invisibleRight(){
|
||||
fun invisibleRight() {
|
||||
module_guide_page_right.visibility = View.GONE
|
||||
}
|
||||
|
||||
@@ -85,12 +90,17 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
|
||||
}
|
||||
|
||||
fun closeGuideFragment() {
|
||||
Logger.d(TAG, "closeGuideFragment")
|
||||
val recordTime = System.currentTimeMillis() - duringTime
|
||||
val currentItem = moduleGuideViewPager.currentItem + 1
|
||||
AnalyticsUtil.track(INVOKE_TRACK_PLAY_PASS_ID,
|
||||
hashMapOf(INVOKE_TRACK_PASS_TIME to currentItem
|
||||
, INVOKE_TRACK_PLAY_TIME to recordTime))
|
||||
Logger.d(TAG, "closeGuideFragment -> recordTime : $recordTime , currentItem : $currentItem")
|
||||
destroy()
|
||||
}
|
||||
|
||||
private fun destroy() {
|
||||
speak(context!!,context!!.resources.getString(R.string.module_guide_voice_page_end),object : IMogoVoiceCmdCallBack {
|
||||
speak(context!!, context!!.resources.getString(R.string.module_guide_voice_page_end), object : IMogoVoiceCmdCallBack {
|
||||
override fun onTTSEnd(ttsId: String?, tts: String?) {
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack
|
||||
import com.mogo.module.guide.R
|
||||
import com.mogo.module.guide.fragment.GuideFragment
|
||||
import com.mogo.module.guide.util.AnalyticsUtil
|
||||
import com.mogo.module.guide.util.AnalyticsUtil.INVOKE_TRACK_SHOW
|
||||
import com.mogo.module.guide.util.speak
|
||||
|
||||
|
||||
@@ -28,7 +26,6 @@ class GuideStageOneFragment : MvpFragment<IView, Presenter<IView>> {
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
AnalyticsUtil.track(INVOKE_TRACK_SHOW, hashMapOf("pages_num" to 1))
|
||||
containerFragment?.visibleRight()
|
||||
}
|
||||
|
||||
@@ -37,7 +34,7 @@ class GuideStageOneFragment : MvpFragment<IView, Presenter<IView>> {
|
||||
containerFragment?.invisibleLeft()
|
||||
speak(context!!, context!!.resources.getString(R.string.module_guide_voice_page_one), object : IMogoVoiceCmdCallBack {
|
||||
override fun onSpeakEnd(speakText: String?) {
|
||||
if(!isVisible){
|
||||
if (!isVisible) {
|
||||
return
|
||||
}
|
||||
containerFragment?.moveToNext()
|
||||
|
||||
@@ -7,8 +7,9 @@ import com.mogo.service.analytics.IMogoAnalytics
|
||||
|
||||
object AnalyticsUtil {
|
||||
|
||||
const val INVOKE_TRACK_SHOW = "newhand_show"
|
||||
const val INVOKE_TRACK_CLICK = "newhand_click"
|
||||
const val INVOKE_TRACK_PLAY_PASS_ID = "v2x_play_pass"
|
||||
const val INVOKE_TRACK_PASS_TIME = "pass_time"
|
||||
const val INVOKE_TRACK_PLAY_TIME = "play_time"
|
||||
|
||||
private var trackRouter: IMogoAnalytics? = null
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 54 KiB |
@@ -2,7 +2,6 @@ package com.mogo.module.share.bean
|
||||
|
||||
import com.mogo.commons.data.BaseData
|
||||
import com.mogo.module.share.R
|
||||
import com.mogo.service.tanlu.IMogoTanluProvider
|
||||
import com.mogo.service.tanlu.IMogoTanluProvider.*
|
||||
|
||||
/**
|
||||
|
||||
BIN
modules/mogo-module-v2x/src/main/res/drawable-mdpi/v2x_panel_close.png
Executable file
BIN
modules/mogo-module-v2x/src/main/res/drawable-mdpi/v2x_panel_close.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 434 B |
@@ -31,7 +31,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:gravity="left"
|
||||
android:paddingRight="@dimen/dp_24"
|
||||
android:paddingLeft="@dimen/dp_24"
|
||||
android:text="100"
|
||||
@@ -79,8 +79,8 @@
|
||||
android:layout_toLeftOf="@id/road_case_uselful"
|
||||
android:ellipsize="end"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:lines="1"
|
||||
android:paddingTop="2px"
|
||||
android:text="东城区北三环附近维多欧美"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<item >
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="135" android:endColor="#FFFFFF" android:startColor="#F5F5F5" android:type="linear" android:useLevel="true" />
|
||||
<corners android:radius="@dimen/dp_20" />
|
||||
<corners android:radius="@dimen/dp_10" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -3,7 +3,7 @@
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="90" android:endColor="#FFF" android:startColor="#FFF" android:type="linear" android:useLevel="true" />
|
||||
<corners android:bottomLeftRadius="@dimen/dp_11" android:bottomRightRadius="0dp" android:topLeftRadius="0dp" android:topRightRadius="0dp" />
|
||||
<corners android:bottomLeftRadius="@dimen/dp_10" android:bottomRightRadius="0dp" android:topLeftRadius="0dp" android:topRightRadius="0dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
Reference in New Issue
Block a user