I am trying to develop an app(android:minSdkVersion=8, android:targetSdkVersion=19).I want to remove the app name and icon from the layout.I used this.
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
but it hide only the app name but not app icon..how is it possible?
Before setContentView on the pages:
requestWindowFeature(Window.FEATURE_NO_TITLE);
Related
I use this image like ic_launcher for my application
(source: fotohost.by)
In my application icon is displayed without background
But in my GO launcher EX it's displayed with background
(source: fotohost.by)
In what may be the problem?
Go launcher provides the functionality to enable/disable app icon base .
You have to disable it.
I think that this is a change made by a theme of the launcher.
I'm developing an restaurant menu application that I want to be always on (the user shouldn't be able to go outside the application).
So far am able to override the back and home buttons, but I would like to get rid of the notification bar. Is there anyway to do such thing?
I've tried to set the app theme to fullscreen no title bar but that didn't do the trick. (For the home button i used the custom app in the application.xml.)
Here is a picture of the app for better understanding
You cannot remove bottom navigation bar (notification bar is that one on the top of the screen) on non-rooted device.
If you want to make kiosk mode, then you got two choices - turn your app into launcher or root your device and use tools like: http://ppareit.github.com/HideBar/ (there's open source solution as well but I do not have URL handy)
Put this onCreate()
this.requestWindowFeature(Window.FEATURE_NO_TITLE); // Removing the title
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//notification bar
But you have to put it before the call to setContentView(R.id.x), otherwise it does not work
I am hiding status bar and title bar throught out my app by adding
android:theme="#android:style/Theme.NoTitleBar" in android manifest xml file. I am also adding
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
in each activity. I am able to hide them. But sometimes when my app is loaded it is pushing the page down by taking the statusbar and title bar space.
Can any one of you please help me.
You should declare one of the above things not both. Either you declare it in the manifest or do it programmatically. Performing both the tasks as you just mentioned can hamper the screen. See this for more details
Declare any one of them and clean and run the program once..
A similar question has been posted before but no satisfying answers yet.. The question is simple. I am using a custom Title Bar in my application (in the form on an image having text). However, When I use a title for the Launcher (the text beneath the launcher icon), it automatically sets the text for activity title and displays it under my customized title bar. If I use setTitle(""); at the start of the application to remove the title text, even then it shows it for a second ; enough to be noticed and if I completely remove the title bar text then it also removes the launcher title as well.. The application_label in Manifest file has nothing to do with the launcher title. The launcher title is obtained from Activity title which is quite annoying for me..
Any useful suggestions??
I understand you have two title bars? One 'from Android' and the other is your custom bar?
You can hide the Android-bar by using android:theme="#android:style/Theme.NoTitleBar" in the relevant activity in the manifest.
Did you use setTitle("") BEFORE calling setContentView(R.layout.your_activity) ? If so, it shouldn't show the text defined in your manifest at all because the setTitle() method call should have finished before the view is displayed. I use the same method to change the Title Bar text (and still maintain the Launcher text as defined in the manifest).
I will agree that it's strange the Launcher text isn't based on the android:label tag of <application>. The workaround of calling setTitle() in onCreate (before setContentView()) should do the trick though.
I am able to create a fullscreen app with a simple linear layout, by settings the following properties.
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Now if I add a EditText to the same linear layout (at the top), the app doesn't go to full screen mode anymore (The status bar is hidden though).
Am I doing anything wrong, or is it a bug in android ?
It will be better to make your application work in full screen by adding the following attribute:
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
in all the activities you declare in the AndroidManifest.xml