add authorize agreement fragment

This commit is contained in:
unknown
2020-03-26 11:39:49 +08:00
parent 3a57bf8439
commit d46a6633b9
13 changed files with 2241 additions and 9 deletions

2
.idea/misc.xml generated
View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -47,6 +47,7 @@ public class MogoApplication extends AbsMogoApplication {
crashSystem.setDebug(BuildConfig.DEBUG);
Logger.init(BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF);
MogoModulePaths.addModule(new MogoModule(PATH_GUIDE_AGREEMENT_FRAGMENT, PATH_GUIDE_AGREEMENT_MODULE_NAME));
//运营位卡片,需要默认显示,放在第一个加载
MogoModulePaths.addModule(new MogoModule(AdCardConstants.TAG, AdCardConstants.MODULE_NAME));
MogoModulePaths.addModule(new MogoModule(MediaConstants.TAG, MediaConstants.MODULE_TYPE));
@@ -58,7 +59,6 @@ public class MogoApplication extends AbsMogoApplication {
MogoModulePaths.addModule(new MogoModule(V2XConst.PATH_V2X_UI, V2XConst.PATH_V2X_UI));
MogoModulePaths.addModule(new MogoModule(PushUIConstants.TAG, PushUIConstants.TAG));
MogoModulePaths.addModule(new MogoModule(BackToLauncherConst.MODULE_PATH, BackToLauncherConst.MODULE_NAME));
MogoModulePaths.addModule(new MogoModule(PATH_GUIDE_AGREEMENT_FRAGMENT, PATH_GUIDE_AGREEMENT_MODULE_NAME));
Log.i("timer", "cost " + (System.currentTimeMillis() - start) + "ms");
}

View File

@@ -3,8 +3,9 @@ package com.mogo.module.authorize.fragment
import android.view.View
import com.mogo.commons.mvp.MvpFragment
import com.mogo.module.authorize.R
import kotlinx.android.synthetic.main.module_authorize_fragment.*
class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter>(), AuthorizeContract.View,View.OnClickListener {
class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter>(), AuthorizeContract.View, View.OnClickListener {
companion object {
const val TAG = "AuthorizeFragment"
@@ -15,7 +16,8 @@ class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter
}
override fun initViews() {
btnAuthorizeAgree.setOnClickListener(this)
btnAuthorizeDisAgree.setOnClickListener(this)
}
override fun createPresenter(): AuthorizePresenter {
@@ -23,6 +25,13 @@ class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter
}
override fun onClick(v: View) {
when (v.id) {
R.id.btnAuthorizeAgree -> {
}
R.id.btnAuthorizeDisAgree -> {
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:bottomLeftRadius="@dimen/dp_22" />
<gradient android:endColor="#805CC1FF" android:startColor="#803E7FFC" />
</shape>
</item>
<item>
<shape>
<corners android:bottomLeftRadius="@dimen/dp_22" />
<gradient android:endColor="#5CC1FF" android:startColor="#3E7FFC" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:bottomRightRadius="@dimen/dp_22" />
<gradient android:endColor="#803F4057" android:startColor="#8050526E" />
</shape>
</item>
<item>
<shape>
<corners android:bottomRightRadius="@dimen/dp_22" />
<gradient android:endColor="#3F4057" android:startColor="#50526E " />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:topLeftRadius="@dimen/dp_22" android:topRightRadius="@dimen/dp_22" />
<gradient
android:endColor="#2A2B38"
android:startColor="#3F4057" />
</shape>

View File

@@ -1,9 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<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:layout_height="match_parent"
android:background="#20ADEE">
android:background="#000000">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clAuthorizeContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_330"
android:layout_marginTop="@dimen/dp_90"
android:layout_marginRight="@dimen/dp_330"
android:layout_marginBottom="@dimen/dp_90"
android:background="@drawable/module_authorize_shape_drak_top_corner"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<Button
android:id="@+id/btnAuthorizeAgree"
android:layout_width="@dimen/dp_607"
android:layout_height="@dimen/dp_156"
android:background="@drawable/module_authorize_selector_blue_left_corner"
android:gravity="center"
android:text="@string/module_authorize_agreement_agree"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_55"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/btnAuthorizeDisAgree"
android:layout_width="@dimen/dp_607"
android:layout_height="@dimen/dp_156"
android:background="@drawable/module_authorize_selector_dark_right_corner"
android:gravity="center"
android:text="@string/module_authorize_agreement_disagree"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_55"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<ScrollView
android:layout_width="0px"
android:layout_height="0px"
android:layout_marginBottom="@dimen/dp_160"
android:fillViewport="true"
android:scrollbarSize="@dimen/dp_11"
android:scrollbarThumbVertical="@drawable/module_authorize_scrollbar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvAuthorizeTitle">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/tvAuthorizeContent"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:id="@+id/tvAuthorizeButtonContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tvAuthorizeLastContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
<TextView
android:id="@+id/tvAuthorizeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_62"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_55"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,5 @@
<resources>
<string name="app_name">mogo-module-authorize</string>
<string name="module_authorize_agreement_agree">同意</string>
<string name="module_authorize_agreement_disagree">不同意</string>
</resources>

View File

@@ -15,7 +15,7 @@ object GuideBizManager {
fun init() {
Logger.d("GuideBizManager", "init===================================")
initService()
addGuideFragmentToStack()
// addGuideFragmentToStack()
}
private fun initService() {

View File

@@ -3,7 +3,7 @@
<item android:state_pressed="true">
<shape>
<corners android:radius="@dimen/dp_53" />
<gradient android:endColor="#FF31A8AA" android:startColor="#FF0068CB" />
<gradient android:endColor="#805CC1FF" android:startColor="#803E7FFC" />
</shape>
</item>
<item>