jjzjj

windowtranslucentstatus

全部标签

android - setfitsystemwindows not working windowtranslucentstatus coordinatorlayout

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

android - 我什么时候应该使用 windowDrawsSystemBarBackgrounds 属性?

我阅读了一些关于androidfitsSystemWindows属性和一些小部件(即抽屉导航)中的自定义行为的文章,没有问题。但是从文档中我无法真正理解windowTranslucentStatus和windowDrawsSystemBarBackgrounds之间的区别。有人可以解释一下何时应该/不应该使用每个属性吗?我想我需要使用windowTranslucentStatus+fitsSystemWindows和windowTranslucentNavigation+clipToPadding,但windowDrawsSystemBarBackgrounds有什么用?

android - 将 windowTranslucentStatus 与隐藏的工具栏一起使用

我正在尝试将windowTranslucentStatus和AppBarLayout与标记为app:layout_scrollFlags="scroll|enterAlways"Toolbar合并同时测试API18、19和22(左起)。问题出在最高的API上,其中工具栏在状态栏下部分可见。我尝试了很多样式组合,但这是我得到的最接近的。在我使用的样式中:@color/primary@color/primary_dark@color/primary@color/primary_dark@color/primary@color/primarytrue@color/backgroundtrue

android - 如何使 AppBarLayout 在 windowTranslucentStatus 设置为 true 时完全消失

我正在使用新的设计库开发Android应用程序。我想创建一个类似的滚动效果,用于新的GooglePhotosapp.我希望AppBarLayout完全滚出屏幕,以便回收器View滚动到状态栏后面。我已在应用的主题中将windowTranslucentStatus设置为true。这是主要Activity的xml:这是向下滚动时的样子:工具栏并没有完全消失。感谢您的帮助! 最佳答案 这是我在我的应用程序中使用的 关于android-如何使AppBarLayout在windowTransluc

android - 即使使用 windowTranslucentStatus 和 fitSystemWindows,CoordinatorLayout 也不会在状态栏后面绘制

我正在尝试在状态栏后面绘制View,如下所示:我尝试使用推荐的技术来产生这种效果,但我明白了:从屏幕截图中可以清楚地看出,我的应用内容都没有被绘制在状态栏后面。有趣的是,NavDrawer设法在状态栏后面绘制:我做过的事情:使用支持库小部件-CoordinatorLayout、AppBarLayout、Toolbar、DrawerLayoutwindowTranslucentStatus在我的应用主题中设置为truefitsSystemWindows在我的CoordinatorLayout上设置为true这是我的应用主题:@color/colorPrimary@android:colo

android - 即使使用 windowTranslucentStatus 和 fitSystemWindows,CoordinatorLayout 也不会在状态栏后面绘制

我正在尝试在状态栏后面绘制View,如下所示:我尝试使用推荐的技术来产生这种效果,但我明白了:从屏幕截图中可以清楚地看出,我的应用内容都没有被绘制在状态栏后面。有趣的是,NavDrawer设法在状态栏后面绘制:我做过的事情:使用支持库小部件-CoordinatorLayout、AppBarLayout、Toolbar、DrawerLayoutwindowTranslucentStatus在我的应用主题中设置为truefitsSystemWindows在我的CoordinatorLayout上设置为true这是我的应用主题:@color/colorPrimary@android:colo

java - 当 android lollipop 或更高版本时设置 windowTranslucentStatus=true

我想在用户使用lollipop及以上时将windowTranslucentStatus设置为true,否则(至少在kitkat上)应用栏出现在系统栏内。在Lollipop上很好。没有为每个版本制作单独的styles.xml显然你不应该再做我如何在java中设置它?我的mainActivity中有以下代码,但不知道hotwindowTranslucentStatus...有什么想法吗?if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP){//setwindowTranslucentStatus=true}

android - 将 windowTranslucentStatus 与 CollapsingToolbarLayout 一起使用

我正在尝试获得与在googleplay上看到的效果类似的效果。我有下面的布局来显示一个透明的工具栏,后面有一个图像。当用户滚动时,ImageView会在它滚出屏幕时产生视差效果。当用户向上滚动时,工具栏就会返回,而ImageView仅在用户到达列表的顶部时才会返回。这一切都很好。问题当我将windowTranslucentStatus设置为true时。View中的内容上移到状态栏下方,但CollapsingToolbarLayout的内容上移两倍的状态栏高度(CollapsingToolbarLayout保持正确的高度)。这意味着图像顶部的某些部分被截断,操作栏现在显示在状态栏下方而不

android - android :windowTranslucentStatus=true 时键盘隐藏 EditText

我们正在我们的应用中应用新的AndroidKitKat半透明主题,当键盘出现时我们遇到了一个奇怪的问题。如果我们不使用新的android:windowTranslucentStatus属性,一切照常工作:屏幕被调整大小,一切都保持可见。但是当我们使用android:windowTranslucentStatus,屏幕没有调整大小,我们的EditText被键盘隐藏。问题示例:屏幕之间的唯一区别在于样式中的属性:第一个屏幕:false第二屏:true我们认为这是Kitkat版本中的一个错误,但我们希望您注意这一点。我们有点生气了。当然,如果有人有解决方案,那就太棒了。编辑:我刚刚将此问题添