android fullscreen mode issue - android

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

Related

how to add a picture on the entire screen without disturbing the statusbar?

I see it in some applications, how do I add it to my application?
android:label="#string/foo" android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
Status bar is always Transparent.
What you want is to see no ToolBar
Apply theme to your application tag in manifest or to your individual activity if you want this :
Theme.Holo.Light.NoActionBar
Now you will have your entire screen at your disposal and you can set your image to match_parent and view it in full screen
within the tag specify height and weight as match parent
in the style sheet make action not visible
parent="Theme. App Compat. Light. noActionBar"

Hide app icon and name from an android layout

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);

Android: ActionBar with fixed bottom layout

I am trying to make an app which the main screen is an tabbed interface, and bellow the tab control there is a fixed strip of controls.
My first try, was adding into my XML another linear layout bellow the android.support.v4.view.ViewPager and setting actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); . This hides the layout at the bottom.
When I try NAVIGATION_MODE_STANDARD I see the layout at the bottom, but the app crashes when I switch tabs.
I found something similar in Appolo Music, however I did not understand were the player strip is defined (full code is here: https://github.com/CyanogenMod/android_packages_apps_Apollo)
EDIT:
I found using the Hierarchy viewer that the extra layout gets deleted on runtime. This is interesting.

How place ActionBarSherlock at the bottom?

I'm using ActionBarSherlock and I need to place it at the bottom.
Is there any way to do this?
Can I just set android:gravity="bottom" in style.xml?
Firstly, you cannot change the position of the ActionBarSherlock. It will always be displayed on the top. However, you can easily put your tabs and other contents you add in the ActionBar to be displayed at the bottom.
I also had a similar problem. I solved it by putting android:uiOptions="splitActionBarWhenNarrow" within the <activity> tag.
For example, this worked:
<activity android:name=".my.Activity"
android:uiOptions="splitActionBarWhenNarrow"/>
However, only in portrait mode it will actually show at the bottom of the screen. So, you will have to define your application orientation in the manifest as portrait, otherwise it will again go to the top.

Android: Getting an issue of hiding title and status bar

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..

Categories

Resources