1

I want to make my login activity with background off whole activity including clock of the phone itself Like this

enter image description here

This is my code

 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:background="@drawable/bgd2"
    tools:context=".Signin">

But my output is this

enter image description here

I need to remove the orange bar and make it the same image like the first image.

How can I make it according to this style:

  <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="colorControlNormal">#FFF</item>
        <item name="colorControlActivated">#FFF</item>
    </style>
Zephyr
  • 9,885
  • 4
  • 28
  • 63
Eman Fateen
  • 821
  • 2
  • 9
  • 14

1 Answers1

0

you need to remove the ActionBar color using NoActionBar style.

there are two options.

  1. put the windowNoTitle style in style.xml example :

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="windowNoTitle">true</item> </style>

  2. Put this code on the Activity.

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getSupportActionBar().hide();

addition : if you also hide the navigation buttons then use FullScreen option in the style XML.

<item name="android:windowFullscreen">true</item>
mackbex
  • 69
  • 4