Base Dialog
对话框基类,默认对MIUI等某些定制系统手机的Dialog宽度很窄的问题做了处理:isFullWidth默认为true。如果 需要dialog有左右边距,请直接在布局加margin即可.
注意:指定dialog的gravity和坐标left和top时,可这样使用:
override fun show() {
super.show()
window?.apply {
val lp = attributes
lp.gravity = Gravity.LEFT or Gravity.TOP
lp.x = left
lp.y = top
window?.attributes = lp
}
}
Content copied to clipboard
Author
Ayvytr 's GitHub
Since
3.1.1
Constructors
BaseDialog
Link copied to clipboard
fun BaseDialog(context: Context, themeResId: Int = R.style.TransparentDialog_DimBg)
Content copied to clipboard
Functions
add Content View
Link copied to clipboard
close Options Menu
Link copied to clipboard
dispatch Generic Motion Event
Link copied to clipboard
dispatch Key Event
Link copied to clipboard
dispatch Key Shortcut Event
Link copied to clipboard
dispatch Populate Accessibility Event
Link copied to clipboard
open override fun dispatchPopulateAccessibilityEvent(p0: AccessibilityEvent): Boolean
Content copied to clipboard
dispatch Touch Event
Link copied to clipboard
dispatch Trackball Event
Link copied to clipboard
find View By Id
Link copied to clipboard
get Action Bar
Link copied to clipboard
get Context
Link copied to clipboard
get Current Focus
Link copied to clipboard
get Layout Inflater
Link copied to clipboard
get Owner Activity
Link copied to clipboard
get Search Event
Link copied to clipboard
get Volume Control Stream
Link copied to clipboard
invalidate Options Menu
Link copied to clipboard
on Action Mode Finished
Link copied to clipboard
on Action Mode Started
Link copied to clipboard
on Attached To Window
Link copied to clipboard
on Back Pressed
Link copied to clipboard
on Content Changed
Link copied to clipboard
on Context Item Selected
Link copied to clipboard
on Context Menu Closed
Link copied to clipboard
on Create Context Menu
Link copied to clipboard
open override fun onCreateContextMenu(p0: ContextMenu, p1: View, p2: ContextMenu.ContextMenuInfo)
Content copied to clipboard
on Create Options Menu
Link copied to clipboard
on Create Panel Menu
Link copied to clipboard
on Create Panel View
Link copied to clipboard
on Detached From Window
Link copied to clipboard
on Generic Motion Event
Link copied to clipboard
on Key Long Press
Link copied to clipboard
on Key Multiple
Link copied to clipboard
on Key Shortcut
Link copied to clipboard
on Menu Item Selected
Link copied to clipboard
on Menu Opened
Link copied to clipboard
on Options Item Selected
Link copied to clipboard
on Options Menu Closed
Link copied to clipboard
on Panel Closed
Link copied to clipboard
on Pointer Capture Changed
Link copied to clipboard
on Prepare Options Menu
Link copied to clipboard
on Prepare Panel
Link copied to clipboard
on Provide Keyboard Shortcuts
Link copied to clipboard
open fun onProvideKeyboardShortcuts(p0: MutableList<KeyboardShortcutGroup>, p1: Menu?, p2: Int)
Content copied to clipboard
on Restore Instance State
Link copied to clipboard
on Save Instance State
Link copied to clipboard
on Search Requested
Link copied to clipboard
on Touch Event
Link copied to clipboard
on Trackball Event
Link copied to clipboard
on Window Attributes Changed
Link copied to clipboard
open override fun onWindowAttributesChanged(p0: WindowManager.LayoutParams)
Content copied to clipboard
on Window Focus Changed
Link copied to clipboard
on Window Starting Action Mode
Link copied to clipboard
open override fun onWindowStartingActionMode(p0: ActionMode.Callback): ActionMode?
Content copied to clipboard
open override fun onWindowStartingActionMode(p0: ActionMode.Callback, p1: Int): ActionMode?
Content copied to clipboard
open Context Menu
Link copied to clipboard
open Options Menu
Link copied to clipboard
register For Context Menu
Link copied to clipboard
request Window Feature
Link copied to clipboard
require View By Id
Link copied to clipboard
set Cancelable
Link copied to clipboard
set Canceled On Touch Outside
Link copied to clipboard
set Cancel Message
Link copied to clipboard
set Content View
Link copied to clipboard
set Dismiss Message
Link copied to clipboard
set Feature Drawable
Link copied to clipboard
set Feature Drawable Alpha
Link copied to clipboard
set Feature Drawable Resource
Link copied to clipboard
set Feature Drawable Uri
Link copied to clipboard
set Gravity
Link copied to clipboard
注意:请在show之前使用.
set On Cancel Listener
Link copied to clipboard
set On Dismiss Listener
Link copied to clipboard
set On Key Listener
Link copied to clipboard
set On Show Listener
Link copied to clipboard
set Owner Activity
Link copied to clipboard
set Volume Control Stream
Link copied to clipboard
take Key Events
Link copied to clipboard
unregister For Context Menu
Link copied to clipboard