android-statusbar

CoordinatorLayout status bar padding disappears from ViewPager 2nd page

自作多情 提交于 2019-11-30 00:11:10
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 :-( Also this happens on toolbar quick return on MainActivity! EDIT of 28/07/2015: Linked question:

Gradient status bar with BottomNavigationView

痴心易碎 提交于 2019-11-29 16:10:41
In my Application I want to show gradient status bar. Also i have used BottomNavigationView . So issue is when i am doing status bar gradient the bottom navigation bar of android overlaps the BottomNavigationView . I have tried below solutions : how to set status bar background as gradient color or a drawable in android Google Now gradient/shadow on status bar & navigation bar How to apply gradient to status bar in android? How to remove button bar at the bottom screen My code is as below : -- > In java code i tried : if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Window w =

Translucent status bar and toolbar

纵然是瞬间 提交于 2019-11-29 03:13:30
I'd like to integrate something like this: And I've done it like this, but I can't seem to put the imageview below the toolbar. Without the toolbar, I can make it under the status bar, but combining these two are impossible. Here's my layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:fitsSystemWindows="true" tools:context="com.project.android.PhotoActivity"> <android

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

痞子三分冷 提交于 2019-11-29 00:02:23
问题 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

How do I show text in android system status bar

北战南征 提交于 2019-11-28 12:17:30
I'm trying to develop an app for Android Nougat and I want to show some info/text in the status bar generating from a android service routine. So my problem is, I don't know how to show the text in the status bar. I added a sample image to show what exactly do I mean (red circle). I know it is possible, because I saw it in a battery monitor app from play store. I already tried NotificationCombat.Builder, but I think this is not the right way. Maybe an overlay is, but after searching I didn't find something. Can someone show me how to do it or give me a hint, please? Edit: Here my test code for

Translucent status bar and toolbar

霸气de小男生 提交于 2019-11-27 17:29:31
问题 I'd like to integrate something like this: And I've done it like this, but I can't seem to put the imageview below the toolbar. Without the toolbar, I can make it under the status bar, but combining these two are impossible. Here's my layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation=

Android fullscreen app - prevent access to status bar

早过忘川 提交于 2019-11-27 16:20:33
I am creating a fullscreen app which will run in "kiosk" mode, so the user will not be able to exit. The app is defined as a launcher (home screen). The Activity in the manifest is defined with: android:theme="@android:style/Theme.NoTitleBar.Fullscreen" Additionally, the Activity ensures full screen mode with the following in its onCreate() : getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); However, it seems that the status bar is still accessible. It's hidden by default, but it can still be shown by

Transparent action bar and status bar like Uber

前提是你 提交于 2019-11-27 05:29:41
问题 I've done a few researches on this topic but I couldn't found some solution for my App/ Activity. I have tried to get a transparent action bar. First, I have tried to change the themes in my AndroidManifest.xml: values/styles.xml: <style name="AppTheme.ActionBar.Transparent" parent="AppTheme"> <item name="android:windowContentOverlay">@null</item> <item name="windowActionBarOverlay">true</item> <item name="colorPrimary">@android:color/transparent</item> and values-v21/styles.xml: <style name=

Show the Android Statusbar Notification in Particular date,

狂风中的少年 提交于 2019-11-27 03:40:14
问题 Help me to resolve this. Iam having Some Date in Local Database, Every day I Want to Check Database Date and Current Date in particular time,If database date is matching with current date Show notification in Statusbar I have added my code, signin-->MyNotificationService-->Scheduleclient-->ScheduleServcie-->AlarmTask-->NotifyService Flow, Here Once service is Started ,Database data is retrieving But condition Is not Checking every day. I Want to check local database Saved date & current date

Android statusbar icons color

眉间皱痕 提交于 2019-11-26 14:16:09
I was wondering if it's possible to change the statusbar icons colour ( not the statusbar colour, colorPrimaryDark ) Let's say I want this statusbar with: <item name="colorPrimaryDark">@android:color/white</item> and the icons in black, is it possible? Thanks. EDIT: New in the M developer preview: windowLightStatusBar. Flipping this on in your theme tells the system to use a dark foreground, useful for lighter colored status bars. Note the M preview seems to have a bug where notification icons remain white, while system status icons correctly change to semitransparent black. from: Roman Nurik