Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
613fa609
Commit
613fa609
authored
Jun 09, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 商户管理中心升级认证、修改认证弹窗
parent
4ccfb715
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
192 additions
and
0 deletions
+192
-0
MerchantCenterBottomHintDialog.kt
...n/newscontent/ui/dialog/MerchantCenterBottomHintDialog.kt
+86
-0
shape_bg_bottom_hint.xml
...ewscontent/src/main/res/drawable/shape_bg_bottom_hint.xml
+13
-0
shape_bg_bottom_warn.xml
...ewscontent/src/main/res/drawable/shape_bg_bottom_warn.xml
+13
-0
shape_bg_common_btn.xml
...newscontent/src/main/res/drawable/shape_bg_common_btn.xml
+13
-0
shape_bg_modify_auth_btn.xml
...ontent/src/main/res/drawable/shape_bg_modify_auth_btn.xml
+11
-0
dialog_merchant_center_bottom_hint.xml
...rc/main/res/layout/dialog_merchant_center_bottom_hint.xml
+39
-0
colors.xml
Components/newscontent/src/main/res/values/colors.xml
+4
-0
strings.xml
Components/newscontent/src/main/res/values/strings.xml
+6
-0
styles.xml
Components/newscontent/src/main/res/values/styles.xml
+7
-0
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/dialog/MerchantCenterBottomHintDialog.kt
0 → 100644
View file @
613fa609
package
com.yidian.shenghuoquan.newscontent.ui.dialog
import
android.content.Context
import
android.view.Gravity
import
android.view.View
import
android.view.WindowManager
import
com.yidian.common.base.BaseDialog
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.DialogMerchantCenterBottomHintBinding
import
com.yidian.utils.DensityUtil
/**
* author: yinjiacheng
* date: 6/9/21 8:56 PM
* description: 底部提示弹窗
*/
class
MerchantCenterBottomHintDialog
(
context
:
Context
,
val
type
:
Int
)
:
BaseDialog
<
DialogMerchantCenterBottomHintBinding
>(
context
,
R
.
style
.
merchant_center_bottom_hint_dialog
),
View
.
OnClickListener
{
companion
object
{
// 认证升级
const
val
TYPE_AUTH_UPGRADE
=
1
// 认证驳回
const
val
TYPE_AUTH_REJECT
=
2
}
override
fun
createViewBinding
():
DialogMerchantCenterBottomHintBinding
{
return
DialogMerchantCenterBottomHintBinding
.
inflate
(
layoutInflater
)
}
override
fun
initView
()
{
when
(
type
)
{
TYPE_AUTH_UPGRADE
->
{
viewBinding
.
root
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_bottom_hint
)
viewBinding
.
tvContent
.
text
=
context
.
resources
.
getString
(
R
.
string
.
upgrade_auth
)
viewBinding
.
tvSubContent
.
text
=
context
.
resources
.
getString
(
R
.
string
.
auth_merchant_description
)
viewBinding
.
tvNext
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_common_btn
)
viewBinding
.
tvNext
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_FFFFFFFF
))
viewBinding
.
tvNext
.
text
=
context
.
resources
.
getString
(
R
.
string
.
immediate_upgrade
)
}
TYPE_AUTH_REJECT
->
{
viewBinding
.
root
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_bottom_warn
)
viewBinding
.
tvContent
.
text
=
context
.
resources
.
getString
(
R
.
string
.
auth_apply_reject
)
viewBinding
.
tvSubContent
.
text
=
context
.
resources
.
getString
(
R
.
string
.
apply_auth_merchant_description
)
viewBinding
.
tvNext
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_modify_auth_btn
)
viewBinding
.
tvNext
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_FFFF3A3A
))
viewBinding
.
tvNext
.
text
=
context
.
resources
.
getString
(
R
.
string
.
modify_auth
)
}
}
}
override
fun
initListener
()
{
viewBinding
.
tvNext
.
setOnClickListener
(
this
)
}
override
fun
show
()
{
super
.
show
()
window
?.
setGravity
(
Gravity
.
BOTTOM
)
val
params
=
window
?.
attributes
params
?.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
params
?.
height
=
DensityUtil
.
dp2px
(
84f
)
window
?.
attributes
=
params
}
override
fun
onClick
(
v
:
View
?)
{
if
(
v
?.
id
==
R
.
id
.
tv_next
)
{
when
(
type
)
{
TYPE_AUTH_UPGRADE
->
{
// TODO: 6/9/21 开始企业认证
}
TYPE_AUTH_REJECT
->
{
// TODO: 6/9/21 修改企业认证
}
}
}
}
}
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_bottom_hint.xml
0 → 100644
View file @
613fa609
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_FFFFFFFF"
/>
<corners
android:bottomLeftRadius=
"0dp"
android:bottomRightRadius=
"0dp"
android:topLeftRadius=
"12dp"
android:topRightRadius=
"12dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_bottom_warn.xml
0 → 100644
View file @
613fa609
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_FFFFEEEE"
/>
<corners
android:bottomLeftRadius=
"0dp"
android:bottomRightRadius=
"0dp"
android:topLeftRadius=
"12dp"
android:topRightRadius=
"12dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_common_btn.xml
0 → 100644
View file @
613fa609
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:angle=
"0"
android:endColor=
"@color/color_FF3693FF"
android:startColor=
"@color/color_FF1751F1"
android:type=
"linear"
/>
<corners
android:radius=
"21dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_modify_auth_btn.xml
0 → 100644
View file @
613fa609
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<stroke
android:width=
"1dp"
android:color=
"@color/color_FFFF3A3A"
/>
<corners
android:radius=
"21dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/layout/dialog_merchant_center_bottom_hint.xml
0 → 100644
View file @
613fa609
<?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:layout_height=
"wrap_content"
android:paddingStart=
"19dp"
android:paddingTop=
"10dp"
android:paddingEnd=
"19dp"
>
<TextView
android:id=
"@+id/tv_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:textColor=
"@color/color_333333"
android:textSize=
"15sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_sub_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:textColor=
"@color/color_999999"
android:textSize=
"12sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_content"
/>
<TextView
android:id=
"@+id/tv_next"
android:layout_width=
"69dp"
android:layout_height=
"27dp"
android:gravity=
"center"
android:textSize=
"12sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Components/newscontent/src/main/res/values/colors.xml
View file @
613fa609
...
@@ -48,4 +48,8 @@
...
@@ -48,4 +48,8 @@
<color
name=
"color_FF1852F1"
>
#FF1852F1
</color>
<color
name=
"color_FF1852F1"
>
#FF1852F1
</color>
<color
name=
"color_FFFFFFFF"
>
#FFFFFFFF
</color>
<color
name=
"color_FFFFFFFF"
>
#FFFFFFFF
</color>
<color
name=
"color_FFF26E3D"
>
#FFF26E3D
</color>
<color
name=
"color_FFF26E3D"
>
#FFF26E3D
</color>
<color
name=
"color_FFFFEEEE"
>
#FFFFEEEE
</color>
<color
name=
"color_FFFF3A3A"
>
#FFFF3A3A
</color>
<color
name=
"color_FF3693FF"
>
#FF3693FF
</color>
<color
name=
"color_FF1751F1"
>
#FF1751F1
</color>
</resources>
</resources>
\ No newline at end of file
Components/newscontent/src/main/res/values/strings.xml
View file @
613fa609
...
@@ -137,6 +137,12 @@
...
@@ -137,6 +137,12 @@
<string
name=
"go_publish"
>
我要发布
</string>
<string
name=
"go_publish"
>
我要发布
</string>
<string
name=
"management_service"
>
管理服务
</string>
<string
name=
"management_service"
>
管理服务
</string>
<string
name=
"other_service"
>
其他服务
</string>
<string
name=
"other_service"
>
其他服务
</string>
<string
name=
"upgrade_auth"
>
升级为认证商家
</string>
<string
name=
"auth_merchant_description"
>
更多曝光 · 权威认证 · 服务能力
</string>
<string
name=
"immediate_upgrade"
>
立即升级
</string>
<string
name=
"auth_apply_reject"
>
您的认证申请被驳回
</string>
<string
name=
"apply_auth_merchant_description"
>
通过即享更多曝光 · 权威认证 · 服务能力
</string>
<string
name=
"modify_auth"
>
修改认证
</string>
<string
name=
"my_staff"
>
我的员工
</string>
<string
name=
"my_staff"
>
我的员工
</string>
...
...
Components/newscontent/src/main/res/values/styles.xml
View file @
613fa609
...
@@ -162,5 +162,12 @@
...
@@ -162,5 +162,12 @@
<style
name=
"protocol_checkboxBg"
parent=
"@android:style/Widget.CompoundButton.CheckBox"
>
<style
name=
"protocol_checkboxBg"
parent=
"@android:style/Widget.CompoundButton.CheckBox"
>
<item
name=
"android:button"
>
@drawable/protocol_checkbox_bg
</item>
<item
name=
"android:button"
>
@drawable/protocol_checkbox_bg
</item>
</style>
</style>
<style
name=
"merchant_center_bottom_hint_dialog"
parent=
"android:style/Theme.Dialog"
>
<item
name=
"android:windowBackground"
>
@android:color/transparent
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowFrame"
>
@null
</item>
<item
name=
"android:windowIsFloating"
>
true
</item>
<item
name=
"android:backgroundDimEnabled"
>
false
</item>
</style>
</resources>
</resources>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment