1

I am trying to make like Trello application, see in the screenshot of Trello, they covered complete screen with background but still time, network show in title bar, I want to do same in my application such that set background to complete full screen and should show network and time.

enter image description here

I am trying this but it didn't work for me.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_main);
}

enter image description here

Update

enter image description here

Mick
  • 1,179
  • 5
  • 14
  • 24
  • 1
    Not sure what your target sdk version is, but you can do this natively starting from API level 19 (4.4) https://developer.android.com/training/system-ui/immersive.html – markbratanov May 10 '14 at 09:31
  • Maybe they just [set the background image](http://stackoverflow.com/q/5861870/11683)? – GSerg May 10 '14 at 09:42

3 Answers3

1

Removing the action bar

You can hide the action bar at runtime by calling hide(). For example:

ActionBar actionBar = getSupportActionBar();
actionBar.hide();

https://developer.android.com/guide/topics/ui/actionbar.html

For a translucent system bar (like in trello) see this:

Translucent system bars

You can now make the system bars partially translucent with new themes, Theme.Holo.NoActionBar.TranslucentDecor and Theme.Holo.Light.NoActionBar.TranslucentDecor. By enabling translucent system bars, your layout will fill the area behind the system bars, so you must also enable fitsSystemWindows for the portion of your layout that should not be covered by the system bars.

If you're creating a custom theme, set one of these themes as the parent theme or include the windowTranslucentNavigation and windowTranslucentStatus style properties in your theme.

http://developer.android.com/about/versions/android-4.4.html#UI

seb
  • 4,279
  • 2
  • 25
  • 36
  • No, now it hide the network, battery status in the title, see I want something like trello – Mick May 10 '14 at 09:38
  • see I added screenshot in the question – Mick May 10 '14 at 09:39
  • this does not hide the battery status, your other code hides it (see your screenshot before the update) this means comment the `getWindow().setFlags(...)` line – seb May 10 '14 at 10:05
  • @Mick remember to accept answers, if they helped you, so they don't stay open – seb May 10 '14 at 18:07
0

try this:

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,windowManager.LayoutParams.FLAG_FULLSCREEN);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
Pankaj Arora
  • 10,224
  • 2
  • 37
  • 59
0

Android introduced a Immersive Full Screen Mode concept from Android 4.4, here you can see https://developer.android.com/training/system-ui/immersive.html that solved my problem.

Mick
  • 1,179
  • 5
  • 14
  • 24