Commit Graph

51 Commits

Author SHA1 Message Date
Dake Gu
3a1d9d5f06 Merge changes Ife2ffbed,I3bd8b266 into nyc-dev
* changes:
  Showcase app: added a video playing at the end of GuidedStepFragment workflow
  Showcase app: Fixed video fragment not showing video. Updated Settings and deprecated APIs for the app to be installable on L.
2016-05-13 17:42:06 +00:00
Dake Gu
097514b34c Merge "SupportLeanbackshowcase: clean up preference fragment code" into nyc-dev 2016-05-13 17:41:41 +00:00
Susnata Basak
b94abc7c9c Merge "Added missing licensing information in source files." into nyc-dev 2016-05-13 16:47:30 +00:00
Keyvan Amiri
13ceed33b4 Showcase app: added a video playing at the end of GuidedStepFragment
workflow

Now, after the user clicks on 'Watch Now', the sample video from the
"Video Consumption Examples" fragment will start playing, and on
back-press, they will be forwarded back to the Showcase app home screen.

Change-Id: Ife2ffbed1ed00a52df0a9cff4ab41a5868adee3d
2016-05-12 15:42:54 -07:00
Keyvan Amiri
64e78adc19 Showcase app: Fixed video fragment not showing video. Updated Settings
and deprecated APIs for the app to be installable on L.

Video player was not being prepared for asynchronous playing after the
media source was set. Used the same preparation module for both the
Music and Video players.
Also, updated Settings to include a switch widget. Depredatecd some of
the APIs to level 1 to be able to install app on L.

Change-Id: I3bd8b266be028e80d87367a2c3c8a8174e924b92
2016-05-12 15:15:18 -07:00
susnata
5e291a4981 Added missing licensing information in source files.
Change-Id: I0065ff1eebae17f2aaf4be252e61a0dc379cbe93
2016-05-12 14:28:06 -07:00
Dake Gu
15f4055a2e SupportLeanbackshowcase: update songs and metadata
Change-Id: Ic57ba25f9ced69d3cbba3d31f3c6a701af141367
2016-05-12 12:07:39 -07:00
Dake Gu
2672623e1d SupportLeanbackshowcase: clean up preference fragment code
Remove the dialog code and the problematic stack.
Make fragment public static.

Change-Id: I3ebda40e6778d206d494429797d7cd6f15c580f4
2016-05-12 11:25:26 -07:00
Dake Gu
15f5a3351f SupportLeanbackShowcase: bring gradle, build tools, lib up to date
Change-Id: I829aba8ca84065efda5aa37976067010c6adc1cb
2016-05-10 11:04:32 -07:00
Dake Gu
de41d1a459 SupportLeanbackShowcase: add Android.mk
Workaround two problems:

Bug 28138876: gradle build resource id crash after the AAPT2 change
in support library.

Bug 28672886: N preview emulator is too slow, built with prebuilt
to install on 23 emulator.

Change-Id: I810ab659af030d49ee503f4b28ad4bf7a34c4097
2016-05-10 02:42:08 -07:00
Keyvan Amiri
f797f525ce Showcase app: Added media row actions to the music fragment
With the latest support for custom actions from leanback support, showcase
app now demos Playlist and Favorite action buttons for each media item
row. Upon favoriting a song, the media row is highlighted with a
different color. Also, clicking on song details will start playing that
song.

Change-Id: I59111563bebea3b0bf28e12d74f71421dc971f88
2016-05-09 16:32:03 -07:00
susnata
e035b113c3 Renaming title for couple rows in CardExampleFragment.
Change-Id: I8abaf2b54e87c1dca0a90dfbbecc89d680494f64
2016-05-06 14:28:38 -07:00
susnata
b428b11e14 Switching launcher icon for page fragment.
Change-Id: I8beee5eb3addf586b9b5906b8a1a9db81991ed9f
2016-05-05 16:57:36 -07:00
susnata
cc5ee26603 Adding custom title view example in Showcase sample.
Also, fixed NLP issues in PageAndListRowFragment.

Change-Id: I34a3040548aa533cd6b0655e29bc3d8b37edbc5d
2016-05-05 15:32:40 -07:00
Susnata Basak
408d87e161 Merge "Adding differnet PageFragment samples to ShowcaseApp." into nyc-dev 2016-04-28 22:25:39 +00:00
susnata
4af086636a Adding differnet PageFragment samples to ShowcaseApp.
Change-Id: I9e14fbb13d211645be6f1d224893791ebf2b1b16
2016-04-28 13:53:42 -07:00
Dake Gu
5ece1ab74e SupportLeanbackShowcase: add Section and Divider
Add section, divider in CardExampleFragment, changed
row title to be relavant to how card is customized.

Bug 28398979

Change-Id: I801090d9977bb4ed9f5fa147a7db113a9c084dbb
2016-04-27 17:18:33 -07:00
Dake Gu
a31ba75038 SupportLeanbackShowcase: remove properietary resources
Bug 28271003

Change-Id: I638ef7ce638e2fb41d0fb7b776e522ff04fa0dd4
2016-04-27 15:44:33 -07:00
susnata
a2d0a51beb Fixing PresenterSelector implementation for CardSampleFragment.
Bug: 28398979
Change-Id: I990c506d18c694d28176f09ea3936eea5d36740c
2016-04-26 14:25:08 -07:00
susnata
cff3b41c42 Fixing NPE + Compilation issue with Showcase sample app.
Change-Id: Id43211811f7acfdbf545fbb177022756f50e15f6
2016-04-26 10:59:12 -07:00
Susnata Basak
f2d42b2ec3 Merge "Adding sample page/row fragments in Showcase sample." into nyc-dev 2016-04-13 22:09:57 +00:00
susnata
5704b6f0b0 Adding sample page/row fragments in Showcase sample.
Change-Id: I0a697b2608febbd56b898759afe547af44e8aa1e
2016-04-13 14:39:37 -07:00
Dake Gu
e868d82428 SupportLeanbackShowcase: Export Activities
So they can be launched from adb.

Change-Id: I84df2ad7759fe422aace9670b1d0a336f37289ec
2016-04-12 12:15:32 -07:00
Susnata Basak
aac405d39a Merge "Added the new leanback preferences styling to the Settings Examples" into nyc-dev 2016-04-12 16:28:39 +00:00
Keyvan Amiri
67a918ceef Added the new leanback preferences styling to the Settings Examples
Updated the settings example fragment theme to pick the
latest leanback preference styling.

Change-Id: I0670bfc4a9a3a7ecda2100036dbe7b216a9662d4
2016-04-11 18:02:26 -07:00
Dake Gu
5a21483ab4 Merge "GuidedStepFragment: Fix addAsRoot restoring bug" into mnc-ub-dev
am: cb4a1e3

* commit 'cb4a1e3b03c97374d97f3ac7b5d1cc9b0a11fc4c':
  GuidedStepFragment: Fix addAsRoot restoring bug

Change-Id: Ife415ab7991233f8d46656ab723b774895296ef2
2016-04-01 21:24:46 +00:00
Dake Gu
0af1cf6c97 GuidedStepFragment: Fix addAsRoot restoring bug
Dont re-add root fragment when savedInstanceState can restore
them.

Bug 27972030

Change-Id: I427f171164f60b901c328f17a51349045f04eb50
2016-04-01 13:59:42 -07:00
susnata
91926c0c7d Changing generic parameter name to make it less ambiguous.
Change-Id: I80f634e66533fbce34ed149cbe0eae2a5695adac
2016-03-24 21:14:06 +00:00
susnata
0b8d2f0080 Adding build scripts to SupportLeanbackShowcase app.
Change-Id: I438004a2cd87b739f9d6629a07f77c1262819eb6
2016-03-24 13:58:11 -07:00
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