Commit 1028f7be by 王佳洋

1.UI调整

2.bug修复
parent 6d8db533
...@@ -14,7 +14,7 @@ buildscript { ...@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3' ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2' constrait_support_version = '1.0.2'
componentVersion = "0.3.0.20-wjy-SNAPSHOT" componentVersion = "0.3.0.22-wjy-SNAPSHOT"
} }
repositories { repositories {
mavenCentral() mavenCentral()
......
...@@ -590,7 +590,7 @@ class ExpertSearchAdapter( ...@@ -590,7 +590,7 @@ class ExpertSearchAdapter(
val userService = findRouteService(IUserService::class.java) val userService = findRouteService(IUserService::class.java)
if (!userService.isBindPhone() && context is Activity) { if (!userService.isBindPhone() && context is Activity) {
CommonDialog(context) CommonDialog(context)
.setMessage("为了及时接收消息通知,请立即绑定收集") .setMessage("为了及时接收消息通知,请立即绑定手机")
.setLeftOnclick("忍痛放弃") {} .setLeftOnclick("忍痛放弃") {}
.setRightClick("果断绑定") { .setRightClick("果断绑定") {
userService.wxBindToInputhonePage(context) // 跳转绑定手机号页面 userService.wxBindToInputhonePage(context) // 跳转绑定手机号页面
......
...@@ -32,7 +32,7 @@ class CourseListDialog : BaseDialogFragment() { ...@@ -32,7 +32,7 @@ class CourseListDialog : BaseDialogFragment() {
private lateinit var recycler_list: RecyclerView private lateinit var recycler_list: RecyclerView
override fun getLayoutResourceId(): Int = R.layout.dialog_course_list override fun getLayoutResourceId(): Int = R.layout.dialog_course_list
override fun getGravity(): Int = Gravity.BOTTOM override fun setGravity(): Int = Gravity.BOTTOM
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
context?.let { ctx -> context?.let { ctx ->
......
...@@ -26,7 +26,7 @@ class CourseSpeedDialog : BaseDialogFragment() { ...@@ -26,7 +26,7 @@ class CourseSpeedDialog : BaseDialogFragment() {
private lateinit var tv_cancel: TextView private lateinit var tv_cancel: TextView
override fun getLayoutResourceId(): Int = R.layout.dialog_course_speed override fun getLayoutResourceId(): Int = R.layout.dialog_course_speed
override fun getGravity(): Int = Gravity.BOTTOM override fun setGravity(): Int = Gravity.BOTTOM
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
context?.let { context?.let {
......
...@@ -139,7 +139,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -139,7 +139,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
val userService = findRouteService(IUserService::class.java) val userService = findRouteService(IUserService::class.java)
if (!userService.isBindPhone() && context is Activity) { if (!userService.isBindPhone() && context is Activity) {
CommonDialog(context) CommonDialog(context)
.setMessage("为了及时接收消息通知,请立即绑定收集") .setMessage("为了及时接收消息通知,请立即绑定手机")
.setLeftOnclick("忍痛放弃") {} .setLeftOnclick("忍痛放弃") {}
.setRightClick("果断绑定") { .setRightClick("果断绑定") {
userService.wxBindToInputhonePage(context as Activity) // 跳转绑定手机号页面 userService.wxBindToInputhonePage(context as Activity) // 跳转绑定手机号页面
......
package com.yidianling.user.mine
import android.os.Bundle
import android.view.Gravity
import android.view.View
import android.widget.TextView
import androidx.fragment.app.DialogFragment
import com.ydl.ydlcommon.base.BaseDialogFragment
import com.yidianling.user.R
/**
* 修改头像dialog
*/
class AvaterDialog : BaseDialogFragment() {
override fun getLayoutResourceId(): Int = R.layout.dialog_album_photo
override fun setGravity(): Int = Gravity.BOTTOM
lateinit var listener: (Int, DialogFragment) -> Unit
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
val tv_album = view.findViewById<TextView>(R.id.tv_album)
tv_album.setOnClickListener {
listener.invoke(0, this)
}
val tv_photo = view.findViewById<TextView>(R.id.tv_photo)
tv_photo.setOnClickListener {
listener.invoke(1, this)
}
val tv_cancel = view.findViewById<TextView>(R.id.tv_cancel)
tv_cancel.setOnClickListener {
listener.invoke(2, this)
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:topLeftRadius="8dp"
android:topRightRadius="8dp"/>
<solid android:color="@android:color/white"/>
</shape>
\ No newline at end of file
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<com.ydl.ydlcommon.view.TitleBar <com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tip_bar" android:id="@+id/tip_bar"
android:background="@color/color_2E2E30"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="44dp" android:layout_height="44dp"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/color_F9F9FD"
android:orientation="vertical"> android:orientation="vertical">
<com.ydl.ydlcommon.view.TitleBar <com.ydl.ydlcommon.view.TitleBar
...@@ -12,6 +13,7 @@ ...@@ -12,6 +13,7 @@
android:layout_height="44dp" android:layout_height="44dp"
android:background="@color/platform_white" android:background="@color/platform_white"
app:pa_left_start_icon="@drawable/platform_common_back" app:pa_left_start_icon="@drawable/platform_common_back"
android:layout_marginBottom="16dp"
app:pa_right_text="保存" app:pa_right_text="保存"
app:pa_title_text="修改昵称" /> app:pa_title_text="修改昵称" />
...@@ -20,13 +22,12 @@ ...@@ -20,13 +22,12 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="26dp" android:layout_marginStart="26dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:textColor="@color/color_9d9ea7" android:textColor="@color/color_9d9ea7"
android:textSize="14sp" android:textSize="14sp"
android:visibility="invisible" android:visibility="gone"
tools:text="七天内可修改一次昵称" tools:text="七天内可修改一次昵称"
tools:visibility="visible" /> tools:visibility="visible"/>
<com.ydl.ydlcommon.view.DeleteEditTextView <com.ydl.ydlcommon.view.DeleteEditTextView
android:id="@+id/det_set_info" android:id="@+id/det_set_info"
...@@ -40,7 +41,7 @@ ...@@ -40,7 +41,7 @@
android:paddingEnd="10dp" android:paddingEnd="10dp"
android:paddingTop="15dp" android:paddingTop="15dp"
android:gravity="start" android:gravity="start"
android:textSize="14sp" android:textSize="18sp"
android:textColor="@color/color_1C1F28" android:textColor="@color/color_1C1F28"
android:paddingBottom="15dp" /> android:paddingBottom="15dp" />
......
<?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="match_parent"
android:background="@drawable/bg_top_corner_8_white">
<TextView
android:id="@+id/tv_album"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:text="相册"
android:textColor="@color/color_1C1F28"
android:textSize="16sp"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/divide_1"
android:layout_width="match_parent"
android:layout_height="0.5dp"
app:layout_constraintTop_toBottomOf="@id/tv_album"
android:background="@color/color_EFEFF1"/>
<TextView
android:id="@+id/tv_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:text="拍照"
android:textColor="@color/color_1C1F28"
android:textSize="16sp"
app:layout_constraintTop_toBottomOf="@id/divide_1" />
<View
android:id="@+id/divide_2"
android:layout_width="match_parent"
android:layout_height="0.5dp"
app:layout_constraintTop_toBottomOf="@id/tv_photo"
android:background="@color/color_EFEFF1"/>
<TextView
android:id="@+id/tv_cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:text="取消"
android:textColor="@color/color_1C1F28"
android:textSize="16sp"
app:layout_constraintTop_toBottomOf="@id/divide_2" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -8,6 +8,7 @@ import android.view.ViewDebug.ExportedProperty ...@@ -8,6 +8,7 @@ import android.view.ViewDebug.ExportedProperty
import android.view.ViewDebug.IntToString import android.view.ViewDebug.IntToString
import android.view.ViewGroup import android.view.ViewGroup
import androidx.annotation.LayoutRes import androidx.annotation.LayoutRes
import androidx.annotation.StyleRes
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.ydl.ydlcommon.R import com.ydl.ydlcommon.R
...@@ -18,7 +19,7 @@ abstract class BaseDialogFragment : DialogFragment() { ...@@ -18,7 +19,7 @@ abstract class BaseDialogFragment : DialogFragment() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setStyle(STYLE_NO_TITLE, R.style.bottomUpDialog) setStyle(STYLE_NO_TITLE, setTheme())
} }
override fun onCreateView( override fun onCreateView(
...@@ -33,7 +34,7 @@ abstract class BaseDialogFragment : DialogFragment() { ...@@ -33,7 +34,7 @@ abstract class BaseDialogFragment : DialogFragment() {
super.onStart() super.onStart()
dialog?.window?.run { dialog?.window?.run {
attributes = attributes?.apply { attributes = attributes?.apply {
gravity = getGravity() gravity = setGravity()
width = getWidth() width = getWidth()
height = getHeight() height = getHeight()
} }
...@@ -42,7 +43,9 @@ abstract class BaseDialogFragment : DialogFragment() { ...@@ -42,7 +43,9 @@ abstract class BaseDialogFragment : DialogFragment() {
@LayoutRes @LayoutRes
abstract fun getLayoutResourceId(): Int abstract fun getLayoutResourceId(): Int
open fun getGravity(): Int = Gravity.NO_GRAVITY open fun setGravity(): Int = Gravity.NO_GRAVITY
@StyleRes
open fun setTheme(): Int = R.style.bottomUpDialog
@ExportedProperty( @ExportedProperty(
category = "layout", category = "layout",
......
...@@ -135,4 +135,5 @@ ...@@ -135,4 +135,5 @@
<color name="color_2E2E30">#2E2E30</color> <color name="color_2E2E30">#2E2E30</color>
<color name="color_191919">#191919</color> <color name="color_191919">#191919</color>
<color name="color_E5E5E5">#E5E5E5</color> <color name="color_E5E5E5">#E5E5E5</color>
<color name="color_F9F9FD">#F9F9FD</color>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment