摘要: public class ShareManager { //分享文件 public static void shareFiles(Context context, List<File> fileList) { if(context == null || fileList == null || fil 阅读全文
posted @ 2021-12-18 11:48 勤奋的小铁 阅读(387) 评论(0) 推荐(0) 编辑
摘要: class AppLifeObserver: LifecycleObserver { @OnLifecycleEvent(Lifecycle.Event.ON_START) fun onForeground() { LogUtils.logd("Application enters the fore 阅读全文
posted @ 2021-12-14 15:02 勤奋的小铁 阅读(383) 评论(1) 推荐(0) 编辑
摘要: //创建一直合适的空白,大小100*100的图片RGB_565会使透明图片变黑建议用ARGB_8888 Bitmap newBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.RGB_565); //初始化画布 Canvas canvas = n 阅读全文
posted @ 2021-12-08 10:29 勤奋的小铁 阅读(64) 评论(0) 推荐(0) 编辑
摘要: @Composable fun StaggeredFlow( modifier: Modifier = Modifier, itemSpacing: Dp = 0.dp, lineSpacing: Dp = 0.dp, gravity: Int = Gravity.LEFT, content: @C 阅读全文
posted @ 2021-12-06 16:26 勤奋的小铁 阅读(260) 评论(0) 推荐(0) 编辑
摘要: //用于引发错误 放在全局 var ActiveUser = compositionLocalOf<String> { error("No active user found!") } //使用 中间组件不需要知道该CompositionLocal值, CompositionLocalProvide 阅读全文
posted @ 2021-12-06 13:42 勤奋的小铁 阅读(182) 评论(0) 推荐(0) 编辑
摘要: @Composable fun MyOwnColumn( modifier: Modifier = Modifier, content: @Composable () -> Unit ) { Layout( modifier = modifier, content = content ) { mea 阅读全文
posted @ 2021-12-06 11:18 勤奋的小铁 阅读(113) 评论(0) 推荐(0) 编辑
摘要: // 我们用这个状态保存滚动位置 val scrollState = rememberScrollState() Column(Modifier.verticalScroll(scrollState)) { 。。。 } //滚动列表控件 LazyColumn { items(100) { //注意这 阅读全文
posted @ 2021-12-06 11:00 勤奋的小铁 阅读(1266) 评论(0) 推荐(0) 编辑
摘要: //通过偏移各个开始时间来创建“stagger”动画的自定义过渡 mStaggeredTransition = new TransitionSet(); Transition first = new ChangeBounds(); Transition second = new ChangeBoun 阅读全文
posted @ 2021-12-06 10:08 勤奋的小铁 阅读(177) 评论(0) 推荐(0) 编辑
摘要: /** * * 2021/11/30 * @author xiaotie */ @SuppressLint("MissingPermission") class VibrateHelp(context: Context) { private var vibrator: Vibrator? = nul 阅读全文
posted @ 2021-11-30 10:23 勤奋的小铁 阅读(818) 评论(0) 推荐(0) 编辑
摘要: AnimatedVisibility( //定义内容是否应该可见 visible = shown, /* slideIn、slideInVertically、slideInVertically 只能同时存在一个 enter = slideInVertically( //从离本身(小于零(上方)大于零 阅读全文
posted @ 2021-11-25 16:19 勤奋的小铁 阅读(494) 评论(0) 推荐(0) 编辑