Add new action bar demos:

- Buttons for showing/hiding action bar and system UI
  in the basic action bar demo.
- New system UI demo that uses a non-overlay action bar.

Change-Id: Id3fbaa77365476489c558a2a43855a01f383551c
This commit is contained in:
Dianne Hackborn
2013-02-26 16:55:38 -08:00
parent 92a74bf534
commit a28de3ba59
6 changed files with 110 additions and 37 deletions

View File

@@ -166,8 +166,6 @@ public class SystemUIModes extends Activity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
setContentView(R.layout.system_ui_modes);
mImage = (IV) findViewById(R.id.image);
mImage.setActivity(this);

View File

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.android.apis.view;
import android.os.Bundle;
import android.view.Window;
/**
* Version of demo that uses the action bar in overlay mode.
*/
public class SystemUIModesOverlay extends SystemUIModes {
@Override
public void onCreate(Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
super.onCreate(savedInstanceState);
}
}