dhanushka-94 / npr-android-app

Automatically exported from code.google.com/p/npr-android-app
0 stars 0 forks source link

Allow adding segments to playlist without opening detail page #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Allow a user to add segments/programs without going to detail page of segment 
itself.  This could be done by long press, a new button, and/or a menu option 
to "select multiple".

An "already in playlist" indicator of some kind would be cool too.  

Original issue reported on code.google.com by white...@gmail.com on 20 Dec 2010 at 6:24

GoogleCodeExporter commented 8 years ago
Also a 2.0 change. Take a look in the downloads section and you should find a 
couple docs detailing what we are planning.

http://code.google.com/p/npr-android-app/downloads/detail?name=droid_news_spec.p
df

Original comment by jpenn...@gmail.com on 20 Dec 2010 at 5:14

GoogleCodeExporter commented 8 years ago

Original comment by jpenn...@gmail.com on 6 Jan 2011 at 7:46

GoogleCodeExporter commented 8 years ago
I'm working on issue 15 (add a show to queue) but it makes sense to do this 
first...

Per the v2.0 PDF:  What is the difference between shows with a speaker icon and 
a plus?  Plus can be added to the end of the queue while speakers mean audio is 
available.  Is a speaker shown when a story has already been added to the queue?

Original comment by white...@gmail.com on 25 Jan 2011 at 5:58

GoogleCodeExporter commented 8 years ago
So, I'm looking back at those docs and I can't quite remember the distinction. 
Lemme dig back and see if I can figure it out. But I see what you are saying.

Original comment by jpenn...@gmail.com on 27 Jan 2011 at 7:33

GoogleCodeExporter commented 8 years ago
Ok... any GUI layout ideas for this?

I'd like to pad an area around the "add to playlist" plus button.  On some 
menus it can be painful to get your finger on the button (e.g. the android 
browser window list has a minus button that you have to hit juuuust right).

I've added a linear layout to contain the image and had it align top, right, 
and bottom as well as fill_parent in the vertical.

Original comment by white...@gmail.com on 2 Feb 2011 at 5:07

Attachments:

GoogleCodeExporter commented 8 years ago
In both 1.x and 2.x branches several simple functions need to be run under an 
instance of NewsStoryActivity (e.g. play(); getplayable()).  In order to make 
add from story list (and add all) I need to add to the playlist without 
bringing up the full gui of the NewsStory.xml format.  

Can more of this be pushed into the playlistentry or the new media service?  
Maybe a new class which extends Story and handles the play/enqueue of stories?  
At first glance a Story.playme() seems awesome but the Story class is purely 
(it appears to me!) parsing the NPR API (which seems right).

My current thought is to move the non-GUI parts of NewsStoryActivity.onCreate() 
into a constructor; then I can instantiate the NewsStoryActivity class from the 
NewsStoryList and call play() all without bringing up the story detail page.  
However, this seems hackish to me.

Original comment by white...@gmail.com on 8 Feb 2011 at 2:46

GoogleCodeExporter commented 8 years ago
The screen shot looks good. There are some assets in 
http://code.google.com/p/npr-android-app/downloads/detail?name=NPR%20assets.zip&
can=2&q= that I think Thomas pulled out of the PSD files (which are also in the 
downloads). These graphics might match a little better? Not sure, that I can 
see that well, but throwing it out there.

As for the code structure, I don't feel that the NewsStoryActivity should be 
involved in Playlist management. Can you just access the PlaylistProvider 
directly by instantiating it in the list view? The pattern here, as you say, 
looks like the API classes are DTO's, not active record model, so persistence 
is handled by the provider not the Story class.

Original comment by jeremy.w...@gmail.com on 8 Feb 2011 at 6:16

GoogleCodeExporter commented 8 years ago
the methods in NewsStoryActivity, such as playStory getPlayable and 
getPlayableUrl *would* need to be duplicated under NewsListActivity. In the 
interests of DRY, I suggest that the functions getPlayable, isPlayable (in 
NewsListActivity) and getPlayableUrl be moved from all the activities down into 
the model on the Story object. 

However, playStory is specific to the activity and should stay there. It's 
going to be a little different signature under NewsListActivity so I'd say 
adapt it.

By the way, I'm about to push a HUGE set of changes to the UI to bring in the 
2.0 styles and assets. Happy to have any work you've done there if you can 
submit a patch or codereview, so we can include this.

Original comment by jeremy.w...@gmail.com on 10 Feb 2011 at 5:18

GoogleCodeExporter commented 8 years ago

Original comment by jeremy.w...@gmail.com on 10 Feb 2011 at 5:20

GoogleCodeExporter commented 8 years ago
I've been expecting that ;-).  All I've really done so far is update the GUI.  
I looked into the code but as discussed 1.x is really different from 2.x.  I 
can put out the patch for what I have.

Original comment by white...@gmail.com on 10 Feb 2011 at 5:23

GoogleCodeExporter commented 8 years ago
This is completed in 2.0. You can swipe on a news story item to add it to the 
playist. Long press on an item to play immediately.

Original comment by jeremy.w...@gmail.com on 23 Mar 2011 at 4:02