├── .gitignore
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── github
│ │ └── isuperred
│ │ └── leanbacktvsample
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ ├── Anime.json
│ │ ├── Basketball.json
│ │ ├── Car.json
│ │ ├── Children.json
│ │ ├── Classroom.json
│ │ ├── Clear4k.json
│ │ ├── Documentary.json
│ │ ├── Everything.json
│ │ ├── Featured.json
│ │ ├── Funny.json
│ │ ├── Game.json
│ │ ├── Life.json
│ │ ├── Movie.json
│ │ ├── My.json
│ │ ├── MyTitle.json
│ │ ├── OrientalTheatre.json
│ │ ├── Physical.json
│ │ ├── TVSeries.json
│ │ ├── VIP.json
│ │ ├── Variety.json
│ │ ├── Video.json
│ │ ├── WatchTv.json
│ │ └── Years70.json
│ ├── java
│ │ └── com
│ │ │ └── github
│ │ │ └── isuperred
│ │ │ ├── activity
│ │ │ ├── AppInstalledActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── VideoDetailActivity.java
│ │ │ └── VideoPlayActivity.java
│ │ │ ├── adapter
│ │ │ ├── ContentViewPagerAdapter.java
│ │ │ └── SmartFragmentStatePagerAdapter.java
│ │ │ ├── application
│ │ │ └── MyApplication.java
│ │ │ ├── base
│ │ │ ├── BaseActivity.java
│ │ │ ├── BaseLazyLoadFragment.java
│ │ │ ├── BaseListRowPresenter.java
│ │ │ └── BasePresenterSelector.java
│ │ │ ├── bean
│ │ │ ├── AppInfo.java
│ │ │ ├── Content.java
│ │ │ ├── Footer.java
│ │ │ ├── Title.java
│ │ │ ├── TypeSeven.java
│ │ │ └── Video.java
│ │ │ ├── content
│ │ │ └── ContentPresenterSelector.java
│ │ │ ├── fragment
│ │ │ └── ContentFragment.java
│ │ │ ├── presenter
│ │ │ ├── AppInstalledPresenter.java
│ │ │ ├── EpisodeContentPresenter.java
│ │ │ ├── EpisodeGroupPresenter.java
│ │ │ ├── ImageRowHeaderPresenter.java
│ │ │ ├── TitlePresenter.java
│ │ │ ├── TypeFiveContentPresenter.java
│ │ │ ├── TypeFooterPresenter.java
│ │ │ ├── TypeFourContentPresenter.java
│ │ │ ├── TypeOneContentPresenter.java
│ │ │ ├── TypeSevenContentPresenter.java
│ │ │ ├── TypeSevenPresenter.java
│ │ │ ├── TypeSixContentPresenter.java
│ │ │ ├── TypeThreeContentPresenter.java
│ │ │ ├── TypeTwoContentPresenter.java
│ │ │ ├── TypeZeroContentPresenter.java
│ │ │ └── row
│ │ │ │ ├── ContentListRowPresenter.java
│ │ │ │ ├── TypeFiveListRowPresenter.java
│ │ │ │ └── TypeZeroListRowPresenter.java
│ │ │ ├── utils
│ │ │ ├── Constants.java
│ │ │ ├── FontDisplayUtil.java
│ │ │ └── LocalJsonResolutionUtil.java
│ │ │ └── widgets
│ │ │ ├── AppVerticalGridView.java
│ │ │ ├── ImgConstraintLayout.java
│ │ │ ├── OrderHorizontalGridView.java
│ │ │ ├── ScaleConstraintLayout.java
│ │ │ ├── ScaleTextView.java
│ │ │ ├── TabHorizontalGridView.java
│ │ │ ├── TabVerticalGridView.java
│ │ │ ├── TabViewPager.java
│ │ │ └── focus
│ │ │ ├── FocusHighlightHandler.java
│ │ │ ├── MyFocusHighlightHelper.java
│ │ │ └── MyItemBridgeAdapter.java
│ └── res
│ │ ├── anim
│ │ ├── app_exit_anim_in.xml
│ │ ├── connecting.xml
│ │ ├── danmu_icon_click_effect.xml
│ │ ├── danmu_icon_scale.xml
│ │ ├── dialog_main_hide_amination.xml
│ │ ├── dialog_main_show_amination.xml
│ │ ├── dialog_root_hide_amin.xml
│ │ ├── dialog_root_show_amin.xml
│ │ ├── douban_dialog_in.xml
│ │ ├── douban_dialog_out.xml
│ │ ├── fade_in.xml
│ │ ├── fade_in_zoom_in.xml
│ │ ├── fade_in_zoom_into_orig.xml
│ │ ├── fade_out.xml
│ │ ├── fade_out_zoom_in.xml
│ │ ├── fade_out_zoom_out.xml
│ │ ├── host_cycle.xml
│ │ ├── host_shake.xml
│ │ ├── host_shake_y.xml
│ │ ├── inav_app_exit_anim_in.xml
│ │ ├── live_award_slide_out_top.xml
│ │ ├── live_star_slide_in_right.xml
│ │ ├── live_star_slide_out_left.xml
│ │ ├── menu_dialog_in.xml
│ │ ├── menu_dialog_out.xml
│ │ ├── multi_mode_dialog_in.xml
│ │ ├── multi_mode_dialog_out.xml
│ │ ├── passport_expand_in.xml
│ │ ├── passport_expand_out.xml
│ │ ├── passport_ott_rotate_inverse.xml
│ │ ├── passport_shrink_in.xml
│ │ ├── passport_shrink_out.xml
│ │ ├── passport_slide_down_in.xml
│ │ ├── passport_slide_down_out.xml
│ │ ├── passport_slide_up_in.xml
│ │ ├── passport_slide_up_out.xml
│ │ ├── shake_rotate.xml
│ │ ├── share_cycle.xml
│ │ ├── toast_dialog_in.xml
│ │ ├── toast_dialog_out.xml
│ │ ├── tui_alert_dialog_enter.xml
│ │ ├── tui_alert_dialog_exit.xml
│ │ ├── tui_dialog_enter_anim.xml
│ │ ├── tui_dialog_exit_anim.xml
│ │ ├── xuanji_dialog_in.xml
│ │ ├── xuanji_dialog_out.xml
│ │ ├── yingshi_activity_enter_300.xml
│ │ └── yingshi_activity_out_300.xml
│ │ ├── drawable-mdpi-v4
│ │ ├── capsule_bg_unfocus.9.png
│ │ ├── capsule_button_focus.9.png
│ │ ├── focus_oval_bg.9.png
│ │ ├── focus_pause.9.png
│ │ ├── focus_selector.9.png
│ │ ├── home_tab_focus.9.png
│ │ ├── ic_ok_normal.png
│ │ ├── ic_skip_normal.png
│ │ ├── ic_skip_normal_right.png
│ │ ├── module_item_focus_raw.9.png
│ │ ├── video_error_big.png
│ │ ├── video_error_small.png
│ │ ├── wave_black.xml
│ │ ├── wave_black1.png
│ │ ├── wave_black2.png
│ │ ├── wave_black3.png
│ │ ├── wave_black4.png
│ │ ├── wave_black5.png
│ │ ├── wave_blue.xml
│ │ ├── wave_blue1.png
│ │ ├── wave_blue2.png
│ │ ├── wave_blue3.png
│ │ ├── wave_blue4.png
│ │ ├── wave_blue5.png
│ │ ├── wave_white.xml
│ │ ├── wave_white1.png
│ │ ├── wave_white2.png
│ │ ├── wave_white3.png
│ │ ├── wave_white4.png
│ │ ├── wave_white5.png
│ │ └── yingshi_home_item_bg_mask.9.png
│ │ ├── drawable-xhdpi-v4
│ │ ├── back_to_top.png
│ │ ├── back_top_top.png
│ │ ├── bg_danmu_arrow_left.png
│ │ ├── bg_danmu_arrow_right.png
│ │ ├── bg_danmu_pop.9.png
│ │ ├── bg_danmu_pop_arrow.png
│ │ ├── bg_danmu_pop_down.9.png
│ │ ├── bg_danmu_pop_up.9.png
│ │ ├── bg_danmu_pop_up_arrow.png
│ │ ├── bg_danmu_up_arrow_left.png
│ │ ├── bg_danmu_up_arrow_right.png
│ │ ├── bg_new_danma_msg.png
│ │ ├── bundle_bg.jpg
│ │ ├── common_view_focus_shadow_normal.9.png
│ │ ├── damu_star_mark.png
│ │ ├── danmaku_back.png
│ │ ├── danmaku_character_left_bg.png
│ │ ├── danmaku_color_member.png
│ │ ├── danmaku_color_vip.png
│ │ ├── danmaku_position_scroll.png
│ │ ├── danmaku_position_scroll_checked.png
│ │ ├── danmaku_position_top.png
│ │ ├── danmaku_position_top_checked.png
│ │ ├── danmaku_setting_btn.png
│ │ ├── danmaku_vip.png
│ │ ├── danmaku_write_icon.png
│ │ ├── danmu_cosplay_default_avatar.png
│ │ ├── danmu_dialog_edit_bg.9.png
│ │ ├── danmu_dialog_edit_question_bg.9.png
│ │ ├── danmu_lh_dialog_cancel.png
│ │ ├── danmu_lh_dialog_hate_icon_disabled.png
│ │ ├── danmu_lh_dialog_hate_icon_selected.png
│ │ ├── danmu_lh_dialog_hate_icon_unchecked.png
│ │ ├── danmu_lh_dialog_like_icon_disabled.png
│ │ ├── danmu_lh_dialog_like_icon_selected.png
│ │ ├── danmu_lh_dialog_like_icon_unchecked.png
│ │ ├── danmu_lh_dialog_like_plus_one.png
│ │ ├── danmu_like_flag_icon.png
│ │ ├── danmu_setting_banned_word_disabled.png
│ │ ├── danmu_setting_banned_word_enabled.png
│ │ ├── danmu_setting_filter_bottom.png
│ │ ├── danmu_setting_filter_bottom_disabled.png
│ │ ├── danmu_setting_filter_color.png
│ │ ├── danmu_setting_filter_color_disabled.png
│ │ ├── danmu_setting_filter_top.png
│ │ ├── danmu_setting_filter_top_disabled.png
│ │ ├── dialog_background.9.png
│ │ ├── ethernet.png
│ │ ├── gift.png
│ │ ├── history.png
│ │ ├── ic_danmu_settings_banned_word.png
│ │ ├── ic_danmu_settings_banned_word_delet.png
│ │ ├── icon_danmaku_close_popup.png
│ │ ├── icon_danmaku_cosplay_bootom_normal.png
│ │ ├── icon_danmaku_cosplay_bootom_selected.png
│ │ ├── icon_danmaku_question.png
│ │ ├── icon_danmaku_question_checked.png
│ │ ├── icon_danmaku_question_disable.png
│ │ ├── icon_danmaku_type_default.png
│ │ ├── icon_danmu_add1.png
│ │ ├── icon_danmu_avatar.png
│ │ ├── icon_danmu_card.png
│ │ ├── icon_danmu_card_clicked.png
│ │ ├── icon_danmu_diss.png
│ │ ├── icon_danmu_heart.png
│ │ ├── icon_danmu_heart_clicked.png
│ │ ├── icon_danmu_like.png
│ │ ├── icon_danmu_msg.png
│ │ ├── icon_danmu_plus_1.png
│ │ ├── icon_danmu_qmark.png
│ │ ├── icon_danmu_question.png
│ │ ├── icon_down_arrow.png
│ │ ├── icon_qa_interact_front.png
│ │ ├── icon_qa_interact_pos.png
│ │ ├── icon_star_danmu_share.png
│ │ ├── icon_star_danmu_timer.png
│ │ ├── icon_star_danmu_viewer_num.png
│ │ ├── item_default_bg.png
│ │ ├── item_default_bg_detail.9.png
│ │ ├── item_default_bg_detail_focus.9.png
│ │ ├── item_default_bg_snapshot.9.png
│ │ ├── item_default_img.9.png
│ │ ├── light.png
│ │ ├── login.png
│ │ ├── look_around.png
│ │ ├── movie.jpg
│ │ ├── no_net.png
│ │ ├── search.png
│ │ ├── seekbar_bg.9.png
│ │ ├── seekbar_progress.9.png
│ │ ├── seekbar_thumb.png
│ │ ├── statusbar_ethernet_exception.png
│ │ ├── statusbar_ethernet_normal.png
│ │ ├── statusbar_wifi_signal_1.png
│ │ ├── statusbar_wifi_signal_2.png
│ │ ├── statusbar_wifi_signal_3.png
│ │ ├── statusbar_wifi_signal_4.png
│ │ ├── statusbar_wlan_exception.png
│ │ ├── statusbar_wlan_normal.png
│ │ ├── tab_bg.png
│ │ ├── tag_bg_1.png
│ │ ├── tag_bg_2.png
│ │ ├── tag_bg_3.png
│ │ ├── tag_bg_4.png
│ │ ├── tag_bg_5.png
│ │ ├── tag_bg_6.png
│ │ ├── tips.png
│ │ ├── view_focus_shadow_thick_no_shadow.9.png
│ │ ├── vip.png
│ │ ├── waterfall_default_title.png
│ │ └── wifi.png
│ │ ├── drawable-xxhdpi-v4
│ │ ├── color_1.png
│ │ ├── color_10.png
│ │ ├── color_2.png
│ │ ├── color_3.png
│ │ ├── color_4.png
│ │ ├── color_5.png
│ │ ├── color_6.png
│ │ ├── color_7.png
│ │ ├── color_8.png
│ │ ├── color_9.png
│ │ ├── color_default.png
│ │ ├── danmaku_system_click_guide.png
│ │ ├── danmaku_system_default.png
│ │ ├── danmaku_system_youku_mark.png
│ │ └── ic_launcher.png
│ │ ├── drawable-xxxhdpi-v4
│ │ ├── bg_focus_border_radius3_no_solid.xml
│ │ ├── danmaku_keyboard.png
│ │ └── danmu_star_icon.png
│ │ ├── drawable
│ │ ├── bg_app_focus.xml
│ │ ├── bg_app_focus_selector.xml
│ │ ├── bg_app_no_focus.xml
│ │ ├── bg_focus.xml
│ │ ├── bg_focus_selector.xml
│ │ ├── bg_gradient_home.xml
│ │ ├── bg_shape_app.xml
│ │ ├── bg_shape_default.xml
│ │ ├── selector_focus_bg_corner15_with_default_bg.xml
│ │ ├── selector_focus_bg_corner15_without_default_bg.xml
│ │ ├── selector_focus_bg_corner3_video_detail_introduction.xml
│ │ ├── selector_focus_bg_corner3_with_default_bg.xml
│ │ ├── selector_text_bg.xml
│ │ ├── shape_corner15_color_14ffffff.xml
│ │ ├── shape_corner15_color_ff26b5ff.xml
│ │ ├── shape_corner3_color_14ffffff.xml
│ │ └── shape_corner3_color_ff26b5ff.xml
│ │ ├── layout
│ │ ├── activity_app_installed.xml
│ │ ├── activity_main.xml
│ │ ├── activity_video_detail.xml
│ │ ├── activity_video_play.xml
│ │ ├── fragment_content.xml
│ │ ├── item_app_installed.xml
│ │ ├── item_episode_content_layout.xml
│ │ ├── item_episode_group_layout.xml
│ │ ├── item_main_title.xml
│ │ ├── item_type_five_layout.xml
│ │ ├── item_type_footer_layout.xml
│ │ ├── item_type_four_layout.xml
│ │ ├── item_type_one_layout.xml
│ │ ├── item_type_seven_layout.xml
│ │ ├── item_type_six_layout.xml
│ │ ├── item_type_three_layout.xml
│ │ ├── item_type_two_layout.xml
│ │ ├── item_type_zero_layout.xml
│ │ ├── layout_img_constra.xml
│ │ ├── lb_img_row_header.xml
│ │ └── type_seven_layout.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ ├── styles.xml
│ │ └── values.xml
│ └── test
│ └── java
│ └── com
│ └── github
│ └── isuperred
│ └── leanbacktvsample
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ └── gradle-wrapper.properties
├── library-player
├── .gitignore
├── build.gradle
├── consumer-rules.pro
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── github
│ │ └── isuperred
│ │ └── player
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── github
│ │ └── isuperred
│ │ └── player
│ │ └── SuperRedVideoPlayer.java
│ └── test
│ └── java
│ └── com
│ └── github
│ └── isuperred
│ └── player
│ └── ExampleUnitTest.java
├── logo
└── leanback_logo.png
├── screenshot
├── LeanbackTvSample_1.png
├── LeanbackTvSample_2.png
├── LeanbackTvSample_3.png
├── LeanbackTvSample_4.png
├── LeanbackTvSample_5.png
└── LeanbackTvSample_6.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 iSuperRed
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | LeanbackTvSample
2 | =====
3 |
4 | [](http://www.jianshu.com/u/c2e31017da0e)
5 | | [简体中文文档][1]
6 |
7 | LeanbackTvSample is a smart TV desktop application based on the Android platform written by Google's open source framework Leanback.
8 |
9 |
10 |
11 |
12 |
13 | 效果图
14 | -------
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | License
23 | -------
24 | ```
25 | Copyright (c) 2019 iSuperRed
26 |
27 | Permission is hereby granted, free of charge, to any person obtaining a copy
28 | of this software and associated documentation files (the "Software"), to deal
29 | in the Software without restriction, including without limitation the rights
30 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31 | copies of the Software, and to permit persons to whom the Software is
32 | furnished to do so, subject to the following conditions:
33 |
34 | The above copyright notice and this permission notice shall be included in all
35 | copies or substantial portions of the Software.
36 |
37 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43 | SOFTWARE.
44 | ```
45 |
46 | [1]: https://www.jianshu.com/p/b286e087b074
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .idea/
3 | /.gradle
4 | gradle/
5 | gradlew
6 | gradlew.bat
7 | local.properties
8 | # 各个模块下build文件夹
9 | app/build/
10 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.3"
6 | defaultConfig {
7 | applicationId "com.github.isuperred"
8 | minSdkVersion 17
9 | targetSdkVersion 29
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13 | ndk {
14 | // 设置支持的SO库架构
15 | abiFilters 'armeabi-v7a'
16 | }
17 |
18 | }
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | lintOptions {
26 | checkReleaseBuilds false
27 | // Or, if you prefer, you can continue to check for errors in release builds,
28 | // but continue the build even when errors are found:
29 | abortOnError false
30 | }
31 | }
32 |
33 | dependencies {
34 | implementation fileTree(dir: 'libs', include: ['*.jar'])
35 | implementation project(':library-player')
36 | implementation 'androidx.appcompat:appcompat:1.1.0'
37 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
38 | implementation 'androidx.leanback:leanback:1.0.0'
39 | implementation 'com.google.code.gson:gson:2.8.5'
40 | implementation("com.github.bumptech.glide:glide:4.9.0") {
41 | exclude group: "com.android.support"
42 | }
43 | implementation 'me.jessyan:autosize:1.1.2'
44 | implementation 'com.tencent.bugly:crashreport:3.1.0'
45 | implementation 'com.tencent.bugly:nativecrashreport:3.7.1'
46 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
47 | testImplementation 'junit:junit:4.12'
48 | androidTestImplementation 'androidx.test:runner:1.2.0'
49 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
50 | }
51 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
23 | #bugly
24 | -dontwarn com.tencent.bugly.**
25 | -keep public class com.tencent.bugly.**{*;}
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/github/isuperred/leanbacktvsample/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.leanbacktvsample;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.InstrumentationRegistry;
6 | import androidx.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getTargetContext();
24 |
25 | assertEquals("com.github.isuperred.leanbacktvsample", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
20 |
23 |
27 |
30 |
31 |
40 |
41 |
42 |
45 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/assets/MyTitle.json:
--------------------------------------------------------------------------------
1 | {
2 | "code": 200,
3 | "totalCount": 21,
4 | "data": [
5 | {
6 | "id": 1114,
7 | "tabCode": "c40248cac1f44c278f8bd23a0bba8b4f",
8 | "name": "我的",
9 | "icon": ""
10 | },
11 | {
12 | "id": 1113,
13 | "tabCode": "7359d189a049468d9d4e280fd1ec15c5",
14 | "name": "看电视",
15 | "icon": ""
16 | },
17 | {
18 | "id": 1138,
19 | "tabCode": "1b14cb1608d3449c83585b48d47b53c1",
20 | "name": "极清4K",
21 | "icon": ""
22 | },
23 | {
24 | "id": 1095,
25 | "tabCode": "5f6874e8106e41a680e05fe49fe4a198",
26 | "name": "少儿",
27 | "icon": ""
28 | },
29 | {
30 | "id": 1030,
31 | "tabCode": "50e4dfe685a84f929ba08952d6081877",
32 | "name": "精选",
33 | "icon": ""
34 | },
35 | {
36 | "id": 925,
37 | "tabCode": "dae28835ebac4f629cc610b4d5a8df25",
38 | "name": "70年",
39 | "icon": ""
40 | },
41 | {
42 | "id": 1098,
43 | "tabCode": "5e1958d0cf9341589db884d83aca79e3",
44 | "name": "花花万物",
45 | "icon": ""
46 | },
47 | {
48 | "id": 1103,
49 | "tabCode": "c4a72503d2374b188cf74767f2276220",
50 | "name": "VIP",
51 | "icon": ""
52 | },
53 | {
54 | "id": 1110,
55 | "tabCode": "8146c5ff88a245b9af2ce7d2bf301b27",
56 | "name": "电视剧",
57 | "icon": ""
58 | },
59 | {
60 | "id": 1112,
61 | "tabCode": "7412804a6aa24ca9be25fd8cd26f1995",
62 | "name": "电影",
63 | "icon": ""
64 | },
65 | {
66 | "id": 1048,
67 | "tabCode": "d179143bacc948d28748338562a94648",
68 | "name": "综艺",
69 | "icon": ""
70 | },
71 | {
72 | "id": 1061,
73 | "tabCode": "9c58bbdacc1449a4bb84ad6af16ba20d",
74 | "name": "课堂",
75 | "icon": ""
76 | },
77 | {
78 | "id": 1166,
79 | "tabCode": "c33db6793aba48bea06b075c35c8be5a",
80 | "name": "动漫",
81 | "icon": ""
82 | },
83 | {
84 | "id": 1116,
85 | "tabCode": "65504aa451fb4b159bbfeb7161750411",
86 | "name": "篮球",
87 | "icon": ""
88 | },
89 | {
90 | "id": 950,
91 | "tabCode": "a4c28944cb0448579007c6c20c037127",
92 | "name": "体育",
93 | "icon": ""
94 | },
95 | {
96 | "id": 939,
97 | "tabCode": "d971d4585bd14e6fadab1aa2d27b71d6",
98 | "name": "游戏",
99 | "icon": ""
100 | },
101 | {
102 | "id": 845,
103 | "tabCode": "a868db298ef84dcbb22d919d02f473cb",
104 | "name": "纪录片",
105 | "icon": ""
106 | },
107 | {
108 | "id": 1115,
109 | "tabCode": "634e89b44aeb4b2a99e9a1bb449daf8b",
110 | "name": "生活",
111 | "icon": ""
112 | },
113 | {
114 | "id": 1124,
115 | "tabCode": "695ed6a510934a93a9593b034a99fc01",
116 | "name": "东方大剧院",
117 | "icon": ""
118 | },
119 | {
120 | "id": 1125,
121 | "tabCode": "9a5fd09ddfa64c4b95b3dc02b27c7576",
122 | "name": "汽车",
123 | "icon": ""
124 | },
125 | {
126 | "id": 1136,
127 | "tabCode": "b9c9229ef6534682919d7af67438e4d6",
128 | "name": "搞笑",
129 | "icon": ""
130 | }
131 | ]
132 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/activity/VideoPlayActivity.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.activity;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.os.Bundle;
6 |
7 | import com.github.isuperred.R;
8 |
9 | public class VideoPlayActivity extends AppCompatActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_video_play);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/adapter/ContentViewPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.adapter;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.fragment.app.Fragment;
5 | import androidx.fragment.app.FragmentManager;
6 |
7 | import com.github.isuperred.fragment.ContentFragment;
8 | import com.github.isuperred.bean.Title;
9 |
10 | import java.util.List;
11 |
12 |
13 | public class ContentViewPagerAdapter extends SmartFragmentStatePagerAdapter {
14 | private static final String TAG = "ContentViewPagerAdapter";
15 |
16 | private List dataBeans;
17 |
18 | public ContentViewPagerAdapter(@NonNull FragmentManager fm) {
19 | super(fm);
20 | }
21 |
22 | @NonNull
23 | @Override
24 | public Fragment getItem(int position) {
25 | return ContentFragment.newInstance(position, dataBeans.get(position).getTabCode());
26 | }
27 |
28 | @Override
29 | public int getCount() {
30 | return dataBeans == null ? 0 : dataBeans.size();
31 | }
32 |
33 | public void setData(List dataBeans) {
34 | this.dataBeans = dataBeans;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/adapter/SmartFragmentStatePagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.adapter;
2 |
3 | import android.util.Log;
4 | import android.util.SparseArray;
5 | import android.view.ViewGroup;
6 |
7 | import androidx.annotation.NonNull;
8 | import androidx.fragment.app.Fragment;
9 | import androidx.fragment.app.FragmentManager;
10 | import androidx.fragment.app.FragmentStatePagerAdapter;
11 |
12 |
13 | public abstract class SmartFragmentStatePagerAdapter extends FragmentStatePagerAdapter {
14 | private static final String TAG = "SmartSVodContent";
15 | private SparseArray registeredFragments = new SparseArray<>();
16 |
17 | SmartFragmentStatePagerAdapter(FragmentManager fragmentManager) {
18 | super(fragmentManager);
19 | }
20 |
21 | @NonNull
22 | @Override
23 | public Object instantiateItem(ViewGroup container, int position) {
24 | Fragment fragment = (Fragment) super.instantiateItem(container, position);
25 | registeredFragments.put(position, fragment);
26 | Log.e(TAG, "instantiateItem: " + registeredFragments.size());
27 | return fragment;
28 | }
29 |
30 | @Override
31 | public void destroyItem(ViewGroup container, int position, Object object) {
32 | registeredFragments.remove(position);
33 | Log.e(TAG, "destroyItem: " + registeredFragments.size());
34 | super.destroyItem(container, position, object);
35 | }
36 |
37 | public Fragment getRegisteredFragment(int position) {
38 | return registeredFragments.get(position);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/application/MyApplication.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.application;
2 |
3 | import android.app.Application;
4 |
5 | import com.tencent.bugly.crashreport.CrashReport;
6 |
7 | public class MyApplication extends Application {
8 | @Override
9 | public void onCreate() {
10 | super.onCreate();
11 | CrashReport.initCrashReport(getApplicationContext(), "66a39b8398", false);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/base/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.base;
2 |
3 | import android.content.pm.ActivityInfo;
4 | import android.os.Bundle;
5 | import android.view.WindowManager;
6 |
7 | import androidx.annotation.Nullable;
8 | import androidx.appcompat.app.AppCompatActivity;
9 |
10 | public abstract class BaseActivity extends AppCompatActivity {
11 | @Override
12 | protected void onCreate(@Nullable Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
15 | WindowManager.LayoutParams.FLAG_FULLSCREEN);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/base/BaseLazyLoadFragment.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.base;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.fragment.app.Fragment;
6 |
7 |
8 | public abstract class BaseLazyLoadFragment extends Fragment {
9 | /**
10 | * Fragment的View加载完毕的标记
11 | */
12 | protected boolean isViewInitiated;
13 | /**
14 | * Fragment对用户可见的标记
15 | */
16 | protected boolean isVisibleToUser;
17 | /**
18 | * 是否懒加载
19 | */
20 | protected boolean isDataInitiated;
21 |
22 | /**
23 | * 第一步,改变isViewInitiated标记
24 | * 当onViewCreated()方法执行时,表明View已经加载完毕,此时改变isViewInitiated标记为true,并调用lazyLoad()方法
25 | */
26 | @Override
27 | public void onActivityCreated(Bundle savedInstanceState) {
28 | super.onActivityCreated(savedInstanceState);
29 | isViewInitiated = true;
30 | //只有Fragment onCreateView好了,
31 | //另外这里调用一次lazyLoad()
32 | prepareFetchData();
33 | }
34 |
35 | /**
36 | * 第二步
37 | * 此方法会在onCreateView()之前执行
38 | * 当viewPager中fragment改变可见状态时也会调用
39 | * 当fragment 从可见到不见,或者从不可见切换到可见,都会调用此方法
40 | */
41 | @Override
42 | public void setUserVisibleHint(boolean isVisibleToUser) {
43 | super.setUserVisibleHint(isVisibleToUser);
44 | this.isVisibleToUser = isVisibleToUser;
45 | prepareFetchData();
46 | }
47 |
48 | /**
49 | * 第四步:定义抽象方法fetchData(),具体加载数据的工作,交给子类去完成
50 | */
51 | public abstract void fetchData();
52 |
53 |
54 | /**
55 | * 第三步:在lazyLoad()方法中进行双重标记判断,通过后即可进行数据加载
56 | * 调用懒加载
57 | */
58 | private void prepareFetchData() {
59 | prepareFetchData(false);
60 | }
61 |
62 | /**
63 | * 第三步:在lazyLoad()方法中进行双重标记判断,通过后即可进行数据加载
64 | */
65 | private void prepareFetchData(boolean forceUpdate) {
66 | if (isVisibleToUser && isViewInitiated && (!isDataInitiated || forceUpdate)) {
67 | fetchData();
68 | isDataInitiated = true;
69 | }
70 | }
71 | }
72 |
73 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/base/BaseListRowPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.base;
2 |
3 | import androidx.leanback.widget.BaseOnItemViewClickedListener;
4 | import androidx.leanback.widget.ListRowPresenter;
5 | import androidx.leanback.widget.RowPresenter;
6 |
7 |
8 | public class BaseListRowPresenter extends ListRowPresenter {
9 |
10 | @Override
11 | protected void onRowViewAttachedToWindow(RowPresenter.ViewHolder vh) {
12 | super.onRowViewAttachedToWindow(vh);
13 | if (getOnItemViewClickedListener() != null) {
14 | vh.setOnItemViewClickedListener(getOnItemViewClickedListener());
15 | }
16 | }
17 |
18 | @Override
19 | protected void onRowViewDetachedFromWindow(RowPresenter.ViewHolder vh) {
20 | super.onRowViewDetachedFromWindow(vh);
21 | if (getOnItemViewClickedListener() != null) {
22 | vh.setOnItemViewClickedListener(null);
23 | }
24 | }
25 |
26 | private BaseOnItemViewClickedListener onItemViewClickedListener;
27 |
28 | public void setOnItemViewClickedListener(BaseOnItemViewClickedListener onItemViewClickedListener) {
29 | this.onItemViewClickedListener = onItemViewClickedListener;
30 | }
31 |
32 | public BaseOnItemViewClickedListener getOnItemViewClickedListener() {
33 | return onItemViewClickedListener;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/base/BasePresenterSelector.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.base;
2 |
3 |
4 | import androidx.collection.ArrayMap;
5 | import androidx.leanback.widget.ListRow;
6 | import androidx.leanback.widget.ListRowPresenter;
7 | import androidx.leanback.widget.Presenter;
8 | import androidx.leanback.widget.PresenterSelector;
9 |
10 | import java.util.ArrayList;
11 |
12 |
13 | public class BasePresenterSelector extends PresenterSelector {
14 | private final ArrayList mPresenters = new ArrayList<>();
15 |
16 | private final ArrayMap, ArrayMap, Presenter>> mClassMap = new ArrayMap<>();
17 | private final ArrayMap, Presenter> mClassSingleMap = new ArrayMap<>();
18 |
19 | /**
20 | * Adds a presenter to be used for the given class.
21 | * @param cls item 类型
22 | * @param presenter presenter
23 | */
24 | public void addClassPresenter(Class> cls, Presenter presenter) {
25 | mClassSingleMap.put(cls, presenter);
26 | if (!mPresenters.contains(presenter)) {
27 | mPresenters.add(presenter);
28 | }
29 | }
30 |
31 | /**
32 | * Adds a presenter to be used for the given class.
33 | * @param cls item 类型
34 | * @param presenter presenter
35 | * @param childType 当包含多个相同{@param cls}时,并且presenter不同,则通过子item{@param childType}区分
36 | */
37 | public void addClassPresenter(Class> cls, Presenter presenter, Class> childType) {
38 | ArrayMap, Presenter> classPresenterArrayMap = mClassMap.get(cls);
39 | if (classPresenterArrayMap == null) {
40 | classPresenterArrayMap = new ArrayMap<>();
41 | }
42 | classPresenterArrayMap.put(childType, presenter);
43 | mClassMap.put(cls, classPresenterArrayMap);
44 | if (!mPresenters.contains(presenter)) {
45 | mPresenters.add(presenter);
46 | }
47 | }
48 |
49 | @Override
50 | public Presenter getPresenter(Object item) {
51 | Class> cls = item.getClass();
52 | Presenter presenter;
53 | presenter = mClassSingleMap.get(cls);
54 | if (presenter != null) {
55 | return presenter;
56 | }
57 | ArrayMap, Presenter> presenters = mClassMap.get(cls);
58 | if (presenters != null) {
59 | if (presenters.size() == 1) {
60 | return presenters.valueAt(0);
61 | } else if (presenters.size() > 1) {
62 | if (item instanceof ListRow) {
63 | ListRow listRow = (ListRow) item;
64 | Presenter childPresenter = listRow.getAdapter().getPresenter(listRow);
65 | Class> childCls = childPresenter.getClass();
66 | do {
67 | presenter = presenters.get(childCls);
68 | childCls = childCls.getSuperclass();
69 | } while (presenter == null && childCls != null);
70 | } else {
71 | throw new NullPointerException("presenter == null, please add presenter to PresenterSelector");
72 | }
73 | }
74 | }
75 | if (presenter == null) {
76 | throw new NullPointerException("presenter == null, please add presenter to PresenterSelector");
77 | }
78 | return presenter;
79 | }
80 |
81 | @Override
82 | public Presenter[] getPresenters() {
83 | return mPresenters.toArray(new Presenter[0]);
84 | }
85 |
86 | public void enable(ListRowPresenter listRowPresenter, boolean flag) {
87 | listRowPresenter.setSelectEffectEnabled(flag);
88 | listRowPresenter.setShadowEnabled(flag);
89 | listRowPresenter.setKeepChildForeground(flag);
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/bean/AppInfo.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.bean;
2 |
3 | import android.graphics.drawable.Drawable;
4 |
5 | import com.github.isuperred.utils.Constants;
6 |
7 | public class AppInfo {
8 | public String name;
9 | public Drawable icon;
10 | public boolean isRom; //true表示安装在手机内存
11 | public boolean isUser; //true表示用户应用
12 | public String versionName;
13 | public String packageName;
14 | public int versionCode = Constants.DEFAULT_ERROR_VALUE;
15 |
16 | @Override
17 | public String toString() {
18 | return "AppInfo{" +
19 | "name='" + name + '\'' +
20 | ", packageName='" + packageName + '\'' +
21 | ", icon=" + icon +
22 | ", isRom=" + isRom +
23 | ", isUser=" + isUser +
24 | '}';
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/bean/Footer.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.bean;
2 |
3 | public class Footer {
4 | }
5 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/bean/Title.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.bean;
2 |
3 | import java.util.List;
4 |
5 |
6 | public class Title {
7 |
8 |
9 | /**
10 | * code : 200
11 | * totalCount : 21
12 | * data : [{"id":1114,"tabCode":"c40248cac1f44c278f8bd23a0bba8b4f","name":"我的","icon":""},{"id":1113,"tabCode":"7359d189a049468d9d4e280fd1ec15c5","name":"看电视","icon":""},{"id":1138,"tabCode":"1b14cb1608d3449c83585b48d47b53c1","name":"极清4K","icon":""},{"id":1095,"tabCode":"5f6874e8106e41a680e05fe49fe4a198","name":"少儿","icon":""},{"id":1030,"tabCode":"50e4dfe685a84f929ba08952d6081877","name":"精选","icon":""},{"id":925,"tabCode":"dae28835ebac4f629cc610b4d5a8df25","name":"70年","icon":""},{"id":1098,"tabCode":"5e1958d0cf9341589db884d83aca79e3","name":"花花万物","icon":""},{"id":1103,"tabCode":"c4a72503d2374b188cf74767f2276220","name":"VIP","icon":""},{"id":1110,"tabCode":"8146c5ff88a245b9af2ce7d2bf301b27","name":"电视剧","icon":""},{"id":1112,"tabCode":"7412804a6aa24ca9be25fd8cd26f1995","name":"电影","icon":""},{"id":1048,"tabCode":"d179143bacc948d28748338562a94648","name":"综艺","icon":""},{"id":1061,"tabCode":"9c58bbdacc1449a4bb84ad6af16ba20d","name":"课堂","icon":""},{"id":1166,"tabCode":"c33db6793aba48bea06b075c35c8be5a","name":"动漫","icon":""},{"id":1116,"tabCode":"65504aa451fb4b159bbfeb7161750411","name":"篮球","icon":""},{"id":950,"tabCode":"a4c28944cb0448579007c6c20c037127","name":"体育","icon":""},{"id":939,"tabCode":"d971d4585bd14e6fadab1aa2d27b71d6","name":"游戏","icon":""},{"id":845,"tabCode":"a868db298ef84dcbb22d919d02f473cb","name":"纪录片","icon":""},{"id":1115,"tabCode":"634e89b44aeb4b2a99e9a1bb449daf8b","name":"生活","icon":""},{"id":1124,"tabCode":"695ed6a510934a93a9593b034a99fc01","name":"东方大剧院","icon":""},{"id":1125,"tabCode":"9a5fd09ddfa64c4b95b3dc02b27c7576","name":"汽车","icon":""},{"id":1136,"tabCode":"b9c9229ef6534682919d7af67438e4d6","name":"搞笑","icon":""}]
13 | */
14 |
15 | private int code;
16 | private int totalCount;
17 | private List data;
18 |
19 | public int getCode() {
20 | return code;
21 | }
22 |
23 | public void setCode(int code) {
24 | this.code = code;
25 | }
26 |
27 | public int getTotalCount() {
28 | return totalCount;
29 | }
30 |
31 | public void setTotalCount(int totalCount) {
32 | this.totalCount = totalCount;
33 | }
34 |
35 | public List getData() {
36 | return data;
37 | }
38 |
39 | public void setData(List data) {
40 | this.data = data;
41 | }
42 |
43 | public static class DataBean {
44 | /**
45 | * id : 1114
46 | * tabCode : c40248cac1f44c278f8bd23a0bba8b4f
47 | * name : 我的
48 | * icon :
49 | */
50 |
51 | private int id;
52 | private String tabCode;
53 | private String name;
54 | private String icon;
55 |
56 | public int getId() {
57 | return id;
58 | }
59 |
60 | public void setId(int id) {
61 | this.id = id;
62 | }
63 |
64 | public String getTabCode() {
65 | return tabCode;
66 | }
67 |
68 | public void setTabCode(String tabCode) {
69 | this.tabCode = tabCode;
70 | }
71 |
72 | public String getName() {
73 | return name;
74 | }
75 |
76 | public void setName(String name) {
77 | this.name = name;
78 | }
79 |
80 | public String getIcon() {
81 | return icon;
82 | }
83 |
84 | public void setIcon(String icon) {
85 | this.icon = icon;
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/bean/TypeSeven.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.bean;
2 |
3 | import java.util.List;
4 |
5 | public class TypeSeven {
6 | private List widgetsBeanList;
7 |
8 | public List getWidgetsBeanList() {
9 | return widgetsBeanList;
10 | }
11 |
12 | public void setWidgetsBeanList(List widgetsBeanList) {
13 | this.widgetsBeanList = widgetsBeanList;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/content/ContentPresenterSelector.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.content;
2 |
3 | import androidx.leanback.widget.ListRow;
4 |
5 | import com.github.isuperred.base.BasePresenterSelector;
6 | import com.github.isuperred.bean.Footer;
7 | import com.github.isuperred.bean.TypeSeven;
8 | import com.github.isuperred.presenter.row.ContentListRowPresenter;
9 | import com.github.isuperred.presenter.ImageRowHeaderPresenter;
10 | import com.github.isuperred.presenter.TypeFiveContentPresenter;
11 | import com.github.isuperred.presenter.row.TypeFiveListRowPresenter;
12 | import com.github.isuperred.presenter.TypeFooterPresenter;
13 | import com.github.isuperred.presenter.TypeFourContentPresenter;
14 | import com.github.isuperred.presenter.TypeOneContentPresenter;
15 | import com.github.isuperred.presenter.TypeSevenPresenter;
16 | import com.github.isuperred.presenter.TypeSixContentPresenter;
17 | import com.github.isuperred.presenter.TypeThreeContentPresenter;
18 | import com.github.isuperred.presenter.TypeTwoContentPresenter;
19 | import com.github.isuperred.presenter.TypeZeroContentPresenter;
20 | import com.github.isuperred.presenter.row.TypeZeroListRowPresenter;
21 |
22 |
23 | public class ContentPresenterSelector extends BasePresenterSelector {
24 | public ContentPresenterSelector() {
25 | ContentListRowPresenter listRowPresenter = new ContentListRowPresenter();
26 | listRowPresenter.setShadowEnabled(false);
27 | listRowPresenter.setSelectEffectEnabled(false);
28 | listRowPresenter.setKeepChildForeground(false);
29 |
30 |
31 | TypeZeroListRowPresenter listRowPresenterOne = new TypeZeroListRowPresenter();
32 | listRowPresenterOne.setShadowEnabled(false);
33 | listRowPresenterOne.setSelectEffectEnabled(false);
34 | listRowPresenterOne.setKeepChildForeground(false);
35 |
36 | addClassPresenter(ListRow.class, listRowPresenterOne, TypeZeroContentPresenter.class);
37 | addClassPresenter(ListRow.class, listRowPresenterOne, TypeOneContentPresenter.class);
38 | addClassPresenter(ListRow.class, listRowPresenterOne, TypeTwoContentPresenter.class);
39 | addClassPresenter(ListRow.class, listRowPresenterOne, TypeThreeContentPresenter.class);
40 | addClassPresenter(ListRow.class, listRowPresenterOne, TypeFourContentPresenter.class);
41 |
42 | TypeFiveListRowPresenter listRowPresenterFive = new TypeFiveListRowPresenter();
43 | listRowPresenterFive.setShadowEnabled(false);
44 | listRowPresenterFive.setSelectEffectEnabled(false);
45 | listRowPresenterFive.setKeepChildForeground(false);
46 | listRowPresenterFive.setHeaderPresenter(new ImageRowHeaderPresenter());
47 |
48 | addClassPresenter(ListRow.class, listRowPresenterFive, TypeFiveContentPresenter.class);
49 | addClassPresenter(ListRow.class, listRowPresenterOne, TypeSixContentPresenter.class);
50 |
51 | addClassPresenter(Footer.class, new TypeFooterPresenter());
52 |
53 | addClassPresenter(TypeSeven.class, new TypeSevenPresenter());
54 |
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/AppInstalledPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.Canvas;
6 | import android.graphics.drawable.Drawable;
7 | import android.text.TextUtils;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.ImageView;
12 | import android.widget.TextView;
13 |
14 | import androidx.annotation.NonNull;
15 | import androidx.core.graphics.drawable.RoundedBitmapDrawable;
16 | import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory;
17 | import androidx.leanback.widget.Presenter;
18 |
19 | import com.github.isuperred.R;
20 | import com.github.isuperred.bean.AppInfo;
21 | import com.github.isuperred.utils.FontDisplayUtil;
22 |
23 | public class AppInstalledPresenter extends Presenter {
24 | private Context mContext;
25 |
26 | private static final String TAG = "MoviePresenter";
27 |
28 | @Override
29 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
30 | if (mContext == null) {
31 | mContext = parent.getContext();
32 | }
33 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_app_installed, parent, false);
34 | view.setOnFocusChangeListener(new View.OnFocusChangeListener() {
35 | @Override
36 | public void onFocusChange(View v, boolean hasFocus) {
37 | v.findViewById(R.id.tv_app_name).setSelected(hasFocus);
38 | }
39 | });
40 | return new ViewHolder(view);
41 | }
42 |
43 | @Override
44 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
45 | if (item instanceof AppInfo) {
46 | ViewHolder vh = (ViewHolder) viewHolder;
47 | if (((AppInfo) item).icon != null) {
48 | Bitmap bitmap = getBitmapFromDrawable(((AppInfo) item).icon);//适配Android 8.0
49 | RoundedBitmapDrawable drawable = RoundedBitmapDrawableFactory.create(mContext.getResources(), bitmap);
50 | drawable.setCornerRadius(FontDisplayUtil.dip2px(mContext, 10));
51 | vh.mIvAppIcon.setImageDrawable(drawable);
52 | }
53 | if (!TextUtils.isEmpty(((AppInfo) item).name)) {
54 | vh.mTvAppName.setText(((AppInfo) item).name);
55 | }
56 | }
57 | }
58 |
59 | @Override
60 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
61 |
62 | }
63 |
64 | public static class ViewHolder extends Presenter.ViewHolder {
65 |
66 | private final ImageView mIvAppIcon;
67 | private final TextView mTvAppName;
68 |
69 | public ViewHolder(View view) {
70 | super(view);
71 | mIvAppIcon = view.findViewById(R.id.iv_app_icon);
72 | mTvAppName = view.findViewById(R.id.tv_app_name);
73 | }
74 | }
75 |
76 | private Bitmap getBitmapFromDrawable(@NonNull Drawable drawable) {
77 | final Bitmap bmp = Bitmap.createBitmap(drawable.getIntrinsicWidth(),
78 | drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
79 | final Canvas canvas = new Canvas(bmp);
80 | drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
81 | drawable.draw(canvas);
82 | return bmp;
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/EpisodeContentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.text.TextUtils;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.TextView;
8 |
9 | import androidx.leanback.widget.Presenter;
10 |
11 | import com.github.isuperred.R;
12 | import com.github.isuperred.bean.Video;
13 |
14 |
15 | public class EpisodeContentPresenter extends Presenter {
16 |
17 | @Override
18 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
19 | View view = LayoutInflater.from(parent.getContext())
20 | .inflate(R.layout.item_episode_content_layout, parent, false);
21 | return new ViewHolder(view);
22 | }
23 |
24 | @Override
25 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
26 | if (item instanceof Video.DataBean.EpisodeBean.GroupDetailBean) {
27 | Video.DataBean.EpisodeBean.GroupDetailBean groupDetailBean = (Video.DataBean.EpisodeBean.GroupDetailBean) item;
28 | String number = groupDetailBean.getNumber();
29 | if (!TextUtils.isEmpty(number)) {
30 | ViewHolder vh = (ViewHolder) viewHolder;
31 | vh.mTvEpisodeContent.setText(number);
32 | }
33 | }
34 | }
35 |
36 | @Override
37 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
38 |
39 | }
40 |
41 | public static class ViewHolder extends Presenter.ViewHolder {
42 |
43 | private TextView mTvEpisodeContent;
44 |
45 | ViewHolder(View view) {
46 | super(view);
47 | mTvEpisodeContent = view.findViewById(R.id.tv_episode_content);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/EpisodeGroupPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.view.LayoutInflater;
4 | import android.view.View;
5 | import android.view.ViewGroup;
6 | import android.widget.TextView;
7 |
8 | import androidx.leanback.widget.Presenter;
9 |
10 | import com.github.isuperred.R;
11 | import com.github.isuperred.bean.Video;
12 |
13 |
14 | public class EpisodeGroupPresenter extends Presenter {
15 |
16 | @Override
17 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
18 | View view = LayoutInflater.from(parent.getContext())
19 | .inflate(R.layout.item_episode_group_layout, parent, false);
20 | return new ViewHolder(view);
21 | }
22 |
23 | @Override
24 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
25 | if(item instanceof Video.DataBean.EpisodeBean){
26 | Video.DataBean.EpisodeBean episodeBean = (Video.DataBean.EpisodeBean) item;
27 | ViewHolder vh = (ViewHolder) viewHolder;
28 | vh.mTvEpisodeGroup.setText(episodeBean.getGroupName());
29 | }
30 | }
31 |
32 | @Override
33 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
34 |
35 | }
36 |
37 | public static class ViewHolder extends Presenter.ViewHolder {
38 |
39 | private TextView mTvEpisodeGroup;
40 |
41 | ViewHolder(View view) {
42 | super(view);
43 | mTvEpisodeGroup = view.findViewById(R.id.tv_episode_group);
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/ImageRowHeaderPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.view.LayoutInflater;
4 | import android.view.View;
5 | import android.view.ViewGroup;
6 | import android.widget.TextView;
7 |
8 | import androidx.annotation.RestrictTo;
9 | import androidx.leanback.widget.HeaderItem;
10 | import androidx.leanback.widget.Presenter;
11 | import androidx.leanback.widget.Row;
12 | import androidx.leanback.widget.RowHeaderPresenter;
13 |
14 | import com.github.isuperred.R;
15 |
16 | import static androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX;
17 |
18 | public class ImageRowHeaderPresenter extends RowHeaderPresenter {
19 |
20 | private final int mLayoutResourceId;
21 | private final boolean mAnimateSelect;
22 |
23 | public ImageRowHeaderPresenter() {
24 | this(R.layout.lb_img_row_header);
25 | }
26 |
27 | /**
28 | * @hide
29 | */
30 | @RestrictTo(LIBRARY_GROUP_PREFIX)
31 | public ImageRowHeaderPresenter(int layoutResourceId) {
32 | this(layoutResourceId, true);
33 | }
34 |
35 | /**
36 | * @hide
37 | */
38 | @RestrictTo(LIBRARY_GROUP_PREFIX)
39 | public ImageRowHeaderPresenter(int layoutResourceId, boolean animateSelect) {
40 | mLayoutResourceId = layoutResourceId;
41 | mAnimateSelect = animateSelect;
42 | }
43 |
44 | @Override
45 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
46 | View root = LayoutInflater.from(parent.getContext())
47 | .inflate(mLayoutResourceId, parent, false);
48 | HeadViewHolder viewHolder = new HeadViewHolder(root);
49 | if (mAnimateSelect) {
50 | setSelectLevel(viewHolder, 0);
51 | }
52 | return viewHolder;
53 | }
54 |
55 | @Override
56 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
57 | HeaderItem headerItem = item == null ? null : ((Row) item).getHeaderItem();
58 | if (headerItem == null) {
59 | if ( viewHolder.view.findViewById(R.id.row_header) != null) {
60 | ((TextView)viewHolder.view.findViewById(R.id.row_header)).setText(null);
61 | }
62 | viewHolder.view.setContentDescription(null);
63 | viewHolder.view.setVisibility(View.GONE);
64 |
65 | } else {
66 | if (viewHolder.view.findViewById(R.id.row_header) != null) {
67 | ((TextView)viewHolder.view.findViewById(R.id.row_header)).setText(headerItem.getName());
68 | }
69 | viewHolder.view.setContentDescription(headerItem.getContentDescription());
70 | viewHolder.view.setVisibility(View.VISIBLE);
71 | }
72 | }
73 |
74 | public static class HeadViewHolder extends ViewHolder {
75 |
76 | public HeadViewHolder(View view) {
77 | super(view);
78 |
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/TitlePresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.view.LayoutInflater;
4 | import android.view.View;
5 | import android.view.ViewGroup;
6 | import android.widget.TextView;
7 |
8 | import androidx.leanback.widget.Presenter;
9 |
10 | import com.github.isuperred.R;
11 | import com.github.isuperred.bean.Title;
12 |
13 | public class TitlePresenter extends Presenter {
14 | private static final String TAG = "TitlePresenter";
15 |
16 | @Override
17 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
18 | View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_main_title, parent, false);
19 | return new ViewHolder(view);
20 | }
21 |
22 | @Override
23 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
24 | if (item instanceof Title.DataBean) {
25 | ViewHolder vh = (ViewHolder) viewHolder;
26 | vh.mTvMainTitle.setText(((Title.DataBean) item).getName());
27 | }
28 |
29 | }
30 |
31 | @Override
32 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
33 |
34 | }
35 |
36 | public static class ViewHolder extends Presenter.ViewHolder {
37 |
38 | private TextView mTvMainTitle;
39 |
40 | ViewHolder(View view) {
41 | super(view);
42 | mTvMainTitle = view.findViewById(R.id.tv_main_title);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/TypeFiveContentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.content.Context;
4 | import android.text.TextUtils;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import androidx.leanback.widget.Presenter;
12 |
13 | import com.bumptech.glide.Glide;
14 | import com.bumptech.glide.request.RequestOptions;
15 | import com.github.isuperred.R;
16 | import com.github.isuperred.bean.Content;
17 | import com.github.isuperred.utils.FontDisplayUtil;
18 |
19 |
20 | public class TypeFiveContentPresenter extends Presenter {
21 | private Context mContext;
22 |
23 | private static final String TAG = "TypeFiveContentPresenter";
24 |
25 | @Override
26 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
27 | if (mContext == null) {
28 | mContext = parent.getContext();
29 | }
30 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_type_five_layout, parent, false);
31 | return new ViewHolder(view);
32 | }
33 |
34 | @Override
35 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
36 | if (item instanceof Content.DataBean.WidgetsBean) {
37 | ViewHolder vh = (ViewHolder) viewHolder;
38 | Glide.with(mContext)
39 | .load(((Content.DataBean.WidgetsBean) item).getUrl())
40 | .apply(new RequestOptions()
41 | .centerCrop()
42 | .override(FontDisplayUtil.dip2px(mContext, 272),
43 | FontDisplayUtil.dip2px(mContext, 124))
44 | .placeholder(R.drawable.bg_shape_default))
45 | .into(vh.mIvTypeFivePoster);
46 | if (!TextUtils.isEmpty(((Content.DataBean.WidgetsBean) item).getName())) {
47 | vh.mIvTypeFiveName.setText(((Content.DataBean.WidgetsBean) item).getName());
48 | }
49 | if(!TextUtils.isEmpty(((Content.DataBean.WidgetsBean) item).getDesc())){
50 | vh.mIvTypeFiveDesc.setText(((Content.DataBean.WidgetsBean) item).getDesc());
51 | }
52 | }
53 | }
54 |
55 | @Override
56 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
57 |
58 | }
59 |
60 | public static class ViewHolder extends Presenter.ViewHolder {
61 |
62 | private final ImageView mIvTypeFivePoster;
63 | private final TextView mIvTypeFiveName;
64 | private final TextView mIvTypeFiveDesc;
65 |
66 | public ViewHolder(View view) {
67 | super(view);
68 | mIvTypeFivePoster = view.findViewById(R.id.iv_type_five_poster);
69 | mIvTypeFiveName = view.findViewById(R.id.tv_type_five_name);
70 | mIvTypeFiveDesc = view.findViewById(R.id.tv_type_five_desc);
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/TypeFooterPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.TextView;
9 | import android.widget.Toast;
10 |
11 | import androidx.leanback.widget.Presenter;
12 | import androidx.leanback.widget.VerticalGridView;
13 |
14 | import com.github.isuperred.R;
15 | import com.github.isuperred.widgets.TabVerticalGridView;
16 |
17 | public class TypeFooterPresenter extends Presenter {
18 | private Context mContext;
19 |
20 | private static final String TAG = "TypeFooterPresenter";
21 |
22 | @Override
23 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
24 | if (mContext == null) {
25 | mContext = parent.getContext();
26 | }
27 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_type_footer_layout, parent, false);
28 | view.findViewById(R.id.cl_back_to_top)
29 | .setOnClickListener(new View.OnClickListener() {
30 | @Override
31 | public void onClick(View v) {
32 | if (v.getParent().getParent() instanceof TabVerticalGridView) {
33 | ((TabVerticalGridView) v.getParent().getParent()).backToTop();
34 | }
35 | }
36 | });
37 | view.findViewById(R.id.cl_look_around).setOnClickListener(
38 | new View.OnClickListener() {
39 | @Override
40 | public void onClick(View v) {
41 | Toast.makeText(mContext, "随心看", Toast.LENGTH_SHORT).show();
42 | }
43 | });
44 | return new ViewHolder(view);
45 | }
46 |
47 | @Override
48 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
49 |
50 | }
51 |
52 | @Override
53 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
54 |
55 | }
56 |
57 | public static class ViewHolder extends Presenter.ViewHolder {
58 |
59 | private final TextView mIvBackToTop;
60 | private final TextView mIvLookAround;
61 |
62 | public ViewHolder(View view) {
63 | super(view);
64 | mIvBackToTop = view.findViewById(R.id.tv_back_to_top);
65 | mIvLookAround = view.findViewById(R.id.tv_look_around);
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/TypeFourContentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.content.Context;
4 | import android.text.TextUtils;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import androidx.leanback.widget.Presenter;
12 |
13 | import com.bumptech.glide.Glide;
14 | import com.bumptech.glide.request.RequestOptions;
15 | import com.github.isuperred.R;
16 | import com.github.isuperred.bean.Content;
17 | import com.github.isuperred.utils.FontDisplayUtil;
18 |
19 |
20 | public class TypeFourContentPresenter extends Presenter {
21 | private Context mContext;
22 |
23 | private static final String TAG = "TypeFourContentPresenter";
24 |
25 | @Override
26 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
27 | if (mContext == null) {
28 | mContext = parent.getContext();
29 | }
30 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_type_four_layout, parent, false);
31 | return new ViewHolder(view);
32 | }
33 |
34 | @Override
35 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
36 | if (item instanceof Content.DataBean.WidgetsBean) {
37 | ViewHolder vh = (ViewHolder) viewHolder;
38 | Glide.with(mContext)
39 | .load(((Content.DataBean.WidgetsBean) item).getUrl())
40 | .apply(new RequestOptions()
41 | .centerCrop()
42 | .override(FontDisplayUtil.dip2px(mContext, 200),
43 | FontDisplayUtil.dip2px(mContext, 111))
44 | .placeholder(R.drawable.bg_shape_default))
45 | .into(vh.mIvTypeFourPoster);
46 | if (!TextUtils.isEmpty(((Content.DataBean.WidgetsBean) item).getName())) {
47 | vh.mIvTypeFourName.setText(((Content.DataBean.WidgetsBean) item).getName());
48 | }
49 | }
50 | }
51 |
52 | @Override
53 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
54 |
55 | }
56 |
57 | public static class ViewHolder extends Presenter.ViewHolder {
58 |
59 | private final ImageView mIvTypeFourPoster;
60 | private final TextView mIvTypeFourName;
61 |
62 | public ViewHolder(View view) {
63 | super(view);
64 | mIvTypeFourPoster = view.findViewById(R.id.iv_type_four_poster);
65 | mIvTypeFourName = view.findViewById(R.id.tv_type_four_name);
66 | }
67 | }
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/TypeOneContentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 |
9 | import androidx.leanback.widget.Presenter;
10 |
11 | import com.bumptech.glide.Glide;
12 | import com.bumptech.glide.request.RequestOptions;
13 | import com.github.isuperred.R;
14 | import com.github.isuperred.bean.Content;
15 | import com.github.isuperred.utils.FontDisplayUtil;
16 |
17 |
18 | public class TypeOneContentPresenter extends Presenter {
19 | private Context mContext;
20 |
21 | private static final String TAG = "TypeOneContentPresenter";
22 |
23 | @Override
24 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
25 | if (mContext == null) {
26 | mContext = parent.getContext();
27 | }
28 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_type_one_layout, parent, false);
29 | return new ViewHolder(view);
30 | }
31 |
32 | @Override
33 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
34 | if (item instanceof Content.DataBean.WidgetsBean) {
35 | ViewHolder vh = (ViewHolder) viewHolder;
36 | Glide.with(mContext)
37 | .load(((Content.DataBean.WidgetsBean) item).getUrl())
38 | .apply(new RequestOptions()
39 | .centerCrop()
40 | .override(FontDisplayUtil.dip2px(mContext, 198),
41 | FontDisplayUtil.dip2px(mContext, 111))
42 | .placeholder(R.drawable.bg_shape_default))
43 | .into(vh.mIvTypeTwoPoster);
44 | }
45 | }
46 |
47 | @Override
48 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
49 |
50 | }
51 |
52 | public static class ViewHolder extends Presenter.ViewHolder {
53 |
54 | private final ImageView mIvTypeTwoPoster;
55 |
56 | public ViewHolder(View view) {
57 | super(view);
58 | mIvTypeTwoPoster = view.findViewById(R.id.iv_type_two_poster);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/TypeSixContentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.content.Context;
4 | import android.text.TextUtils;
5 | import android.util.Log;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.ImageView;
10 | import android.widget.TextView;
11 |
12 | import androidx.leanback.widget.Presenter;
13 |
14 | import com.bumptech.glide.Glide;
15 | import com.bumptech.glide.request.RequestOptions;
16 | import com.github.isuperred.R;
17 | import com.github.isuperred.bean.Content;
18 | import com.github.isuperred.utils.FontDisplayUtil;
19 |
20 |
21 | public class TypeSixContentPresenter extends Presenter {
22 |
23 | private Context mContext;
24 |
25 | private static final String TAG = "TypeSixContentPresenter";
26 |
27 | @Override
28 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
29 | if (mContext == null) {
30 | mContext = parent.getContext();
31 | }
32 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_type_six_layout, parent, false);
33 | final ViewHolder viewHolder = new ViewHolder(view);
34 | // view.setOnFocusChangeListener(new View.OnFocusChangeListener() {
35 | // @Override
36 | // public void onFocusChange(View v, boolean hasFocus) {
37 | // viewHolder.mTvDesc.setSelected(hasFocus);
38 | // if (hasFocus) {
39 | // viewHolder.mTvDesc.setTextColor(mContext.getResources().getColor(R.color.colorBlack));
40 | // } else {
41 | // viewHolder.mTvDesc.setTextColor(mContext.getResources().getColor(R.color.colorWhite));
42 | // }
43 | // }
44 | // });
45 | return viewHolder;
46 | }
47 |
48 | @Override
49 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
50 | if (item instanceof Content.DataBean.WidgetsBean) {
51 | ViewHolder vh = (ViewHolder) viewHolder;
52 | Log.e(TAG, "onBindViewHolder: " + ((Content.DataBean.WidgetsBean) item).getUrl());
53 | Glide.with(mContext)
54 | .load(((Content.DataBean.WidgetsBean) item).getUrl())
55 | .apply(new RequestOptions()
56 | .override(FontDisplayUtil.dip2px(mContext, 124),
57 | FontDisplayUtil.dip2px(mContext, 207))
58 | .placeholder(R.drawable.bg_shape_default))
59 | .into(vh.mIvPoster);
60 | String desc = ((Content.DataBean.WidgetsBean) item).getDesc();
61 | if (!TextUtils.isEmpty(desc)) {
62 | vh.mTvDesc.setText(desc);
63 | }
64 | }
65 | }
66 |
67 | @Override
68 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
69 |
70 | }
71 |
72 | public static class ViewHolder extends Presenter.ViewHolder {
73 |
74 | private final TextView mTvDesc;
75 | private final ImageView mIvPoster;
76 |
77 | public ViewHolder(View view) {
78 | super(view);
79 | mTvDesc = view.findViewById(R.id.tv_desc);
80 | mIvPoster = view.findViewById(R.id.iv_poster);
81 | }
82 | }
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/TypeThreeContentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 |
9 | import androidx.leanback.widget.Presenter;
10 |
11 | import com.bumptech.glide.Glide;
12 | import com.bumptech.glide.request.RequestOptions;
13 | import com.github.isuperred.R;
14 | import com.github.isuperred.bean.Content;
15 | import com.github.isuperred.utils.FontDisplayUtil;
16 |
17 | public class TypeThreeContentPresenter extends Presenter {
18 | private Context mContext;
19 |
20 | private static final String TAG = "TypeThreeContentPresenter";
21 |
22 | @Override
23 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
24 | if (mContext == null) {
25 | mContext = parent.getContext();
26 | }
27 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_type_three_layout, parent, false);
28 | return new ViewHolder(view);
29 | }
30 |
31 | @Override
32 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
33 | if (item instanceof Content.DataBean.WidgetsBean) {
34 | ViewHolder vh = (ViewHolder) viewHolder;
35 | Glide.with(mContext)
36 | .load(((Content.DataBean.WidgetsBean) item).getUrl())
37 | .apply(new RequestOptions()
38 | .centerCrop()
39 | .override(FontDisplayUtil.dip2px(mContext, 124),
40 | FontDisplayUtil.dip2px(mContext, 186))
41 | .placeholder(R.drawable.bg_shape_default))
42 | .into(vh.mIvTypeThreePoster);
43 | }
44 | }
45 |
46 | @Override
47 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
48 |
49 | }
50 |
51 | public static class ViewHolder extends Presenter.ViewHolder {
52 |
53 | private final ImageView mIvTypeThreePoster;
54 |
55 | public ViewHolder(View view) {
56 | super(view);
57 | mIvTypeThreePoster = view.findViewById(R.id.iv_type_three_poster);
58 | }
59 | }
60 | }
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/TypeTwoContentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 |
9 | import androidx.leanback.widget.Presenter;
10 |
11 | import com.bumptech.glide.Glide;
12 | import com.bumptech.glide.request.RequestOptions;
13 | import com.github.isuperred.R;
14 | import com.github.isuperred.bean.Content;
15 | import com.github.isuperred.utils.FontDisplayUtil;
16 |
17 | public class TypeTwoContentPresenter extends Presenter {
18 | private Context mContext;
19 |
20 | private static final String TAG = "TypeTwoContentPresenter";
21 |
22 | @Override
23 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
24 | if (mContext == null) {
25 | mContext = parent.getContext();
26 | }
27 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_type_two_layout, parent, false);
28 | return new ViewHolder(view);
29 | }
30 |
31 | @Override
32 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
33 | if (item instanceof Content.DataBean.WidgetsBean) {
34 | ViewHolder vh = (ViewHolder) viewHolder;
35 | Glide.with(mContext)
36 | .load(((Content.DataBean.WidgetsBean) item).getUrl())
37 | .apply(new RequestOptions()
38 | .centerCrop()
39 | .override(FontDisplayUtil.dip2px(mContext, 272),
40 | FontDisplayUtil.dip2px(mContext, 186))
41 | .placeholder(R.drawable.bg_shape_default))
42 | .into(vh.mIvTypeTwoPoster);
43 | }
44 | }
45 |
46 | @Override
47 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
48 |
49 | }
50 |
51 | public static class ViewHolder extends Presenter.ViewHolder {
52 |
53 | private final ImageView mIvTypeTwoPoster;
54 |
55 | public ViewHolder(View view) {
56 | super(view);
57 | mIvTypeTwoPoster = view.findViewById(R.id.iv_type_two_poster);
58 | }
59 | }
60 | }
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/TypeZeroContentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 |
9 | import androidx.leanback.widget.Presenter;
10 |
11 | import com.bumptech.glide.Glide;
12 | import com.bumptech.glide.request.RequestOptions;
13 | import com.github.isuperred.R;
14 | import com.github.isuperred.bean.Content;
15 | import com.github.isuperred.utils.FontDisplayUtil;
16 |
17 |
18 | public class TypeZeroContentPresenter extends Presenter {
19 | private Context mContext;
20 |
21 | private static final String TAG = "TypeZeroContentPresenter";
22 |
23 | @Override
24 | public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
25 | if (mContext == null) {
26 | mContext = parent.getContext();
27 | }
28 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_type_zero_layout, parent, false);
29 | return new ViewHolder(view);
30 | }
31 |
32 | @Override
33 | public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
34 | if (item instanceof Content.DataBean.WidgetsBean) {
35 | ViewHolder vh = (ViewHolder) viewHolder;
36 | Glide.with(mContext)
37 | .load(((Content.DataBean.WidgetsBean) item).getUrl())
38 | .apply(new RequestOptions()
39 | .centerCrop()
40 | .override(FontDisplayUtil.dip2px(mContext, 420),
41 | FontDisplayUtil.dip2px(mContext, 207))
42 | .placeholder(R.drawable.bg_shape_default))
43 | .into(vh.mIvTypeOnePoster);
44 | }
45 | }
46 |
47 | @Override
48 | public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) {
49 |
50 | }
51 |
52 | public static class ViewHolder extends Presenter.ViewHolder {
53 |
54 | private final ImageView mIvTypeOnePoster;
55 |
56 | public ViewHolder(View view) {
57 | super(view);
58 | mIvTypeOnePoster = view.findViewById(R.id.iv_type_one_poster);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/row/ContentListRowPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter.row;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.Intent;
5 | import android.widget.TextView;
6 | import android.widget.Toast;
7 |
8 | import androidx.leanback.widget.BaseOnItemViewClickedListener;
9 | import androidx.leanback.widget.HorizontalGridView;
10 | import androidx.leanback.widget.Presenter;
11 | import androidx.leanback.widget.RowHeaderPresenter;
12 | import androidx.leanback.widget.RowPresenter;
13 |
14 | import com.github.isuperred.R;
15 | import com.github.isuperred.activity.VideoDetailActivity;
16 | import com.github.isuperred.base.BaseListRowPresenter;
17 | import com.github.isuperred.bean.Content;
18 | import com.github.isuperred.utils.FontDisplayUtil;
19 |
20 |
21 | public class ContentListRowPresenter extends BaseListRowPresenter {
22 |
23 | private static final String TAG = "ContentListRowPresenter";
24 |
25 | @SuppressLint("RestrictedApi")
26 | @Override
27 | protected void initializeRowViewHolder(final RowPresenter.ViewHolder holder) {
28 | super.initializeRowViewHolder(holder);
29 |
30 | final ViewHolder rowViewHolder = (ViewHolder) holder;
31 | rowViewHolder.getGridView().setHorizontalSpacing(
32 | FontDisplayUtil.dip2px(rowViewHolder.getGridView().getContext(), 24));
33 | RowHeaderPresenter.ViewHolder headerViewHolder = holder.getHeaderViewHolder();
34 | final TextView tv = headerViewHolder.view.findViewById(R.id.row_header);
35 | tv.setTextColor(tv.getContext().getResources().getColor(R.color.colorWhite));
36 | tv.setPadding(0, 20, 0, 20);
37 | tv.setTextSize(FontDisplayUtil.dip2px(rowViewHolder.getGridView().getContext(), 24));
38 | rowViewHolder.getGridView().setFocusScrollStrategy(HorizontalGridView.FOCUS_SCROLL_ITEM);
39 |
40 | setOnItemViewClickedListener(new BaseOnItemViewClickedListener() {
41 | @Override
42 | public void onItemClicked(Presenter.ViewHolder itemViewHolder,
43 | Object item, RowPresenter.ViewHolder rowViewHolder, Object row) {
44 | if (item instanceof Content.DataBean.WidgetsBean) {
45 | tv.getContext().startActivity(new Intent(tv.getContext(), VideoDetailActivity.class));
46 |
47 | }
48 |
49 | }
50 | });
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/row/TypeFiveListRowPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter.row;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.Intent;
5 | import android.widget.Toast;
6 |
7 | import androidx.leanback.widget.BaseOnItemViewClickedListener;
8 | import androidx.leanback.widget.HorizontalGridView;
9 | import androidx.leanback.widget.Presenter;
10 | import androidx.leanback.widget.RowPresenter;
11 |
12 | import com.github.isuperred.R;
13 | import com.github.isuperred.activity.VideoDetailActivity;
14 | import com.github.isuperred.base.BaseListRowPresenter;
15 | import com.github.isuperred.bean.Content;
16 | import com.github.isuperred.utils.FontDisplayUtil;
17 |
18 |
19 | public class TypeFiveListRowPresenter extends BaseListRowPresenter {
20 | @SuppressLint("RestrictedApi")
21 | @Override
22 | protected void initializeRowViewHolder(RowPresenter.ViewHolder holder) {
23 | super.initializeRowViewHolder(holder);
24 | final ViewHolder rowViewHolder = (ViewHolder) holder;
25 | rowViewHolder.getGridView().setHorizontalSpacing(FontDisplayUtil.dip2px(rowViewHolder.getGridView().getContext(), 24));
26 | rowViewHolder.getGridView().setFocusScrollStrategy(HorizontalGridView.FOCUS_SCROLL_ITEM);
27 |
28 | setOnItemViewClickedListener(new BaseOnItemViewClickedListener() {
29 | @Override
30 | public void onItemClicked(Presenter.ViewHolder itemViewHolder,
31 | Object item, RowPresenter.ViewHolder rowViewHolder, Object row) {
32 | if (item instanceof Content.DataBean.WidgetsBean) {
33 | Toast.makeText(((ViewHolder) rowViewHolder).getGridView().getContext(),
34 | "位置:" + ((ViewHolder) rowViewHolder).getGridView().getSelectedPosition(),
35 | Toast.LENGTH_SHORT).show();
36 | ((ViewHolder) rowViewHolder).getGridView().getContext().startActivity(new Intent(((ViewHolder) rowViewHolder).getGridView().getContext(), VideoDetailActivity.class));
37 |
38 | }
39 |
40 | }
41 | });
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/presenter/row/TypeZeroListRowPresenter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.presenter.row;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.Intent;
5 | import android.widget.TextView;
6 | import android.widget.Toast;
7 |
8 | import androidx.leanback.widget.BaseOnItemViewClickedListener;
9 | import androidx.leanback.widget.HorizontalGridView;
10 | import androidx.leanback.widget.Presenter;
11 | import androidx.leanback.widget.RowHeaderPresenter;
12 | import androidx.leanback.widget.RowPresenter;
13 |
14 | import com.github.isuperred.R;
15 | import com.github.isuperred.activity.VideoDetailActivity;
16 | import com.github.isuperred.base.BaseListRowPresenter;
17 | import com.github.isuperred.bean.Content;
18 | import com.github.isuperred.utils.FontDisplayUtil;
19 |
20 |
21 | public class TypeZeroListRowPresenter extends BaseListRowPresenter {
22 | @SuppressLint("RestrictedApi")
23 | @Override
24 | protected void initializeRowViewHolder(RowPresenter.ViewHolder holder) {
25 | super.initializeRowViewHolder(holder);
26 | final ViewHolder rowViewHolder = (ViewHolder) holder;
27 |
28 | rowViewHolder.getGridView().setHorizontalSpacing(FontDisplayUtil.dip2px(rowViewHolder.getGridView().getContext(), 24));
29 | rowViewHolder.getGridView().setFocusScrollStrategy(HorizontalGridView.FOCUS_SCROLL_ITEM);
30 | RowHeaderPresenter.ViewHolder vh = rowViewHolder.getHeaderViewHolder();
31 | TextView textView = vh.view.findViewById(R.id.row_header);
32 | textView.setTextSize(FontDisplayUtil.dip2px(textView.getContext(), 15));
33 | textView.setTextColor(textView.getContext().getResources().getColor(R.color.colorWhite));
34 | textView.setPadding(0, 0, 0, 20);
35 | setOnItemViewClickedListener(new BaseOnItemViewClickedListener() {
36 | @Override
37 | public void onItemClicked(Presenter.ViewHolder itemViewHolder,
38 | Object item, RowPresenter.ViewHolder rowViewHolder, Object row) {
39 | if (item instanceof Content.DataBean.WidgetsBean) {
40 | Toast.makeText(((ViewHolder) rowViewHolder).getGridView().getContext(),
41 | "位置:" + ((ViewHolder) rowViewHolder).getGridView().getSelectedPosition(),
42 | Toast.LENGTH_SHORT).show();
43 | ((ViewHolder) rowViewHolder).getGridView().getContext().startActivity(new Intent(((ViewHolder) rowViewHolder).getGridView().getContext(), VideoDetailActivity.class));
44 |
45 | }
46 |
47 | }
48 | });
49 |
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/utils/Constants.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.utils;
2 |
3 |
4 | public class Constants {
5 | public static final String URI_HIDE_TITLE = "uriHideTitle";
6 | public static final String URI_SHOW_TITLE = "uriShowTitle";
7 |
8 | /**
9 | * 精选页位置
10 | */
11 | public static final int TAG_FEATURE_POSITION = 4;
12 |
13 |
14 | public static final int TYPE_ZERO = 100;
15 | public static final int TYPE_ONE = 101;
16 | public static final int TYPE_TWO = 102;
17 | public static final int TYPE_THREE = 103;
18 | public static final int TYPE_FOUR = 104;
19 | public static final int TYPE_FIVE = 105;
20 | public static final int TYPE_SIX = 106;
21 | public static final int TYPE_SEVEN = 107;
22 | public static final int TYPE_EIGHT = 108;
23 | public static final int TYPE_NINE = 109;
24 | public static final int TYPE_TEN = 110;
25 | public static final int TYPE_ELEVEN = 111;
26 | public static final int TYPE_TWELVE = 112;
27 |
28 | public static final int DEFAULT_ERROR_VALUE = -1;
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/utils/FontDisplayUtil.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.utils;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | * dp、sp 、 px之间的相互转化的工具类
7 | *
8 | */
9 | public class FontDisplayUtil {
10 |
11 | public static int px2dip(Context context, float pxValue) {
12 | final float scale = context.getResources().getDisplayMetrics().density;
13 | return (int) (pxValue / scale + 0.5f);
14 | }
15 |
16 | public static int dip2px(Context context, float dipValue) {
17 | final float scale = context.getResources().getDisplayMetrics().density;
18 | return (int) (dipValue * scale + 0.5f);
19 | }
20 |
21 | public static int px2sp(Context context, float pxValue) {
22 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
23 | return (int) (pxValue / fontScale + 0.5f);
24 | }
25 |
26 | public static int sp2px(Context context, float spValue) {
27 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
28 | return (int) (spValue * fontScale + 0.5f);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/utils/LocalJsonResolutionUtil.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.utils;
2 |
3 | import android.content.Context;
4 | import android.content.res.AssetManager;
5 |
6 | import com.google.gson.Gson;
7 |
8 | import java.io.BufferedReader;
9 | import java.io.IOException;
10 | import java.io.InputStreamReader;
11 |
12 |
13 | public class LocalJsonResolutionUtil {
14 |
15 | public static String getJson(Context context, String fileName){
16 | StringBuilder stringBuilder = new StringBuilder();
17 | //获得assets资源管理器
18 | AssetManager assetManager = context.getAssets();
19 | //使用IO流读取json文件内容
20 | try {
21 | BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(
22 | assetManager.open(fileName),"utf-8"));
23 | String line;
24 | while ((line = bufferedReader.readLine()) != null) {
25 | stringBuilder.append(line);
26 | }
27 | } catch (IOException e) {
28 | e.printStackTrace();
29 | }
30 | return stringBuilder.toString();
31 | }
32 |
33 | public static T JsonToObject(String json, Class type) {
34 | Gson gson =new Gson();
35 | return gson.fromJson(json, type);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/widgets/AppVerticalGridView.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.widgets;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.util.Log;
6 | import android.view.KeyEvent;
7 |
8 | import androidx.leanback.widget.VerticalGridView;
9 |
10 | public class AppVerticalGridView extends VerticalGridView {
11 |
12 | private static final String TAG = "AppVerticalGridView";
13 | private int mNumColumns;
14 |
15 | public AppVerticalGridView(Context context) {
16 | this(context, null);
17 | }
18 |
19 | public AppVerticalGridView(Context context, AttributeSet attrs) {
20 | this(context, attrs, 0);
21 | }
22 |
23 | public AppVerticalGridView(Context context, AttributeSet attrs, int defStyle) {
24 | super(context, attrs, defStyle);
25 | }
26 |
27 | public void setColumnNumbers(int numColumns) {
28 | this.mNumColumns = numColumns;
29 | setNumColumns(numColumns);
30 | }
31 |
32 | @Override
33 | public boolean dispatchKeyEvent(KeyEvent event) {
34 | if (event.getAction() == KeyEvent.ACTION_DOWN) {
35 | switch (event.getKeyCode()) {
36 | case KeyEvent.KEYCODE_BACK:
37 | if (getSelectedPosition() > 0) {
38 | setSelectedPosition(0);
39 | return true;
40 | }
41 | break;
42 | case KeyEvent.KEYCODE_DPAD_DOWN:
43 |
44 | if (mNumColumns == 0 || getAdapter() == null) {
45 | break;
46 | }
47 |
48 | int itemCount = getAdapter().getItemCount();
49 | if (itemCount + 1 < mNumColumns || itemCount % mNumColumns == 0) {//这2种情况不需要单独处理
50 | break;
51 | }
52 |
53 | int currentPosition = getSelectedPosition();
54 | int lineNumbers = itemCount / mNumColumns + 1;
55 | int currentLine;
56 | if (currentPosition + 1 % mNumColumns == 0) {
57 | currentLine = currentPosition / mNumColumns;
58 | } else {
59 | currentLine = currentPosition/ mNumColumns + 1;
60 | }
61 | if ((currentLine == lineNumbers - 1)//倒数第二行
62 | && ((currentPosition + 1 + mNumColumns) > itemCount)) {
63 | setSelectedPositionSmooth(itemCount - 1);
64 | return true;
65 | }
66 | break;
67 | }
68 |
69 | }
70 | return super.dispatchKeyEvent(event);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/widgets/ImgConstraintLayout.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.widgets;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ValueAnimator;
5 | import android.content.Context;
6 | import android.util.AttributeSet;
7 | import android.util.Log;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.animation.AccelerateDecelerateInterpolator;
11 |
12 | import androidx.constraintlayout.widget.ConstraintLayout;
13 |
14 | import com.github.isuperred.R;
15 |
16 | public class ImgConstraintLayout extends ConstraintLayout implements View.OnFocusChangeListener {
17 |
18 |
19 | private ValueAnimator valueAnimator;
20 |
21 | public ImgConstraintLayout(Context context) {
22 | this(context, null);
23 | }
24 |
25 | public ImgConstraintLayout(Context context, AttributeSet attrs) {
26 | this(context, attrs, 0);
27 | }
28 |
29 | public ImgConstraintLayout(Context context, AttributeSet attrs, int defStyleAttr) {
30 | super(context, attrs, defStyleAttr);
31 | init(context);
32 | }
33 |
34 | private void init(Context context) {
35 | LayoutInflater.from(context).inflate(R.layout.layout_img_constra, this);
36 | setFocusable(true);
37 | setOnFocusChangeListener(this);
38 | }
39 |
40 | @Override
41 | public void onFocusChange(View v, boolean hasFocus) {
42 | if (v != null) {
43 | if (hasFocus) {
44 | Log.e("dch", "onFocusChange: " );
45 | move(v.findViewById(R.id.light));
46 | } else {
47 | remove();
48 | }
49 | }
50 | }
51 |
52 | private void move(final View view) {
53 |
54 | view.bringToFront();
55 | final int width = getWidth();
56 | valueAnimator = ValueAnimator.ofFloat(((Integer) (-width - 30)).floatValue(), ((Integer) (width + 30)).floatValue());
57 | valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
58 | @Override
59 | public void onAnimationUpdate(ValueAnimator animation) {
60 | float aFloat = (float) animation.getAnimatedValue();
61 | view.setTranslationX(aFloat);
62 | float alpha = aFloat / width;
63 | float a1 = (alpha > 0 ? (1 - alpha) : (1 + alpha));
64 | float a2 = (float) (a1 / 2 + 0.3);
65 | view.setAlpha(a2);
66 | Log.e("dch", "onFocusChange: " );
67 |
68 | }
69 | });
70 | valueAnimator.addListener(new Animator.AnimatorListener() {
71 | @Override
72 | public void onAnimationStart(Animator animation) {
73 | view.setVisibility(VISIBLE);
74 | }
75 |
76 | @Override
77 | public void onAnimationEnd(Animator animation) {
78 | view.setVisibility(GONE);
79 |
80 | }
81 |
82 | @Override
83 | public void onAnimationCancel(Animator animation) {
84 |
85 | }
86 |
87 | @Override
88 | public void onAnimationRepeat(Animator animation) {
89 |
90 | }
91 | });
92 | valueAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
93 | int d = width / 355 - 1;
94 | float ff = 1000 * (d * 0.25f + 1);
95 | valueAnimator.setDuration(((Float)ff).longValue());
96 | valueAnimator.setStartDelay(300);
97 | valueAnimator.start();
98 | }
99 |
100 | private void remove() {
101 | if (valueAnimator != null) {
102 | valueAnimator.cancel();
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/widgets/OrderHorizontalGridView.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.widgets;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.View;
6 |
7 | import androidx.leanback.widget.HorizontalGridView;
8 |
9 | public class OrderHorizontalGridView extends HorizontalGridView {
10 | public OrderHorizontalGridView(Context context) {
11 | this(context, null);
12 | }
13 |
14 | public OrderHorizontalGridView(Context context, AttributeSet attrs) {
15 | this(context, attrs, 0);
16 | }
17 |
18 | public OrderHorizontalGridView(Context context, AttributeSet attrs, int defStyle) {
19 | super(context, attrs, defStyle);
20 | setChildrenDrawingOrderEnabled(true);
21 | }
22 |
23 | @Override
24 | public int getChildDrawingOrder(int childCount, int i) {
25 | final LayoutManager layoutManager = getLayoutManager();
26 | if (layoutManager instanceof androidx.recyclerview.widget.GridLayoutManager) {
27 | final View focusedChild = getFocusedChild();
28 | return orderChildDrawing(childCount, i, focusedChild);
29 | }
30 | return super.getChildDrawingOrder(childCount, i);
31 | }
32 |
33 | private int orderChildDrawing(int childCount, int i, View focusedChild) {
34 | if (focusedChild == null) {
35 | return i;
36 | }
37 | int focusIndex = indexOfChild(focusedChild);
38 | // supposely 0 1 2 3 4 5 6 7 8 9, 4 is the center item
39 | // drawing order is 0 1 2 3 9 8 7 6 5 4
40 | if (i < focusIndex) {
41 | return i;
42 | } else if (i < childCount - 1) {
43 | return focusIndex + childCount - 1 - i;
44 | } else {
45 | return focusIndex;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/widgets/ScaleConstraintLayout.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.widgets;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.util.AttributeSet;
6 | import android.view.View;
7 |
8 | import androidx.constraintlayout.widget.ConstraintLayout;
9 |
10 | import com.github.isuperred.R;
11 | import com.github.isuperred.widgets.focus.MyFocusHighlightHelper;
12 |
13 |
14 | public class ScaleConstraintLayout extends ConstraintLayout implements View.OnFocusChangeListener {
15 |
16 | private MyFocusHighlightHelper.BrowseItemFocusHighlight mBrowseItemFocusHighlight;
17 |
18 | public ScaleConstraintLayout(Context context) {
19 | this(context, null);
20 | }
21 |
22 | public ScaleConstraintLayout(Context context, AttributeSet attrs) {
23 | this(context, attrs, 0);
24 | }
25 |
26 | public ScaleConstraintLayout(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | setFocusable(true);
29 | setClickable(true);
30 | setFocusableInTouchMode(true);
31 | setClipChildren(false);
32 | setClipToPadding(false);
33 | setOnFocusChangeListener(this);
34 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.ScaleConstraintLayout);
35 | int zoomIndex = typedArray.getInteger(R.styleable.ScaleConstraintLayout_scale_mode, MyFocusHighlightHelper.ZOOM_FACTOR_XXXSMALL);
36 | typedArray.recycle();
37 | if (mBrowseItemFocusHighlight == null) {
38 | mBrowseItemFocusHighlight =
39 | new MyFocusHighlightHelper
40 | .BrowseItemFocusHighlight(zoomIndex, false);
41 | }
42 |
43 | }
44 |
45 |
46 | @Override
47 | public void onFocusChange(View v, boolean hasFocus) {
48 | if (mBrowseItemFocusHighlight != null) {
49 | mBrowseItemFocusHighlight.onItemFocused(v, hasFocus);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/widgets/ScaleTextView.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.widgets;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.View;
6 |
7 | import androidx.appcompat.widget.AppCompatTextView;
8 |
9 | import com.github.isuperred.widgets.focus.MyFocusHighlightHelper;
10 |
11 | public class ScaleTextView extends AppCompatTextView implements View.OnFocusChangeListener {
12 | private MyFocusHighlightHelper.BrowseItemFocusHighlight mBrowseItemFocusHighlight;
13 |
14 | public ScaleTextView(Context context) {
15 | this(context,null);
16 | }
17 |
18 | public ScaleTextView(Context context, AttributeSet attrs) {
19 | this(context, attrs,0);
20 | }
21 |
22 | public ScaleTextView(Context context, AttributeSet attrs, int defStyleAttr) {
23 | super(context, attrs, defStyleAttr);
24 | setFocusable(true);
25 | setClickable(true);
26 | setFocusableInTouchMode(true);
27 | if(mBrowseItemFocusHighlight==null){
28 | mBrowseItemFocusHighlight =
29 | new MyFocusHighlightHelper
30 | .BrowseItemFocusHighlight(MyFocusHighlightHelper.ZOOM_FACTOR_XXXSMALL, false);
31 | }
32 | setOnFocusChangeListener(this);
33 | }
34 |
35 | @Override
36 | public void onFocusChange(View v, boolean hasFocus) {
37 | if (mBrowseItemFocusHighlight != null) {
38 | mBrowseItemFocusHighlight.onItemFocused(v, hasFocus);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/widgets/focus/FocusHighlightHandler.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.widgets.focus;
2 |
3 | import android.view.View;
4 |
5 | import androidx.annotation.RestrictTo;
6 |
7 | import static androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX;
8 |
9 | interface FocusHighlightHandler {
10 | /**
11 | * Called when an item gains or loses focus.
12 | * @hide
13 | *
14 | * @param view The view whose focus is changing.
15 | * @param hasFocus True if focus is gained; false otherwise.
16 | */
17 | @RestrictTo(LIBRARY_GROUP_PREFIX)
18 | void onItemFocused(View view, boolean hasFocus);
19 |
20 | /**
21 | * Called when the view is being created.
22 | */
23 | void onInitializeView(View view);
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/isuperred/widgets/focus/MyItemBridgeAdapter.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.widgets.focus;
2 |
3 | import android.view.View;
4 | import android.widget.AdapterView;
5 |
6 | import androidx.leanback.widget.ItemBridgeAdapter;
7 | import androidx.leanback.widget.ObjectAdapter;
8 | import androidx.leanback.widget.Presenter;
9 |
10 | public abstract class MyItemBridgeAdapter extends ItemBridgeAdapter {
11 |
12 | protected MyItemBridgeAdapter(ObjectAdapter adapter) {
13 | super(adapter, null);
14 | }
15 |
16 | @Override
17 | protected void onBind(final ViewHolder viewHolder) {
18 | if (getOnItemViewClickedListener() != null) {
19 | viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
20 | @Override
21 | public void onClick(View v) {
22 | getOnItemViewClickedListener().onItemClicked(v, viewHolder.getViewHolder(),
23 | viewHolder.getItem());
24 |
25 | }
26 | });
27 | viewHolder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
28 | @Override
29 | public boolean onLongClick(View v) {
30 | if (getOnItemViewLongClickedListener() != null) {
31 | return getOnItemViewLongClickedListener().onItemLongClicked(v, viewHolder.getViewHolder(),
32 | viewHolder.getItem());
33 | }
34 | return true;
35 | }
36 | });
37 | }
38 | if (getOnItemFocusChangedListener() != null) {
39 | viewHolder.itemView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
40 | @Override
41 | public void onFocusChange(View v, boolean hasFocus) {
42 | getOnItemFocusChangedListener().onItemFocusChanged(v, viewHolder.getViewHolder(),
43 | viewHolder.getItem(), hasFocus, viewHolder.getAdapterPosition());
44 | }
45 | });
46 | }
47 | super.onBind(viewHolder);
48 | }
49 |
50 | @Override
51 | protected void onUnbind(ViewHolder viewHolder) {
52 | super.onUnbind(viewHolder);
53 | viewHolder.itemView.setOnClickListener(null);
54 | if (getOnItemFocusChangedListener() != null) {
55 | viewHolder.itemView.setOnFocusChangeListener(null);
56 | }
57 | }
58 |
59 | public abstract OnItemViewClickedListener getOnItemViewClickedListener();
60 |
61 | public OnItemViewLongClickedListener getOnItemViewLongClickedListener() {
62 | return null;
63 | }
64 |
65 | public OnItemFocusChangedListener getOnItemFocusChangedListener() {
66 | return null;
67 | }
68 |
69 | public interface OnItemViewClickedListener {
70 | void onItemClicked(View focusView, Presenter.ViewHolder itemViewHolder, Object item);
71 | }
72 |
73 | public interface OnItemViewLongClickedListener {
74 | boolean onItemLongClicked(View focusView, Presenter.ViewHolder itemViewHolder, Object item);
75 | }
76 |
77 | public interface OnItemFocusChangedListener {
78 | void onItemFocusChanged(View focusView, Presenter.ViewHolder itemViewHolder, Object item, boolean hasFocus, int pos);
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/app_exit_anim_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/connecting.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/danmu_icon_click_effect.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/danmu_icon_scale.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/dialog_main_hide_amination.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/dialog_main_show_amination.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/dialog_root_hide_amin.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/dialog_root_show_amin.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/douban_dialog_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/douban_dialog_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_in_zoom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_in_zoom_into_orig.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_out_zoom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_out_zoom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/host_cycle.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/host_shake.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/host_shake_y.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/inav_app_exit_anim_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/live_award_slide_out_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/live_star_slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/live_star_slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/menu_dialog_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/menu_dialog_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/multi_mode_dialog_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/multi_mode_dialog_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/passport_expand_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/passport_expand_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/passport_ott_rotate_inverse.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/passport_shrink_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/passport_shrink_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/passport_slide_down_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/passport_slide_down_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/passport_slide_up_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/passport_slide_up_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/shake_rotate.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/share_cycle.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/toast_dialog_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/toast_dialog_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/tui_alert_dialog_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/tui_alert_dialog_exit.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/tui_dialog_enter_anim.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/tui_dialog_exit_anim.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/xuanji_dialog_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/xuanji_dialog_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/yingshi_activity_enter_300.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/yingshi_activity_out_300.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/capsule_bg_unfocus.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/capsule_bg_unfocus.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/capsule_button_focus.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/capsule_button_focus.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/focus_oval_bg.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/focus_oval_bg.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/focus_pause.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/focus_pause.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/focus_selector.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/focus_selector.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/home_tab_focus.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/home_tab_focus.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/ic_ok_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/ic_ok_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/ic_skip_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/ic_skip_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/ic_skip_normal_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/ic_skip_normal_right.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/module_item_focus_raw.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/module_item_focus_raw.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/video_error_big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/video_error_big.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/video_error_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/video_error_small.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_black1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_black1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_black2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_black2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_black3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_black3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_black4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_black4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_black5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_black5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_blue1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_blue1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_blue2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_blue2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_blue3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_blue3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_blue4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_blue4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_blue5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_blue5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_white1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_white1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_white2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_white2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_white3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_white3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_white4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_white4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/wave_white5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/wave_white5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/yingshi_home_item_bg_mask.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-mdpi-v4/yingshi_home_item_bg_mask.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/back_to_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/back_to_top.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/back_top_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/back_top_top.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_danmu_arrow_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_danmu_arrow_left.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_danmu_arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_danmu_arrow_right.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop_arrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop_down.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop_down.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop_up.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop_up.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop_up_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_danmu_pop_up_arrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_danmu_up_arrow_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_danmu_up_arrow_left.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_danmu_up_arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_danmu_up_arrow_right.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bg_new_danma_msg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bg_new_danma_msg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/bundle_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/bundle_bg.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/common_view_focus_shadow_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/common_view_focus_shadow_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/damu_star_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/damu_star_mark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_character_left_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_character_left_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_color_member.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_color_member.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_color_vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_color_vip.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_position_scroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_position_scroll.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_position_scroll_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_position_scroll_checked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_position_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_position_top.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_position_top_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_position_top_checked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_setting_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_setting_btn.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_vip.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmaku_write_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmaku_write_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_cosplay_default_avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_cosplay_default_avatar.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_dialog_edit_bg.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_dialog_edit_bg.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_dialog_edit_question_bg.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_dialog_edit_question_bg.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_cancel.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_hate_icon_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_hate_icon_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_hate_icon_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_hate_icon_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_hate_icon_unchecked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_hate_icon_unchecked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_like_icon_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_like_icon_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_like_icon_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_like_icon_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_like_icon_unchecked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_like_icon_unchecked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_like_plus_one.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_lh_dialog_like_plus_one.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_like_flag_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_like_flag_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_setting_banned_word_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_setting_banned_word_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_setting_banned_word_enabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_setting_banned_word_enabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_bottom.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_bottom_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_bottom_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_color.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_color_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_color_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_top.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_top_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/danmu_setting_filter_top_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/dialog_background.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/dialog_background.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/ethernet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/ethernet.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/gift.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/gift.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/history.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/ic_danmu_settings_banned_word.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/ic_danmu_settings_banned_word.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/ic_danmu_settings_banned_word_delet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/ic_danmu_settings_banned_word_delet.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_close_popup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_close_popup.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_cosplay_bootom_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_cosplay_bootom_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_cosplay_bootom_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_cosplay_bootom_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_question.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_question.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_question_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_question_checked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_question_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_question_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_type_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmaku_type_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_add1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_add1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_avatar.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_card.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_card.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_card_clicked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_card_clicked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_diss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_diss.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_heart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_heart.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_heart_clicked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_heart_clicked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_like.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_msg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_msg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_plus_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_plus_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_qmark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_qmark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_danmu_question.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_danmu_question.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_down_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_down_arrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_qa_interact_front.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_qa_interact_front.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_qa_interact_pos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_qa_interact_pos.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_star_danmu_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_star_danmu_share.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_star_danmu_timer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_star_danmu_timer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon_star_danmu_viewer_num.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/icon_star_danmu_viewer_num.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/item_default_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/item_default_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/item_default_bg_detail.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/item_default_bg_detail.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/item_default_bg_detail_focus.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/item_default_bg_detail_focus.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/item_default_bg_snapshot.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/item_default_bg_snapshot.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/item_default_img.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/item_default_img.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/login.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/look_around.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/look_around.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/movie.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/movie.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/no_net.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/no_net.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/search.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/seekbar_bg.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/seekbar_bg.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/seekbar_progress.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/seekbar_progress.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/seekbar_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/seekbar_thumb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/statusbar_ethernet_exception.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/statusbar_ethernet_exception.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/statusbar_ethernet_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/statusbar_ethernet_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/statusbar_wifi_signal_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/statusbar_wifi_signal_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/statusbar_wifi_signal_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/statusbar_wifi_signal_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/statusbar_wifi_signal_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/statusbar_wifi_signal_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/statusbar_wifi_signal_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/statusbar_wifi_signal_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/statusbar_wlan_exception.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/statusbar_wlan_exception.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/statusbar_wlan_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/statusbar_wlan_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/tab_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/tab_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/tag_bg_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/tag_bg_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/tag_bg_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/tag_bg_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/tag_bg_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/tag_bg_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/tag_bg_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/tag_bg_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/tag_bg_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/tag_bg_5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/tag_bg_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/tag_bg_6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/tips.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/tips.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/view_focus_shadow_thick_no_shadow.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/view_focus_shadow_thick_no_shadow.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/vip.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/waterfall_default_title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/waterfall_default_title.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/wifi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xhdpi-v4/wifi.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_10.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_7.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_8.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/color_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/color_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/danmaku_system_click_guide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/danmaku_system_click_guide.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/danmaku_system_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/danmaku_system_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/danmaku_system_youku_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/danmaku_system_youku_mark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxhdpi-v4/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/bg_focus_border_radius3_no_solid.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
-
6 |
7 |
8 |
9 |
10 |
11 | -
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/danmaku_keyboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxxhdpi-v4/danmaku_keyboard.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/danmu_star_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/app/src/main/res/drawable-xxxhdpi-v4/danmu_star_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_app_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
8 |
9 |
10 |
11 |
12 | -
17 |
18 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_app_focus_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_app_no_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
8 |
9 |
10 |
11 | -
16 |
17 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_focus_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_gradient_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_shape_app.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_shape_default.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_focus_bg_corner15_with_default_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_focus_bg_corner15_without_default_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_focus_bg_corner3_video_detail_introduction.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_focus_bg_corner3_with_default_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_text_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_corner15_color_14ffffff.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_corner15_color_ff26b5ff.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_corner3_color_14ffffff.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_corner3_color_ff26b5ff.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_app_installed.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
23 |
24 |
35 |
36 |
45 |
46 |
57 |
58 |
66 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_video_play.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_app_installed.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
25 |
26 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_episode_content_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_episode_group_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_main_title.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_type_five_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
30 |
31 |
40 |
41 |
53 |
54 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_type_four_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
23 |
24 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_type_one_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_type_seven_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_type_six_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
30 |
31 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_type_three_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_type_two_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_type_zero_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_img_constra.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/lb_img_row_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/type_seven_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 | #020307
7 | #FFFFFF
8 | #000000
9 | #ff26b5ff
10 | #14FFFFFF
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LeanbackTvSample
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
20 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - 134%
4 | - 118%
5 | - 114%
6 | - 110%
7 | - 106%
8 | - 104%
9 | - 102%
10 |
--------------------------------------------------------------------------------
/app/src/test/java/com/github/isuperred/leanbacktvsample/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.leanbacktvsample;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.4.2'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 | }
22 | }
23 |
24 | task clean(type: Delete) {
25 | delete rootProject.buildDir
26 | }
27 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Sep 17 20:58:42 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/library-player/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library-player/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.3"
6 |
7 | defaultConfig {
8 | minSdkVersion 17
9 | targetSdkVersion 29
10 | versionCode 1
11 | versionName "1.0"
12 |
13 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
14 | consumerProguardFiles 'consumer-rules.pro'
15 | }
16 |
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 |
24 | }
25 |
26 | dependencies {
27 | implementation fileTree(dir: 'libs', include: ['*.jar'])
28 | //noinspection GradleDependency
29 | api 'com.shuyu:gsyVideoPlayer-java:6.0.3'
30 | //noinspection GradleDependency
31 | implementation 'com.shuyu:gsyVideoPlayer-armv7a:6.0.3'
32 | implementation 'androidx.appcompat:appcompat:1.1.0'
33 | testImplementation 'junit:junit:4.12'
34 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
35 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
36 | }
37 |
--------------------------------------------------------------------------------
/library-player/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/library-player/consumer-rules.pro
--------------------------------------------------------------------------------
/library-player/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/library-player/src/androidTest/java/com/github/isuperred/player/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.player;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.github.isuperred.player.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/library-player/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/library-player/src/main/java/com/github/isuperred/player/SuperRedVideoPlayer.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.player;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.View;
6 |
7 | import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
8 |
9 | public class SuperRedVideoPlayer extends StandardGSYVideoPlayer {
10 | public SuperRedVideoPlayer(Context context, Boolean fullFlag) {
11 | super(context, fullFlag);
12 | hideFullScreenButton();
13 | }
14 |
15 | public SuperRedVideoPlayer(Context context) {
16 | super(context);
17 | hideFullScreenButton();
18 | }
19 |
20 | public SuperRedVideoPlayer(Context context, AttributeSet attrs) {
21 | super(context, attrs);
22 | hideFullScreenButton();
23 | }
24 |
25 | private void hideFullScreenButton() {
26 | mTopContainer.findViewById(R.id.back).setVisibility(View.GONE);
27 | mTopContainer.findViewById(R.id.title).setVisibility(View.GONE);
28 | getFullscreenButton().setVisibility(View.GONE);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/library-player/src/test/java/com/github/isuperred/player/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.github.isuperred.player;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/logo/leanback_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/logo/leanback_logo.png
--------------------------------------------------------------------------------
/screenshot/LeanbackTvSample_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/screenshot/LeanbackTvSample_1.png
--------------------------------------------------------------------------------
/screenshot/LeanbackTvSample_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/screenshot/LeanbackTvSample_2.png
--------------------------------------------------------------------------------
/screenshot/LeanbackTvSample_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/screenshot/LeanbackTvSample_3.png
--------------------------------------------------------------------------------
/screenshot/LeanbackTvSample_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/screenshot/LeanbackTvSample_4.png
--------------------------------------------------------------------------------
/screenshot/LeanbackTvSample_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/screenshot/LeanbackTvSample_5.png
--------------------------------------------------------------------------------
/screenshot/LeanbackTvSample_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iSuperRed/LeanbackTvSample/4240e01bde750037c6ecd7220b32c2dee84935ea/screenshot/LeanbackTvSample_6.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | include ':library-player'
3 |
--------------------------------------------------------------------------------