android-statusbar

Google Now gradient/shadow on status bar & navigation bar

青春壹個敷衍的年華 提交于 2019-12-04 02:16:33
I'm trying to make a similar status bar and navigation bar gradient as Google Now. Image Reference: Rectangular area indicated as below After trying the below option on Android Marshmallow, <item name="android:windowTranslucentNavigation">true</item> <item name="android:windowTranslucentStatus">true</item> I get the below behaviour Image Reference: Can anyone suggest me how to get gradient on both these ? Is that a gradient or is that a shadow ? Bryan It is a gradient being used as a scrim . To achieve this effect, the first thing you have to do is remove the semi-transparent underlay for the

Inner fragment with fitsSystemWindows

巧了我就是萌 提交于 2019-12-02 19:31:06
问题 I am working on the transparent status bar and bottom navigation bar visible. I have achieved the same with my last question: Gradient status bar with BottomNavigationView But now, I have a fragments in which fitsSystemWindows is not working. I have layout like Activity -> Viewpager -> Fragments -> Viewpager -> child Fragments. I have gone through many attempts from stack overflow but still no luck : Appbar fitsSystemWindows - Inside a ViewPager Android - ViewPager fitsSystemWindows

Inner fragment with fitsSystemWindows

妖精的绣舞 提交于 2019-12-02 10:19:55
I am working on the transparent status bar and bottom navigation bar visible. I have achieved the same with my last question: Gradient status bar with BottomNavigationView But now, I have a fragments in which fitsSystemWindows is not working. I have layout like Activity -> Viewpager -> Fragments -> Viewpager -> child Fragments. I have gone through many attempts from stack overflow but still no luck : Appbar fitsSystemWindows - Inside a ViewPager Android - ViewPager fitsSystemWindows (fullscreen) not working Setting a child view to fit system windows Android fitsSystemWindows not working when

Android DrawerLayout (with NavigationView) behind status bar

左心房为你撑大大i 提交于 2019-12-01 10:29:45
I have an app with a DrawerLayout that contains a NavigationView : activity_layout.xml: <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/drawer_layout" android:fitsSystemWindows="true"> <android.support.constraint.ConstraintLayout android:id="@+id/activity_list" android:layout_width="match_parent" android:layout_height=

Android DrawerLayout (with NavigationView) behind status bar

放肆的年华 提交于 2019-12-01 08:50:46
问题 I have an app with a DrawerLayout that contains a NavigationView : activity_layout.xml: <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/drawer_layout" android:fitsSystemWindows="true"> <android.support.constraint

How to create a notification without icon in the statusbar or simply hide it?

穿精又带淫゛_ 提交于 2019-11-30 17:50:49
I'd like to know how to create a notification that doesn't show the icon in the statusbar. There is a way to hide it? Since Android 4.1 (API level 16) it's possible to specify a notification's priority . If you set that flag to PRIORITY_MIN the notification icon won't show up on the statusbar. notification.priority = Notification.PRIORITY_MIN; Or in case you use a Notification.Builder : builder.setPriority(Notification.PRIORITY_MIN); As of Android 8.0 Oreo (API level 26) you have to set the importance of the notification's NotificationChannel to IMPORTANCE_MIN : NotificationChannel channel =

How to create a notification without icon in the statusbar or simply hide it?

帅比萌擦擦* 提交于 2019-11-30 16:45:47
问题 I'd like to know how to create a notification that doesn't show the icon in the statusbar. There is a way to hide it? 回答1: Since Android 4.1 (API level 16) it's possible to specify a notification's priority. If you set that flag to PRIORITY_MIN the notification icon won't show up on the statusbar. notification.priority = Notification.PRIORITY_MIN; Or in case you use a Notification.Builder : builder.setPriority(Notification.PRIORITY_MIN); As of Android 8.0 Oreo (API level 26) you have to set

How to change the color of the status bar in a codenameone android app?

左心房为你撑大大i 提交于 2019-11-30 16:34:19
I would like to change the color of the status bar to match my app background, how can I do this? It is possible by placing a colors.xml file under the CN1 project <project>/native/android directory with the following example content: <resources> <color name="colorPrimary">#ffffc003</color> <color name="colorPrimaryDark">#ffffc003</color> <color name="colorAccent">#ff009486</color> </resources> Where in this case the colorPrimaryDark is the color you would like to color the status bar 来源: https://stackoverflow.com/questions/34904705/how-to-change-the-color-of-the-status-bar-in-a-codenameone

CoordinatorLayout status bar padding disappears from ViewPager 2nd page

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 11:24:46
问题 EDIT of 01/02/2016: Bug should be resolved by applying the code provided by Android Team: https://stackoverflow.com/a/35132144/3397345, see accepted answer below. EDIT of 27/01/2016: Bug still not resolved in v23.1.1. Solutions provided until now don't give transparent status bar (which is the purpose of this layout) or are too complex. A new screen-record of the bug available here: https://www.youtube.com/watch?v=76IxhlUx8MQ EDIT of 23/07/2015: Support Design Library v22.2.1 didn't fix :-(

Android M Light and Dark status bar programmatically - how to make it dark again?

隐身守侯 提交于 2019-11-30 02:56:33
In the Android M we have ability to make status bar icons dark. To do that we can specify attribute in the theme's xml: <item name="android:windowLightStatusBar">true</item> OR we cat set it at runtime with this code: View someView = findViewById(R.id.some_view); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { someView.setSystemUiVisibility(someView.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); } And it actually works fine. But question is how to properly set a status bar mode to dark at runtime? I already tried these variants: // Makes status bar mode dark, but also