草庐IT

fitsSystemWindows

全部标签

android - AppBarLayout fitsSystemWindows true attr 使 CircularIndicator 不可见

我正在使用JakeWharton的CirclePageIndicator在下面给出的我的个人资料页面中。图像容器是一个viewpager和circlepage指示器显示在它的底部。而且我需要将appbar的fitsSystemWindows属性设置为true才能使错误afaik使statusbarscrim工作。但是当使用这个attrcirclePagerIndicator消失。提前感谢您的帮助;) 最佳答案 AppBarLayoutandroid:fitsSystemWindows="true"以某种方式使它与Collapsing

java - FitsSystemWindows 不工作

我想为我的工具栏设置FitsSystemWindows=true或/和更改通知栏颜色。但它不起作用。我想做什么:image我的代码在这里:样式@color/colorPrimary@color/colorPrimaryDark@color/colorAccent@color/colorWhitefalsetrue@style/DrawerArrowStyleActivityDrawerLayout-其他Activity的基础ActivityActivityMain工具栏...MainActivity.javapublicclassMainActivityextendsDrawerAct

android - setfitsystemwindows not working windowtranslucentstatus coordinatorlayout

我正在开发一个小型Android项目。在状态栏下方显示工具栏时遇到一些问题。我正在使用以下配置:支持库版本23.2.0windowTranslucentStatus=true....consistsafragmentwithframelayoutandimage.....` 最佳答案 如果您将一些android:fitsSystemWindows="true"更改为android:fitsSystemWindows="false",它可能会起作用。我在使用支持库版本23.2.0时遇到了与您类似的问题,然后搜索了StackOverfl

android - fitsSystemWindows 在添加的 fragment 中不起作用

在我的应用程序中,我有一项Activity。此Activity的主题是L之前的正常主题,但对于L及更高版本会被覆盖,其中:...true@color/statusTrans...此Activity有这样的布局(fsw表示节点适合SystemWindows)以提供Material效果。CoordinatorLayout(fsw)LAppBarLayout(fsw)LCollapsingToolbarLayout(fsw)LImageView(fsw)LToolbarLTabLayoutLViewPagerLFAB事情是,我通过事务添加一个全屏DialogFragment到这个Activi

针对 API 28 (Android 9) 时,Android 半透明状态栏始终为灰色且适用于 fitsSystemWindows

从API21开始,当样式包含true时布局包括android:fitsSystemWindows="true"状态栏变为半透明,抽屉布局(如抽屉导航)在状态栏后面滑动。在针对API28之前,状态栏的基色将由colorPrimaryDark设置或android:statusBarColor.现在这些值被忽略了。这个问题实际上出现在com.android.support:design:27.1.0,但当时我认为这是一个错误并继续使用com.android.support:design:27.0.2.随着API28的延续,这似乎是一个未记录的设计更改。那么,使用fitsSystemWindo

android - fitsSystemWindows 不使状态栏透明

我有一个ConstraintLayout,我想在其中包含CollapsingToolbarLayout。所以,我遵循了本教程:https://antonioleiva.com/collapsing-toolbar-layout/但是,我的状态栏不是透明的,即使在我的XML的几乎每个组件中都包含fitsSystemWindows之后也是如此。这是我的风格,在Activity中使用@color/colorPrimary@color/colorPrimaryDark@color/colorAccentXML布局太大,所以我把它放在这个要点上:https://gist.github.com/g

android - 半透明导航栏 Lollipop (fitsSystemWindows ="true")

我正在尝试使用fitsSystemWindows="true"获得半透明的导航栏。它在kitkat中运行良好,半透明的导航栏使用android:clipToPadding="false"显示内容。但是Lollipop导航栏不显示内容。图片:navigationdrawerclosed这是xml:这是样式(相同的v19和v21):@color/md_red_500@color/md_red_700truetruejava文件只有工具栏支持。我需要fitsSystemWindows始终保持真实。抽屉导航在两个版本中都可以正常工作。例如,如果我在其中添加一个按钮:navigationdraw

android:fitsSystemWindows ="true"在使用 DrawerLayout 和沉浸式模式时出现问题

我在尝试使用沉浸式模式以及将android:fitsSystemWindows="true"与DrawerLayout一起使用时遇到问题。我必须将此设置为true才能将DrawerLayout和工具栏限制在系统栏中。问题是,我有一个Fragment将应用程序设置为沉浸式模式。这使得应用程序这样做:我知道这是android:fitsSystemWindows="true"的一个已知问题。我将其设置为false,沉浸式模式运行良好,但工具栏和其余布局不再受限于系统栏。我尝试在运行时设置值,布局的下部(又名导航栏区域)被我的布局填充,但系统栏区域仍在显示:这是我的代码:activity_ma

android:fitsSystemWindows 在工具栏上不工作

我正在使用来自ksoichiro的安卓库Android-ObservableScrollView。我将他的示例FlexibleSpace与viewpager一起使用,并对其进行了修改。但是有一些问题。您可以在我的xml中看到有2个android:fitsSystemWindows。一个在LinearLayout中,另一个在Toolbar中。在LinearLayout中工作良好。但在工具栏中不起作用。为什么会这样?谢谢你。抱歉我的英语不好这是我的xml代码: 最佳答案 android:fitsSystemWindows属性设置了一个填

android - 嵌套坐标布局和fitsSystemWindows重叠状态栏

以下是我的主要Activity的xml以下是Homefragment的xml代码以下是Detailfragment的xml代码现在,当我从HomeFragment调用DetailFragement时,我的工具栏与状态栏重叠。如果我从任何其他fragment调用Detailfragment它看起来很好。尽管Homefragment和Detailfragment的xml几乎相同,但Homefragment中的工具栏也不与状态栏重叠。图一是正常打开detailfragment时的样子从首页打开详情fragment时的图二最新更新:这个解决方案对我有帮助https://medium.com/g