![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Android
mylisty
这个作者很懒,什么都没留下…
展开
-
Android toolBar 渐变和CoordinatorLayout appbarLayout悬浮实现
1.布局<?xml version="1.0" encoding="utf-8"?><androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.a原创 2021-01-19 18:27:09 · 382 阅读 · 0 评论 -
Android Fragment 监听返回
OnBackPressedCallback callback = new OnBackPressedCallback(true) { @Override public void handleOnBackPressed() { // 返回监听 做你想做的 }};requireActivity().getOnBackPressedDispatcher().addCallback(this, callback);回调会在与其关联的LifecycleOwner被销毁...原创 2020-11-19 15:49:41 · 242 阅读 · 0 评论