SupportLeanbackShowcase: Fixed the crash/background color/selector in Guided Step Wizard view

am: 285adeccf2

* commit '285adeccf24b63136af8d9b9075c51089f143f1d':
  SupportLeanbackShowcase: Fixed the crash/background color/selector in Guided Step Wizard view
This commit is contained in:
Keyvan Amiri
2016-02-10 02:31:51 +00:00
committed by android-build-merger
6 changed files with 24 additions and 53 deletions

View File

@@ -51,14 +51,15 @@ public class WizardExample3rdStepFragment extends WizardExampleBaseStepFragment
return R.layout.wizard_progress_action_item;
}
@Override
public int onProvideLayoutId() {
return R.layout.wizard_progress_action_container;
}
};
return stylist;
}
@Override
public int onProvideTheme() {
return R.style.Theme_Example_LeanbackWizard_NoSelector;
}
@Override
public void onStop() {
super.onStop();

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 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.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
style="?attr/guidedActionsContainerStyle">
<FrameLayout
android:id="@+id/guidedactions_selector"
style="?attr/guidedActionsSelectorStyle"
android:visibility="gone"/>
<android.support.v17.leanback.widget.VerticalGridView
android:id="@+id/guidedactions_list"
style="?attr/guidedActionsListStyle"/>
</RelativeLayout>
</RelativeLayout>

View File

@@ -16,7 +16,9 @@
-->
<android.support.v17.leanback.widget.NonOverlappingLinearLayout
style="?attr/guidedActionItemContainerStyle"
xmlns:android="http://schemas.android.com/apk/res/android">
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/progressBar"
@@ -30,13 +32,17 @@
<android.support.v17.leanback.widget.NonOverlappingLinearLayout
android:id="@+id/guidedactions_item_content"
style="?attr/guidedActionItemContentStyle">
style="?attr/guidedActionItemContentStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/guidedactions_item_title"
style="?attr/guidedActionItemTitleStyle"
android:text="Processing..."/>
android:text="Processing..."
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</android.support.v17.leanback.widget.NonOverlappingLinearLayout>
</android.support.v17.leanback.widget.NonOverlappingLinearLayout>
</android.support.v17.leanback.widget.NonOverlappingLinearLayout>

View File

@@ -41,4 +41,7 @@
<color name="detail_view_actionbar_background">#04549D</color>
<color name="detail_view_background">#0374BF</color>
<color name="detail_view_related_background">#022A4E</color>
<color name="guidedstep_actions_background">#C03800</color>
<color name="guidedstep_dialog_actions_background">#263238</color>
</resources>

View File

@@ -18,14 +18,6 @@
<style name="AppTheme" parent="@style/Theme.Leanback">
</style>
<style name="WizardActionsContainerStyle" parent="Widget.Leanback.GuidedActionsContainerStyle">
<item name="android:background">#C03800</item>
</style>
<style name="DialogActionsContainerStyle" parent="Widget.Leanback.GuidedActionsContainerStyle">
<item name="android:background">#263238</item>
</style>
<!-- Various movie card styles. Used in cards example. -->
<style name="MovieCardBadgeStyle" parent="Widget.Leanback.ImageCardView.BadgeStyle">
<item name="android:src">@drawable/stars_red</item>

View File

@@ -35,11 +35,15 @@
</style>
<style name="Theme.Example.LeanbackWizard" parent="Theme.Leanback.GuidedStep">
<item name="guidedActionsContainerStyle">@style/WizardActionsContainerStyle</item>
<item name="guidedActionsBackground">@color/guidedstep_actions_background</item>
</style>
<style name="Theme.Example.LeanbackWizard.NoSelector">
<item name="guidedActionsSelectorDrawable">@null</item>
</style>
<style name="Theme.Example.LeanbackDialog" parent="Theme.Leanback.GuidedStep">
<item name="guidedActionsContainerStyle">@style/DialogActionsContainerStyle</item>
<item name="guidedActionsBackground">@color/guidedstep_dialog_actions_background</item>
</style>
<style name="Theme.Example.LeanbackPreferences" parent="Theme.Leanback">