| 1 |
package ${packageName}; |
| 2 |
|
| 3 |
import java.util.ArrayList; |
| 4 |
import java.util.List; |
| 5 |
|
| 6 |
public final class MovieList { |
| 7 |
public static final String MOVIE_CATEGORY[] = { |
| 8 |
"Category Zero", |
| 9 |
"Category One", |
| 10 |
"Category Two", |
| 11 |
"Category Three", |
| 12 |
"Category Four", |
| 13 |
"Category Five", |
| 14 |
}; |
| 15 |
|
| 16 |
public static List<Movie> list; |
| 17 |
|
| 18 |
public static List<Movie> setupMovies() { |
| 19 |
list = new ArrayList<Movie>(); |
| 20 |
String title[] = { |
| 21 |
"Zeitgeist 2010_ Year in Review", |
| 22 |
"Google Demo Slam_ 20ft Search", |
| 23 |
"Introducing Gmail Blue", |
| 24 |
"Introducing Google Fiber to the Pole", |
| 25 |
"Introducing Google Nose" |
| 26 |
}; |
| 27 |
|
| 28 |
String description = "Fusce id nisi turpis. Praesent viverra bibendum semper. " |
| 29 |
+ "Donec tristique, orci sed semper lacinia, quam erat rhoncus massa, non congue tellus est " |
| 30 |
+ "quis tellus. Sed mollis orci venenatis quam scelerisque accumsan. Curabitur a massa sit " |
| 31 |
+ "amet mi accumsan mollis sed et magna. Vivamus sed aliquam risus. Nulla eget dolor in elit " |
| 32 |
+ "facilisis mattis. Ut aliquet luctus lacus. Phasellus nec commodo erat. Praesent tempus id " |
| 33 |
+ "lectus ac scelerisque. Maecenas pretium cursus lectus id volutpat."; |
| 34 |
|
| 35 |
String videoUrl[] = { |
| 36 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Zeitgeist/Zeitgeist%202010_%20Year%20in%20Review.mp4", |
| 37 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Demo%20Slam/Google%20Demo%20Slam_%2020ft%20Search.mp4", |
| 38 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Gmail%20Blue.mp4", |
| 39 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Fiber%20to%20the%20Pole.mp4", |
| 40 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Nose.mp4" |
| 41 |
}; |
| 42 |
String bgImageUrl[] = { |
| 43 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Zeitgeist/Zeitgeist%202010_%20Year%20in%20Review/bg.jpg", |
| 44 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Demo%20Slam/Google%20Demo%20Slam_%2020ft%20Search/bg.jpg", |
| 45 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Gmail%20Blue/bg.jpg", |
| 46 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Fiber%20to%20the%20Pole/bg.jpg", |
| 47 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Nose/bg.jpg", |
| 48 |
}; |
| 49 |
String cardImageUrl[] = { |
| 50 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Zeitgeist/Zeitgeist%202010_%20Year%20in%20Review/card.jpg", |
| 51 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Demo%20Slam/Google%20Demo%20Slam_%2020ft%20Search/card.jpg", |
| 52 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Gmail%20Blue/card.jpg", |
| 53 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Fiber%20to%20the%20Pole/card.jpg", |
| 54 |
"http://commondatastorage.googleapis.com/android-tv/Sample%20videos/April%20Fool's%202013/Introducing%20Google%20Nose/card.jpg" |
| 55 |
}; |
| 56 |
|
| 57 |
list.add(buildMovieInfo("category", title[0], |
| 58 |
description, "Studio Zero", videoUrl[0], cardImageUrl[0], bgImageUrl[0])); |
| 59 |
list.add(buildMovieInfo("category", title[1], |
| 60 |
description, "Studio One", videoUrl[1], cardImageUrl[1], bgImageUrl[1])); |
| 61 |
list.add(buildMovieInfo("category", title[2], |
| 62 |
description, "Studio Two", videoUrl[2], cardImageUrl[2], bgImageUrl[2])); |
| 63 |
list.add(buildMovieInfo("category", title[3], |
| 64 |
description, "Studio Three", videoUrl[3], cardImageUrl[3], bgImageUrl[3])); |
| 65 |
list.add(buildMovieInfo("category", title[4], |
| 66 |
description, "Studio Four", videoUrl[4], cardImageUrl[4], bgImageUrl[4])); |
| 67 |
|
| 68 |
return list; |
| 69 |
} |
| 70 |
|
| 71 |
private static Movie buildMovieInfo(String category, String title, |
| 72 |
String description, String studio, String videoUrl, String cardImageUrl, |
| 73 |
String bgImageUrl) { |
| 74 |
Movie movie = new Movie(); |
| 75 |
movie.setId(Movie.getCount()); |
| 76 |
Movie.incCount(); |
| 77 |
movie.setTitle(title); |
| 78 |
movie.setDescription(description); |
| 79 |
movie.setStudio(studio); |
| 80 |
movie.setCategory(category); |
| 81 |
movie.setCardImageUrl(cardImageUrl); |
| 82 |
movie.setBackgroundImageUrl(bgImageUrl); |
| 83 |
movie.setVideoUrl(videoUrl); |
| 84 |
return movie; |
| 85 |
} |
| 86 |
} |