Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
shaoshuai904 committed Jan 5, 2022
1 parent 6430de9 commit f59b8b2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
16 changes: 8 additions & 8 deletions msdialog/src/main/java/com/maple/msdialog/AlertDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ class AlertDialog(
constructor(mContext: Context) : this(mContext, Config(mContext), R.style.AlertDialogStyle)
constructor(mContext: Context, config: Config) : this(mContext, config, R.style.AlertDialogStyle)

private fun getRootView() = binding.root
private fun getTitleView() = binding.tvTitle
private fun getMessageView() = binding.tvMsg
private fun getLineView() = binding.vLine
private fun getBottomBtnView() = binding.llBottom // 底部bottom区域
private fun getLeftBtnView() = binding.btLeft // 左侧按钮
private fun getRightBtnView() = binding.btRight // 右侧按钮
private fun getBtnLineView() = binding.vBtnLine // 左右按钮分割线
fun getRootView() = binding.root
fun getTitleView() = binding.tvTitle
fun getMessageView() = binding.tvMsg
fun getLineView() = binding.vLine
fun getBottomBtnView() = binding.llBottom // 底部bottom区域
fun getLeftBtnView() = binding.btLeft // 左侧按钮
fun getRightBtnView() = binding.btRight // 右侧按钮
fun getBtnLineView() = binding.vBtnLine // 左右按钮分割线

/**
* 设置Dialog宽度:相对于屏幕宽度比例
Expand Down
16 changes: 8 additions & 8 deletions msdialog/src/main/java/com/maple/msdialog/AlertEditDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ class AlertEditDialog(
// setContentView(getRootView())
// }

private fun getRootView() = binding.root
private fun getTitleView() = binding.tvTitle
private fun getMessageView() = binding.tvMsg
private fun getLineView() = binding.vLine
private fun getBottomBtnView() = binding.llBottom // 底部bottom区域
private fun getLeftBtnView() = binding.btLeft // 左侧按钮
private fun getRightBtnView() = binding.btRight // 右侧按钮
private fun getBtnLineView() = binding.vBtnLine // 左右按钮分割线
fun getRootView() = binding.root
fun getTitleView() = binding.tvTitle
fun getMessageView() = binding.tvMsg
fun getLineView() = binding.vLine
fun getBottomBtnView() = binding.llBottom // 底部bottom区域
fun getLeftBtnView() = binding.btLeft // 左侧按钮
fun getRightBtnView() = binding.btRight // 右侧按钮
fun getBtnLineView() = binding.vBtnLine // 左右按钮分割线

fun setScaleWidth(scWidth: Double): AlertEditDialog {
config.scaleWidth = scWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ class AlertNumberPickerDialog(
// divider 分割线
var dividerWidth: Int = 1 //0.4f.dp2px(context) // 分割线宽度
var dividerColor: Drawable = ColorDrawable(Color.parseColor("#C9C9C9"))// 分割线

}

}

0 comments on commit f59b8b2

Please sign in to comment.