|
|
@@ -0,0 +1,238 @@
|
|
|
+package cn.muchinfo.rma.view.base.main.reward
|
|
|
+
|
|
|
+import android.os.Bundle
|
|
|
+import android.view.Gravity
|
|
|
+import cn.muchinfo.rma.R
|
|
|
+import cn.muchinfo.rma.view.autoWidget.*
|
|
|
+import cn.muchinfo.rma.view.base.BaseActivity
|
|
|
+import org.jetbrains.anko.*
|
|
|
+
|
|
|
+/**
|
|
|
+ * #DAEDFF 线颜色
|
|
|
+ * 奖励规则页面
|
|
|
+ */
|
|
|
+class RewardRuleActivity : BaseActivity<MyRewardViewModel>(){
|
|
|
+
|
|
|
+ override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
+ super.onCreate(savedInstanceState)
|
|
|
+ verticalLayout {
|
|
|
+ background = resources.getDrawable(R.color.white)
|
|
|
+ //页面标题
|
|
|
+ topBar {
|
|
|
+ commonLeftButton()
|
|
|
+ commonTitle {
|
|
|
+ text = "奖励规则"
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_bg_color)
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(96))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "推广类型"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(96),2f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(96))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "奖励类型"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(96),3f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(96))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "一级奖励"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(96),2f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(96))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "二级奖励"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(96),2f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(96))
|
|
|
+
|
|
|
+ }.lparams(matchParent, autoSize(96)){
|
|
|
+ marginStart = autoSize(13)
|
|
|
+ marginEnd = autoSize(13)
|
|
|
+ topMargin = autoSize(18)
|
|
|
+ }
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(matchParent, autoSize(1)){
|
|
|
+ marginStart = autoSize(13)
|
|
|
+ marginEnd = autoSize(13)
|
|
|
+ }
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ background = resources.getDrawable(R.color.white)
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "注册"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(120),2f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "固定金额(元)"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(120),3f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "5.00"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(120),2f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "--"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(120),2f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+ }.lparams(matchParent, autoSize(120)){
|
|
|
+ marginStart = autoSize(13)
|
|
|
+ marginEnd = autoSize(13)
|
|
|
+ }
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(matchParent, autoSize(1)){
|
|
|
+ marginStart = autoSize(13)
|
|
|
+ marginEnd = autoSize(13)
|
|
|
+ }
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ background = resources.getDrawable(R.color.white)
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "消费"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(120),2f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "固定金额比例(%)"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(120),3f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "0.5"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(120),2f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+
|
|
|
+ linearLayout {
|
|
|
+ gravity = Gravity.CENTER
|
|
|
+ textView {
|
|
|
+ text = "0.3"
|
|
|
+ textSizeAuto = 31
|
|
|
+ textColorInt = R.color.rma_blue_color
|
|
|
+ }.lparams(wrapContent, wrapContent)
|
|
|
+ }.lparams(0, autoSize(120),2f)
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(autoSize(1), autoSize(120))
|
|
|
+ }.lparams(matchParent, autoSize(120)){
|
|
|
+ marginStart = autoSize(13)
|
|
|
+ marginEnd = autoSize(13)
|
|
|
+ }
|
|
|
+
|
|
|
+ view {
|
|
|
+ background = resources.getDrawable(R.color.qhj_rule_line_color)
|
|
|
+ }.lparams(matchParent, autoSize(1)){
|
|
|
+ marginStart = autoSize(13)
|
|
|
+ marginEnd = autoSize(13)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|