add voice broadcast and add guideView
This commit is contained in:
@@ -27,7 +27,7 @@ class GuideAdapter(fragmentActivity: GuideFragment) : FragmentStateAdapter(fragm
|
||||
}
|
||||
|
||||
init {
|
||||
guideList.add(GUIDE_PAGE_START, GuideStartFragment())
|
||||
guideList.add(GUIDE_PAGE_START, GuideStartFragment(fragmentActivity))
|
||||
guideList.add(GUIDE_PAGE_CARD, GuideCardFragment(fragmentActivity))
|
||||
guideList.add(GUIDE_PAGE_ONLINE_CAR, GuideOnLineCarFragment(fragmentActivity))
|
||||
guideList.add(GUIDE_PAGE_NAVIGATION, GuideNavigationFragment(fragmentActivity))
|
||||
|
||||
@@ -1,13 +1,26 @@
|
||||
package com.mogo.module.guide.guide
|
||||
|
||||
import android.graphics.Color
|
||||
import android.graphics.LinearGradient
|
||||
import android.graphics.Shader
|
||||
import android.view.View
|
||||
import com.mogo.commons.mvp.IView
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
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 kotlinx.android.synthetic.main.module_guide_item_start.*
|
||||
|
||||
class GuideStartFragment : MvpFragment<IView, Presenter<IView>>() {
|
||||
|
||||
class GuideStartFragment : MvpFragment<IView, Presenter<IView>>, View.OnClickListener {
|
||||
|
||||
private var containerFragment: GuideFragment? = null
|
||||
|
||||
constructor(containerFragment: GuideFragment) {
|
||||
this.containerFragment = containerFragment
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.module_guide_item_start
|
||||
@@ -19,6 +32,17 @@ class GuideStartFragment : MvpFragment<IView, Presenter<IView>>() {
|
||||
|
||||
override fun initViews() {
|
||||
AnalyticsUtil.track(INVOKE_TRACK_SHOW, hashMapOf("pages_num" to 1))
|
||||
val mLinearGradient = LinearGradient(0f, 0f, 0f, moduleGuideTvStart.paint.textSize,
|
||||
Color.parseColor("#B3B3B3"), Color.parseColor("#EBEBEB"), Shader.TileMode.CLAMP)
|
||||
moduleGuideTvStart.paint.shader = mLinearGradient
|
||||
}
|
||||
|
||||
override fun onClick(v: View) {
|
||||
when (v.id) {
|
||||
R.id.moduleGuideTvStart, R.id.moduleGuidetIvStart -> {
|
||||
containerFragment?.moveToNext()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class GuideStartPresenter : Presenter<IView> {
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@mipmap/module_guide_item_start"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/module_guide_item_start">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/moduleGuidetIvStart"
|
||||
android:layout_width="@dimen/dp_77"
|
||||
android:layout_height="@dimen/dp_77"
|
||||
android:layout_marginBottom="@dimen/dp_75"
|
||||
android:src="@mipmap/module_guide_item_start_scroll"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/moduleGuideTvStart"
|
||||
app:layout_constraintTop_toTopOf="@+id/moduleGuideTvStart" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/moduleGuideTvStart"
|
||||
android:layout_width="@dimen/dp_307"
|
||||
android:layout_height="@dimen/dp_73"
|
||||
android:layout_marginRight="@dimen/dp_154"
|
||||
android:layout_marginBottom="@dimen/dp_75"
|
||||
android:gravity="center"
|
||||
android:text="@string/module_guide_main"
|
||||
android:textSize="@dimen/dp_51"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 927 B |
@@ -1,5 +1,6 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-module-guide-agreement</string>
|
||||
<string name="module_guide_main">左滑了解更多</string>
|
||||
<string name="module_guide_item_entry_main">进入首页</string>
|
||||
<string name="module_guide_item_next_step">下一步</string>
|
||||
<string name="module_guide_skip">跳过教程</string>
|
||||
|
||||
Reference in New Issue
Block a user