android-statusbar

Showing content behind status and navigation bar

怎甘沉沦 提交于 2020-01-12 16:49:24
问题 This looks like a duplicate question but I am not able to do it. I want complete transparent(not translucent) status bar as well as navigation bar and want the content to appear behind them. activity_details.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout 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"

Gradient status bar with BottomNavigationView

[亡魂溺海] 提交于 2020-01-10 05:24:06
问题 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 : -

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

雨燕双飞 提交于 2019-12-30 05:24:07
问题 I would like to change the color of the status bar to match my app background, how can I do this? 回答1: 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 来源

Oreo (8.0) status bar notification icon all white

只谈情不闲聊 提交于 2019-12-24 07:39:03
问题 I'm currently having problems with Android Oreo showing the notification icon correctly in the status bar and on the notification itself (screenshots provided below). To create the icons, I am using Android 3.1, right clicking on the res folder and choosing New > Image Asset. Within that, I'm uploading an all white png (as per docs) and selecting a red background as per screenshot: Within the AndroidManifest.xml, I set the icon like this: <application ... android:icon="@mipmap/ic_launcher"

Hiding the navigation bar immediately on app launch

你。 提交于 2019-12-24 00:40:07
问题 Based on the following code snippets, I was able to hide the status bar right when the app launches , but not the navigation bar (the bar consisting of the back, home, and task manager buttons) since it hides later after MainActivity's thread finishes loading up : Here's the manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="dpark.sample2"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher"

How to correctly implement view content behind statusbar when using fragments

大兔子大兔子 提交于 2019-12-23 02:32:57
问题 I'm trying put my ImageBackdrop from the collapsing toolbar behind the statusBar, I've done it right with the Drawer and the navigationView but I can't do it with my fragments, In the cheesequare demo, Chris did it, and I can do it that way, but it's not using a single activity app and fragment transitions, so that's not quite what I'm looking for. My style: <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color

Android full screen dialog fragment like calendar app

删除回忆录丶 提交于 2019-12-22 07:56:10
问题 I am trying to achieve a full-screen dialog like the below image. I am able to show a full screen dialog but when the dialog is shown the status bar color changes to black and does not keep the primary-dark color. Heres my dialog fragment public class IconsDialogFragment extends DialogFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout to use as dialog or embedded fragment return inflater.inflate(R

Android: fitsSystemWindows and newline interfering with bottomSheets

戏子无情 提交于 2019-12-22 06:25:20
问题 I have found out that if the parent layout contains android:fitsSystemWindows="true" , it will interfere with my BottomSheets positioning, when a view-related action happens. Specifically the one I'm encountering: where a newline in a textview will trigger the bottomsheets to offset by the height of the system/notif-bar. newline + fitsSystemWindows = shoves my bottomsheet down I eliminated all irrelevant stuff down to buttons, textview and the bottomsheet. Button2: setText("1\n2") is where

Android: fitsSystemWindows and newline interfering with bottomSheets

 ̄綄美尐妖づ 提交于 2019-12-22 06:25:06
问题 I have found out that if the parent layout contains android:fitsSystemWindows="true" , it will interfere with my BottomSheets positioning, when a view-related action happens. Specifically the one I'm encountering: where a newline in a textview will trigger the bottomsheets to offset by the height of the system/notif-bar. newline + fitsSystemWindows = shoves my bottomsheet down I eliminated all irrelevant stuff down to buttons, textview and the bottomsheet. Button2: setText("1\n2") is where

findViewById(android.R.id.statusBarBackground) returns null

笑着哭i 提交于 2019-12-22 01:13:56
问题 I'm trying to get StatusBarView (I need it for activity shared element transition animation). I use the following code in my activity: View decorView = getWindow().getDecorView(); View statusBar = decorView.findViewById(android.R.id.statusBarBackground); But statusBar is always null . I tried this code after onCreate() and after onResume() - no effect. What's wrong? 回答1: Snippet for those who just need a clean answer without reading the whole topic linked by T.Vert final View decor =