Commit 2d9f6402 by 万齐军

feat: ui细节

parent 9d9a5c10
...@@ -37,6 +37,7 @@ import com.yidianling.user.api.service.IUserService ...@@ -37,6 +37,7 @@ import com.yidianling.user.api.service.IUserService
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import java.util.* import java.util.*
import kotlin.math.roundToInt
class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
companion object { companion object {
...@@ -196,7 +197,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -196,7 +197,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
val bottomSheet = val bottomSheet =
(it as BottomSheetDialog).findViewById<View>(com.google.android.material.R.id.design_bottom_sheet) as FrameLayout? (it as BottomSheetDialog).findViewById<View>(com.google.android.material.R.id.design_bottom_sheet) as FrameLayout?
val behavior = BottomSheetBehavior.from(bottomSheet!!) val behavior = BottomSheetBehavior.from(bottomSheet!!)
behavior.peekHeight = resources.displayMetrics.heightPixels / 2 behavior.peekHeight = (resources.displayMetrics.heightPixels * 0.7F).roundToInt()
//true是跳过peekHeight,直接滑下去,false是可以滑动到顶部还可以保持peekHeight在滑下去 //true是跳过peekHeight,直接滑下去,false是可以滑动到顶部还可以保持peekHeight在滑下去
// behavior?.skipCollapsed=true // behavior?.skipCollapsed=true
behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() { behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
......
...@@ -79,6 +79,8 @@ ...@@ -79,6 +79,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="23dp" android:layout_marginBottom="23dp"
android:maxHeight="8dp" android:maxHeight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingStart="0dp" android:paddingStart="0dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:progressDrawable="@drawable/confide_seekbar_style" android:progressDrawable="@drawable/confide_seekbar_style"
......
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