Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
5b56fcbc
Commit
5b56fcbc
authored
8 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
TV: showMediaDetail util method
parent
6f62d7aa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
+13
-10
13 additions, 10 deletions
vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
with
13 additions
and
10 deletions
vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
+
13
−
10
View file @
5b56fcbc
...
...
@@ -21,6 +21,7 @@
package
org.videolan.vlc.gui.tv
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.support.v17.leanback.widget.Row
;
...
...
@@ -42,15 +43,10 @@ public class TvUtil {
if
(
mediaWrapper
.
getType
()
==
MediaWrapper
.
TYPE_VIDEO
)
{
VideoPlayerActivity
.
start
(
activity
,
mediaWrapper
.
getUri
(),
MediaUtils
.
getMediaTitle
(
mediaWrapper
));
}
else
if
(
mediaWrapper
.
getType
()
==
MediaWrapper
.
TYPE_AUDIO
)
{
Intent
intent
=
new
Intent
(
activity
,
DetailsActivity
.
class
);
// pass the item information
intent
.
putExtra
(
"item"
,
new
MediaItemDetails
(
mediaWrapper
.
getTitle
(),
mediaWrapper
.
getArtist
(),
mediaWrapper
.
getAlbum
(),
mediaWrapper
.
getLocation
(),
mediaWrapper
.
getArtworkURL
()));
activity
.
startActivity
(
intent
);
showMediaDetail
(
activity
,
mediaWrapper
);
}
else
if
(
mediaWrapper
.
getType
()
==
MediaWrapper
.
TYPE_DIR
){
Intent
intent
=
new
Intent
(
activity
,
VerticalGridActivity
.
class
);
intent
.
putExtra
(
MainTvActivity
.
BROWSER_TYPE
,
MainTvActivity
.
HEADER_NETWORK
);
// intent.putExtra(SortedBrowserFragment.KEY_URI, mediaWrapper.getLocation());
intent
.
setData
(
mediaWrapper
.
getUri
());
activity
.
startActivity
(
intent
);
}
...
...
@@ -62,11 +58,18 @@ public class TvUtil {
}
}
public
static
void
showMediaDetail
(
Context
activity
,
MediaWrapper
mediaWrapper
)
{
Intent
intent
=
new
Intent
(
activity
,
DetailsActivity
.
class
);
intent
.
putExtra
(
"item"
,
new
MediaItemDetails
(
mediaWrapper
.
getTitle
(),
mediaWrapper
.
getArtist
(),
mediaWrapper
.
getAlbum
(),
mediaWrapper
.
getLocation
(),
mediaWrapper
.
getArtworkURL
()));
activity
.
startActivity
(
intent
);
}
public
static
void
browseFolder
(
Activity
activity
,
long
type
,
Uri
uri
)
{
Intent
intent
=
new
Intent
(
activity
,
VerticalGridActivity
.
class
);
intent
.
putExtra
(
MainTvActivity
.
BROWSER_TYPE
,
type
);
intent
.
setData
(
uri
);
activity
.
startActivity
(
intent
);
Intent
intent
=
new
Intent
(
activity
,
VerticalGridActivity
.
class
);
intent
.
putExtra
(
MainTvActivity
.
BROWSER_TYPE
,
type
);
intent
.
setData
(
uri
);
activity
.
startActivity
(
intent
);
}
public
static
void
playAudioList
(
Activity
activity
,
ArrayList
<
MediaWrapper
>
list
,
int
position
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment