12 2021 档案
摘要:public class ItemDragCallback extends ItemTouchHelper.Callback { private BleListAdapter mAdapter; private boolean mEdit; public ItemDragCallback(BleLi
阅读全文
摘要:java private static List<String> sPermissions = new ArrayList<String>(){}; private static int MAX_NUMBER_REQUEST_PERMISSIONS = 2; private static int R
阅读全文
摘要:public class ShareManager { //分享文件 public static void shareFiles(Context context, List<File> fileList) { if(context == null || fileList == null || fil
阅读全文
摘要:class AppLifeObserver: LifecycleObserver { @OnLifecycleEvent(Lifecycle.Event.ON_START) fun onForeground() { LogUtils.logd("Application enters the fore
阅读全文
摘要://创建一直合适的空白,大小100*100的图片RGB_565会使透明图片变黑建议用ARGB_8888 Bitmap newBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.RGB_565); //初始化画布 Canvas canvas = n
阅读全文
摘要:@Composable fun StaggeredFlow( modifier: Modifier = Modifier, itemSpacing: Dp = 0.dp, lineSpacing: Dp = 0.dp, gravity: Int = Gravity.LEFT, content: @C
阅读全文
摘要://用于引发错误 放在全局 var ActiveUser = compositionLocalOf<String> { error("No active user found!") } //使用 中间组件不需要知道该CompositionLocal值, CompositionLocalProvide
阅读全文
摘要:@Composable fun MyOwnColumn( modifier: Modifier = Modifier, content: @Composable () -> Unit ) { Layout( modifier = modifier, content = content ) { mea
阅读全文
摘要:// 我们用这个状态保存滚动位置 val scrollState = rememberScrollState() Column(Modifier.verticalScroll(scrollState)) { 。。。 } //滚动列表控件 LazyColumn { items(100) { //注意这
阅读全文
摘要://通过偏移各个开始时间来创建“stagger”动画的自定义过渡 mStaggeredTransition = new TransitionSet(); Transition first = new ChangeBounds(); Transition second = new ChangeBoun
阅读全文