I have a type Fragment
, where I have implemented a ListView
with certain characters. It turns out that I had the typical blue bar above with the name of the App and through manifest
it I have removed it but I cannot take advantage of its space, that is, it does not reach the ListView
top, only until the beginning of the supposed top bar, and It takes up a lot of space.
Is it possible to deactivate it completely to be able to take advantage of the whole screen?
Another thing you can see is the BottomBar
bottom one, red, since the typical Android buttons are there, it starts higher, is there any way to lower it or adapt it to the buttons even more?
UPDATED:
activity_main.xml
< LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Try to place before the
setContenView
:This will put you full screen and take up your entire screen, that includes hiding the Android navigation controls . In case it doesn't work, add another Flag with
SYSTEM_UI_FLAG_HIDE_NAVIGATION
Here I show you another way:
I assume you mean the status bar :
Delete it and you see something similar to:
You can do it this way:
For android 4.0 and earlier you can define a theme without "ActionBar" in your Activity:
If you use support with
AppCompat
:Check the documentation about your question.
I think the error comes from
XML
if you are in aFragment
means you come from aActivity
.. then .. you have aLayout
where you do thisSo every time you make one
replace
ofFragment
the more code you have to solve it, you could not occupy the space that is left over in the image, why did you define the XML wrong... in any case, the action you should take is to assign eachFragment
oneToolbar
, of course all you need to addThen you would have to remove the
Toolbar
and youActivity
would look like thisNow if you want to remove the
Toolbar
default you have to go tostyles.xml
and add these 2 lines of code