Fixed title bar bug for AccessibilityTutorial

Bug: 5080516
Change-Id: I2ef6dd4c96bef51e60a2ae9b081545219c821166
This commit is contained in:
Alan Viverette
2011-07-26 12:06:51 -07:00
parent a7c32ad749
commit 84c26a6b3d
4 changed files with 28 additions and 3 deletions

View File

@@ -975,7 +975,7 @@
android:label="@string/accessibility_tutorial_title"
android:configChanges="orientation"
android:immersive="true"
android:theme="@android:style/Theme.Holo.NoActionBar">
android:theme="@style/Theme.AccessibilityTutorialActivity">
<intent-filter>
<action android:name="android.settings.ACCESSIBILITY_TUTORIAL" />
<category android:name="android.intent.category.DEFAULT" />

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<resources>
<style name="Theme.AccessibilityTutorialActivity" parent="@android:style/Theme.Holo.NoActionBar">
</style>
</resources>

View File

@@ -19,4 +19,7 @@
<style name="Theme.WifiDialog" parent="@*android:style/Theme.Holo.Dialog.Alert">
<item name="android:windowSoftInputMode">adjustResize</item>
</style>
<style name="Theme.AccessibilityTutorialActivity" parent="@android:style/Theme.Holo">
</style>
</resources>

View File

@@ -481,6 +481,7 @@ public class AccessibilityTutorialActivity extends Activity {
private final Button mBack;
private final Button mNext;
private final Button mFinish;
private final int mTitleResId;
/** Which bit flags have been set. */
private long mFlags;
@@ -501,6 +502,7 @@ public class AccessibilityTutorialActivity extends Activity {
super(context);
mController = controller;
mTitleResId = titleResId;
final View container = LayoutInflater.from(context).inflate(
R.layout.accessibility_tutorial_container, this, true);
@@ -521,8 +523,6 @@ public class AccessibilityTutorialActivity extends Activity {
title.setText(titleResId);
}
controller.setTitle(titleResId);
final ViewGroup contentHolder = (ViewGroup) container.findViewById(R.id.content);
LayoutInflater.from(context).inflate(layoutResId, contentHolder, true);
}
@@ -535,6 +535,7 @@ public class AccessibilityTutorialActivity extends Activity {
mFlags = 0;
mInstructions.setVisibility(View.GONE);
mController.setTitle(mTitleResId);
onShown();
}