Commit Graph

22 Commits

Author SHA1 Message Date
Keyvan Amiri
64cae78d53 SupportLeanbackShowcase: Added new credit card workflow and theme
background for the wizard view

Created a payment workflow consisting of a set of fragments for
entering & adding new credit card information (checks in place
for validity of the card number as well as expiration date).
Also, changed the dropdown subaction's background colors to
be consistent with the rest of guided step fragment view.
Fixed the back key pressed to "not" exit the entire wizard on the last
fragment (it not goes back to the payment fragment section when back
button is pressed).

Change-Id: I39cf316f09b765cffbd0a7e012539c49dbe238ed
2016-02-09 18:20:57 -08:00
Keyvan Amiri
285adeccf2 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
2016-02-09 18:08:31 -08:00
Keyvan Amiri
329cd510f0 SupportLeanbackShowcase: Provided context for calls to
GuidedAction.Builder

GuidedActions were created without the activity argument in the old
version; updated the API calls to use their context within the fragment.

Change-Id: I4b3433f9e0cdfe5fa84a56a78413c219fbc4d939
2016-02-09 18:06:18 -08:00
Keyvan Amiri
5abd85c64e SupportLeanbackShowcase: Changed styles into new theme APIs
The card styles are  converted into themes, and in the
ImageCardViewPresenter, each ImageCardView is generated through the use
of the resource ID of each specific theme.
This is to conform to the latest widget API change which moved a set of
attributes to theme for customizing widgets.

Bug: 26249596
Change-Id: Id64aeebb96bee13c6cb68f8ab69cacdfb9a98531
2016-02-03 15:58:27 -08:00
Keyvan Amiri
32be3d30dc Fixed the video view crash in SupportLeanbackShowcase master build
The "Video consumption Examples" view in SupportLeanBackShowcase was failing on
the master build (fugu-userdebug N AAC30 2573265 devkeys),
since onCreate gets called in the reverse order of fragments' appearence in the
code when using a single transaction.
Fixed that by using separate transactions per fragment addition, and now the
example video view works on the master build as well as the LMP-MR1 build.

Bug: 26894030

Change-Id: Ic020cb87049af7e2095387ca1aab017f2b026630
2016-02-01 15:00:29 -08:00
Keyvan Amiri
4e89da7764 SupportLeanbackShowcase: update support library version
update android support library to 23.1.1

Change-Id: Ibf50836110dea71992946214ab5c9578582ffd84
2016-01-28 10:51:34 -08:00
Dake Gu
2157e7f4ec SupportLeanbackShowcase: get rid of card view background overdraw
Change-Id: I3a46d34df265eda2cf38bfca80d3786aa5a8a23b
2015-10-08 11:59:50 -07:00
Dake Gu
0750ff8d6b SupportLeanbackShowcase: performance fix of ImageCardView resource
Use Picasso to load Image in background thread instead of decoding
Bitmap in UI thread.

Change-Id: Ib798d167108f8445b3898cab72dc7dfabfe13c8a
2015-10-06 13:46:42 -07:00
Dake Gu
7d120188ca SupportLeanbackShowcase: dont expand side info
Transition animation isn't right.  Browse fragment hasn't implemented
the pre-layout for row children horizontal layout change.

Change-Id: Ib4f55651c3f568ad9224c474036663f35935c4e3
2015-10-05 18:15:17 -07:00
Dake Gu
c8ad1e5263 Leanback Demo: demo of edit title
Bug 24673827

Change-Id: I1e4d9378cc862d748055387a71129692bd4cf53b
2015-10-05 14:21:47 -07:00
Dake Gu
6fe262dae9 Supportleanbackshowcase: Polishing 2 and transition performance fix
Move background of browse/details/music from layout to windowBackground.
Setting background on view will cause the whole RelativeLayout being
faded in while transition move content inside the RelativeLayout.
The RelativeLayout does not have a hardwarelayer, nor does it specify
hasOverlappingRendering=false.  This falls to the slowest rendering
path.

Change-Id: I78bacc965e641d7f960aae5cf212c29f6b1f0f11
2015-10-01 15:10:07 -07:00
Dake Gu
ab2a8a7dae Supportleanbackshowcase: Polishing
Support staggered slide in/out transition for VerticalGrid.

Move background from layout file to windowBackground in theme.  Defining
background on view conflicts with transitions.

Change-Id: If823f492fd5bdd0b16c1d1e735f4214f925f3ae3
2015-10-01 14:36:25 -07:00
Dake Gu
5bf3eba9dd Showcase: Update SDK to 23 and support lib to 23.0.1
Updated for new API addAsRoot() for GuidedStepFragment.
Rmove the awkward setStep() call,  we can find current GuidedStepFragment
using standard API.

Change-Id: I7ecb108a36ab5d0091c230dd5c5686e3a91f1857
2015-10-01 12:59:41 -07:00
Robert Hahn
e6b72719a8 Added Transitions and minor code clean up
Added support for the DetailView Activity
transition. The DetailView can now be started
from the launcher or the Cards example.

Added support for Browse entrance transition.

Minor code clean up such as renaming
GridExample fragment to GridExampleFragment
and removing unused methods.

Change-Id: Ib1c11af82be5b858960e243acd7f11ce8dbd06f7
2015-08-24 10:51:57 -07:00
Robert Hahn
742e2682a9 WIP: Added transitions to MainFragment.
In order to show how to use transitions, they
have been added to the MainFragment. Thus the
transitions are used when an example gets opened.

Change-Id: I9703c7832a2d2ef2a09ddb91e1676dfc1ac4f24a
2015-08-06 15:37:56 -07:00
Robert Hahn
26b7df1102 Polished Grid example and added a few missing details at
Launcher fragment. Video- and Music examples now also use
an Activity. BackgroundHandler in MainFragment removed.

Removed unused Log-Tag field and added correct background.
Changed Grid Zoom factor.
Moved Grid- and Card example to their own packages and
they now are started using an Activity.
Launcher fragment uses correct primaryColor and its row
has been lowered.
Music and Video consumption example are using Activities
as well. Thus BackgroundManager in MainFragment is
unnecessair, which is why it got removed.

Change-Id: I928614314677706f19e648666697f0a710d88e0a
2015-08-05 19:10:12 -07:00
Robert Hahn
aeedeb7d60 Cleaned up strings.xml
Removed unused strings.

Change-Id: I4752b86795a0b03b7de33bad3d736ba3ab2d8392
2015-08-05 10:24:20 -07:00
Robert Hahn
63e8181cee Removed Browsing example from Showcase app
There are no plans for now to show a
browsing example which is why it can be
removed for now. There was no code written
so far for this example.

Change-Id: I0580021ddc0f385d616074c61cc1c449e75357ad
2015-08-05 10:16:38 -07:00
Robert Hahn
80116aacde Polished Wizard example for Showcase app
Extracted Strings, added JavaDoc,
refactored the call of the second Wizard
screen to be less error-prone code.

Change-Id: Ib8a8af7019818b29d71ee1bed1cac3e2b56e8c11
2015-08-05 10:04:31 -07:00
Robert Hahn
9f8ccdc5af Rearranged classes and removed unused
resources.

Rearranged classes into packages to
provide a better overview as well as
removing an unused mp3 file.

Change-Id: I9e3b63ceef919d6f0d57479260c93376578793cf
2015-08-04 14:58:39 -07:00
Robert Hahn
8dd090f514 Cleanup and usage of new ImageCardView
The Showcase app now makes use of the new
ImageCardView which is stylable through
XML and uses less Views.
Cleaned up DetailView.
Cleaned up styles and layouts.
Added Copyright notices.

Change-Id: Ib37485d5b57be6a0f4b5321ac61b41a0808eaf35
2015-08-04 14:04:14 -07:00
Robert Hahn
63dcb5b4bd Implemented Card-, DetailView-, GridView-, Music- & Video,
Wizard-, Dialog examples

The Launcher card needs to be animated. When expanding cards
with an animation some animation artifacts might occur since the
transition system moves the cards to be centered again. Thus, the
two animations are competing with each other. Currently I'm waiting
for a change on leanback's transition system or another way to
animate cards.
Another animation artifact occurs when collapsing the SideInfo-cards,
which I hope to be resolved once we clarified how to do proper card
animations in the framework.
There are some minor issues with in the DetailView since some API
methods are missing for customization such as setting the details-
and ActionBars background color.
Removed obsolete package.
Finished music example.
Finished video example.
Bug 22362006
Added Dialog example.
WIP Testing new ImageCardView XML styling.
WIP Settings example.
WIP Wizard example.
Finished Dialog example.
Gradle uses environment variable to reference support libraries.

Change-Id: I8f911d2e5aeb1fb8764f45d20fda1dc0fc69773a
2015-07-22 17:48:26 -07:00