Base Fragment
MVVMFrame 框架基于 Google 官方的 JetPack 构建,在使用 MVVMFrame 时,需遵循一些规范:
如果您继承使用了 BaseFragment 或其子类,你需要参照如下方式添加 @AndroidEntryPoint 注解标记,来进行注入
// 示例
@AndroidEntryPoint
class YourFragment: BaseFragment() {
}
Content copied to clipboard
Author
Properties
Functions
Link copied to clipboard
open fun createRootView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View
创建 rootView
Link copied to clipboard
创建 ViewModel
Link copied to clipboard
关闭对话框
Link copied to clipboard
关闭进度对话框
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
根布局ID
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
隐藏加载中
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onCreateContextMenu(@NonNull p0: ContextMenu, @NonNull p1: View, @Nullable p2: ContextMenu.ContextMenuInfo?)
Link copied to clipboard
Link copied to clipboard
open override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun <I : Any, O : Any> registerForActivityResult(@NonNull p0: ActivityResultContract<I, O>, @NonNull p1: ActivityResultCallback<O>): ActivityResultLauncher<I>
override fun <I : Any, O : Any> registerForActivityResult(@NonNull p0: ActivityResultContract<I, O>, @NonNull p1: ActivityResultRegistry, @NonNull p2: ActivityResultCallback<O>): ActivityResultLauncher<I>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun showDialog(contentView: View, @StyleRes styleId: Int = R.style.mvvmframe_dialog, gravity: Int = Gravity.NO_GRAVITY, widthRatio: Float = 0.85f, x: Int = 0, y: Int = 0, horizontalMargin: Float = 0.0f, verticalMargin: Float = 0.0f, horizontalWeight: Float = 0.0f, verticalWeight: Float = 0.0f, backCancel: Boolean = true)
显示对话框
Link copied to clipboard
显示加载中
Link copied to clipboard
显示进度对话框
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard