SupportLeanbackShowcase: Fixed the crash/background color/selector in Guided Step
Wizard view Guided Action layout have gone through changes that caused "Rent" action to fail in the example wizard view. Added layout_width and layout_height to all the containers, as well as a changing "addSharedElement" in "TransitionsHelper" in leanback support library. Background color was added & action selector (while loading a video) was removed by defining new themes. Change-Id: Ia296e02720513edaea1d4197aacb5b4f88776545
This commit is contained in:
@@ -51,14 +51,15 @@ public class WizardExample3rdStepFragment extends WizardExampleBaseStepFragment
|
|||||||
return R.layout.wizard_progress_action_item;
|
return R.layout.wizard_progress_action_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int onProvideLayoutId() {
|
|
||||||
return R.layout.wizard_progress_action_container;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
return stylist;
|
return stylist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int onProvideTheme() {
|
||||||
|
return R.style.Theme_Example_LeanbackWizard_NoSelector;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
|
|||||||
@@ -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>
|
|
||||||
@@ -16,7 +16,9 @@
|
|||||||
-->
|
-->
|
||||||
<android.support.v17.leanback.widget.NonOverlappingLinearLayout
|
<android.support.v17.leanback.widget.NonOverlappingLinearLayout
|
||||||
style="?attr/guidedActionItemContainerStyle"
|
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
|
<ProgressBar
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
@@ -30,12 +32,16 @@
|
|||||||
|
|
||||||
<android.support.v17.leanback.widget.NonOverlappingLinearLayout
|
<android.support.v17.leanback.widget.NonOverlappingLinearLayout
|
||||||
android:id="@+id/guidedactions_item_content"
|
android:id="@+id/guidedactions_item_content"
|
||||||
style="?attr/guidedActionItemContentStyle">
|
style="?attr/guidedActionItemContentStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/guidedactions_item_title"
|
android:id="@+id/guidedactions_item_title"
|
||||||
style="?attr/guidedActionItemTitleStyle"
|
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>
|
||||||
|
|
||||||
|
|||||||
@@ -41,4 +41,7 @@
|
|||||||
<color name="detail_view_actionbar_background">#04549D</color>
|
<color name="detail_view_actionbar_background">#04549D</color>
|
||||||
<color name="detail_view_background">#0374BF</color>
|
<color name="detail_view_background">#0374BF</color>
|
||||||
<color name="detail_view_related_background">#022A4E</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>
|
</resources>
|
||||||
|
|||||||
@@ -18,14 +18,6 @@
|
|||||||
<style name="AppTheme" parent="@style/Theme.Leanback">
|
<style name="AppTheme" parent="@style/Theme.Leanback">
|
||||||
</style>
|
</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. -->
|
<!-- Various movie card styles. Used in cards example. -->
|
||||||
<style name="MovieCardBadgeStyle" parent="Widget.Leanback.ImageCardView.BadgeStyle">
|
<style name="MovieCardBadgeStyle" parent="Widget.Leanback.ImageCardView.BadgeStyle">
|
||||||
<item name="android:src">@drawable/stars_red</item>
|
<item name="android:src">@drawable/stars_red</item>
|
||||||
|
|||||||
@@ -35,11 +35,15 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Example.LeanbackWizard" parent="Theme.Leanback.GuidedStep">
|
<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>
|
||||||
|
|
||||||
<style name="Theme.Example.LeanbackDialog" parent="Theme.Leanback.GuidedStep">
|
<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>
|
||||||
|
|
||||||
<style name="Theme.Example.LeanbackPreferences" parent="Theme.Leanback">
|
<style name="Theme.Example.LeanbackPreferences" parent="Theme.Leanback">
|
||||||
|
|||||||
Reference in New Issue
Block a user