android-statusbar

How to correctly implement view content behind statusbar when using fragments

喜你入骨 提交于 2019-12-08 16:28:31
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/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name=

Change Android Statusbar color In Cordova

送分小仙女□ 提交于 2019-12-07 04:45:17
问题 I want to change the Status bar color in Android (I'm using 6.0 for testing). I tried the statusbar plugin and all the solutions I found for it but nothing worked. This is included in my config.xml <widget> : <preference name="StatusBarOverlaysWebView" value="true" /> <preference name="StatusBarBackgroundColor" value="#BE1912" /> My index.js uncludes: if (window.cordova && StatusBar) { StatusBar.backgroundColorByHexString('#3399FF'); } Added the plugin per package name and github repo.

Translucent StatusBar on kitkat with FrameLayout above the Toolbar and using CoordinatorLayout

微笑、不失礼 提交于 2019-12-06 15:11:55
问题 I was trying to achieve Translucent StatusBar on kitkat with the following FrameLayout and it's working without CoordinatorLayout like this: Layout.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:weightSum="1"> <FrameLayout android:id="@+id/statusbar" android:layout_width="match_parent" android:layout_height="25dp"

Android full screen dialog fragment like calendar app

China☆狼群 提交于 2019-12-05 14:02:17
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.layout.fragment_icons_dialog, container, false); } @Override public Dialog onCreateDialog(Bundle

Android: fitsSystemWindows and newline interfering with bottomSheets

跟風遠走 提交于 2019-12-05 08:24:37
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 the magic happens As soon as I remove android:fitsSystemWindows="true" , it's all ok, no more strange

Oreo Notification Bar Round Icon

柔情痞子 提交于 2019-12-05 06:52:19
I want to know that how can I change the notification bar small icon in android Oreo (API 26). It has round white icon showing in the notification bar. How can I change it? Manifest file default notification icon set as below. <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_status" /> See the image below Remove <meta-data> tag from AndroidManifest.xml . Notification Builder has .setSmallIcon(int icon, int level) which accepts icon as a compulsory argument & level parameter as an optional argument. NOTE: .setSmallIcon accepts

Layout is under StatusBar and Soft Keys

删除回忆录丶 提交于 2019-12-05 00:59:13
问题 I'm not sure how I got this, and I can't find anything similar, but my software navigation and status bar are being drawn over my layout instead of my layout being fit between them. How do I get my layout to be drawn between them instead of under? Edit: It seems this is the culprit, located in the styles: <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">true</item> 回答1: Just fix this: <item name="android:windowTranslucentStatus">false<

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

僤鯓⒐⒋嵵緔 提交于 2019-12-04 20:44:01
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? KaMyLL Snippet for those who just need a clean answer without reading the whole topic linked by T.Vert final View decor = getWindow().getDecorView(); decor.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver

Translucent StatusBar on kitkat with FrameLayout above the Toolbar and using CoordinatorLayout

浪尽此生 提交于 2019-12-04 20:36:08
I was trying to achieve Translucent StatusBar on kitkat with the following FrameLayout and it's working without CoordinatorLayout like this: Layout.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:weightSum="1"> <FrameLayout android:id="@+id/statusbar" android:layout_width="match_parent" android:layout_height="25dp" android:background="@color/colorPrimaryDark" /> <android.support.v7.widget.Toolbar android:id="@+id