how to modify layout in android studio

1

Hello friends how can I modify the layout or mainactivity in android studio because when I install the application the blue bar steals me, the total of the top on the screen and I would like it to assume the full screen

Any suggestions

    
asked by Alexander Quiroz 02.04.2017 в 00:41
source

3 answers

1

To prevent the Toolbar from being displayed, you must define the following theme within the Styles.xml file:

<style name="AppTheme.NoActionBar">
    <item name="windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>

and in the definition of your Activity you add the theme, for example:

  <activity
            android:name=".MainActivity"
            android:theme="@style/AppTheme.NoActionBar">

This way you will have your application without the Toolbar (ActionBar).

    
answered by 02.04.2017 / 03:46
source
1

You should modify certain parameters in the layout of that activity. You must find the element that represents toolbar and change the value of its property height to match-parent

    
answered by 02.04.2017 в 00:47
0

You can change the theme for your activity (without changing the general theme) in the following way:

<activity android:name=".MiActividadSinAppBar"
      android:label="@string/mi_app"
      android:theme="@android:style/Theme.Black.NoTitleBar">

For your MainActivity then:

<activity android:name=".MainActivity"
      android:label="@string/mi_app"
      android:theme="@android:style/Theme.Black.NoTitleBar">

To define a style with its own theme without AppBar, you place the following in your values/styles.xml :

        false         true     

and in your layout:

        android:theme="@style/AppTheme.NoActionBar"
    
answered by 02.04.2017 в 01:30