android-statusbar

How to hide status bar?

末鹿安然 提交于 2019-12-19 14:25:10
问题 How can I hide the status bar for a specific activity? I found this similar question, but none of the answers worked for me. The app just crashed every time I tried to go to the activity: How to hide status bar in Android Thanks. 回答1: Try this in you activity before setting your content getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); 回答2: Hide the Status Bar on Android 4.0 and Lower By setting the theme of application in manifest

Android - Making activity full screen with status bar on top of it

前提是你 提交于 2019-12-17 22:09:07
问题 I want to make my activity full screen with status bar on top of it like this picture: I have used this code in manifest inside activity tag: 'android:theme="@style/Theme.AppCompat.Light.NoActionBar"' But my view doesn't start from the status bar & it looks like this: How can I make my activity look like the first one? 回答1: I know that the guy asking the question may have found his own solution but for the people who are still looking for a solution this is a very simple solution but one

How do I show text in android system status bar

拟墨画扇 提交于 2019-12-17 19:39:19
问题 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

Android fullscreen app - prevent access to status bar

本秂侑毒 提交于 2019-12-17 14:56:09
问题 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,

When SystemUI loads in Android Boot

有些话、适合烂在心里 提交于 2019-12-13 02:12:51
问题 How to know when the system UI loads in Android boot process? Where exactly the status bar and navigation bar view draws? As SystemUI is a privileged app so is it loading before the start of a launcher app (Home screen)? I am not sure. Any suggestion is welcome. 回答1: Below is a chain of briefly explained steps that hopefully shed some light on the sequence of "loading" the system UI components at boot time. I'll demonstrate it on Android 4.2, although the sequence is quite similar for the

How to make a transparent status bar in Android 4.4?

不打扰是莪最后的温柔 提交于 2019-12-12 03:44:05
问题 I want to make a transparent status bar in my application in Android 4.4. How do I do that? I tired: <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/skipPrimary</item> <item name="colorPrimaryDark">@color/skipPrimary</item> <item name="colorAccent">@color/skipPrimary</item> </style> and in the manifest: <application android:name=".App" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:theme="@style/AppTheme" >

MaterialDrawer library turns a translucent status bar into a opaque one

梦想与她 提交于 2019-12-12 02:27:28
问题 I am using MaterialDrawer library for adding a drawer to my activities. The activities must have translucent status bar. Like the picture below: This is the top part of my activity, when the library has not added to it yet. When I add a drawer using the library: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); DrawerMenu.addTo(this); } } And the

Always disable status bar and bottom bar in a custom launcher

左心房为你撑大大i 提交于 2019-12-12 00:55:34
问题 I need to write custom android launcher with only one my application and with disabling android system statusbar and bottom bar. Here is my code in AndroidManifest.xml <activity android:name=".MainActivity" android:launchMode="singleTask" android:stateNotNeeded="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.HOME" /> <category android:name="android.intent

How to add a text to android status bar using C++/QML

核能气质少年 提交于 2019-12-11 17:39:02
问题 I am trying to add some text to the android status bar using QT. I have a main.qml file that I will use to send the text to be written to the status bar of an android device. How should I proceed? Thanks in advance for any help on this. 来源: https://stackoverflow.com/questions/51391686/how-to-add-a-text-to-android-status-bar-using-c-qml

Google Now gradient/shadow on status bar & navigation bar

主宰稳场 提交于 2019-12-09 09:28:19
问题 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 ? 回答1: It is a gradient being used as a scrim. To