├── .gitignore ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── libs │ ├── BaiduLBS_Android.jar │ ├── arm64-v8a │ │ └── liblocSDK7.so │ ├── armeabi-v7a │ │ └── liblocSDK7.so │ ├── armeabi │ │ └── liblocSDK7.so │ ├── circularMusicProgressbar.aar │ ├── gson-2.3.1.jar │ ├── jsoup-1.9.2.jar │ ├── photoview-library-1.2.2.jar │ ├── x86 │ │ └── liblocSDK7.so │ └── x86_64 │ │ └── liblocSDK7.so ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── app │ │ └── teacup │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── app │ │ │ └── teacup │ │ │ ├── AboutActivity.java │ │ │ ├── BaseActivity.java │ │ │ ├── BookDetailActivity.java │ │ │ ├── FanjuNewsActivity.java │ │ │ ├── FanjuVideoActivity.java │ │ │ ├── FindBookActivity.java │ │ │ ├── FlashActivity.java │ │ │ ├── GuideActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── MoreMovieShowActivity.java │ │ │ ├── MoviePlayActivity.java │ │ │ ├── MusicDetailActivity.java │ │ │ ├── MusicPlayActivity.java │ │ │ ├── NewsDetailActivity.java │ │ │ ├── PhotoActivity.java │ │ │ ├── SearchActivity.java │ │ │ ├── SettingActivity.java │ │ │ ├── ShowPhotoActivity.java │ │ │ ├── ShowPhotoListActivity.java │ │ │ ├── ThemeChangeActivity.java │ │ │ ├── WeatherActivity.java │ │ │ ├── adapter │ │ │ ├── FanjuNewsRecyclerAdapter.java │ │ │ ├── FanjuRecyclerAdapter.java │ │ │ ├── FindRecycleAdapter.java │ │ │ ├── MoreMovieRecyclerAdapter.java │ │ │ ├── MovieDetailRecyclerAdapter.java │ │ │ ├── MusicRecyclerAdapter.java │ │ │ ├── NewsRecyclerAdapter.java │ │ │ ├── PagerAdapter.java │ │ │ ├── PhotoGaoxiaoRecyclerAdapter.java │ │ │ ├── PhotoQiubaiRecyclerAdapter.java │ │ │ ├── PhotoRecyclerAdapter.java │ │ │ ├── ReactViewPagerAdapter.java │ │ │ └── TvPlayRecyclerAdapter.java │ │ │ ├── bean │ │ │ ├── Music │ │ │ │ ├── MusicDetail.java │ │ │ │ ├── MusicDetailInfo.java │ │ │ │ └── MusicInfo.java │ │ │ ├── News │ │ │ │ ├── NewsHeadInfo.java │ │ │ │ └── NewsInfo.java │ │ │ ├── PhotoInfo.java │ │ │ ├── WeatherInfo.java │ │ │ ├── book │ │ │ │ ├── Book.java │ │ │ │ ├── BookInfo.java │ │ │ │ └── FindBookInfo.java │ │ │ ├── fanju │ │ │ │ ├── FanjuInfo.java │ │ │ │ ├── FanjuNewInfo.java │ │ │ │ └── FanjuVideoInfo.java │ │ │ └── movie │ │ │ │ ├── MovieDetailInfo.java │ │ │ │ ├── MovieItemInfo.java │ │ │ │ ├── MoviePlayInfo.java │ │ │ │ └── TvItemInfo.java │ │ │ ├── fragment │ │ │ ├── BaseFragment.java │ │ │ ├── DetailFragment.java │ │ │ ├── mainPage │ │ │ │ ├── FanjuFragment.java │ │ │ │ ├── MovieFragment.java │ │ │ │ ├── MusicFragment.java │ │ │ │ └── NewsFragment.java │ │ │ └── photo │ │ │ │ ├── DoubanMeiziFragment.java │ │ │ │ ├── GaoxiaoFragment.java │ │ │ │ ├── JiandanMeiziFragment.java │ │ │ │ └── QiubaiFragment.java │ │ │ ├── manager │ │ │ └── WrapContentGridLayoutManager.java │ │ │ ├── receiver │ │ │ └── ConnectionChangeReceiver.java │ │ │ ├── ui │ │ │ ├── CenterViewPager.java │ │ │ ├── MoreTextView.java │ │ │ ├── ReactViewPager.java │ │ │ ├── SettingItemView.java │ │ │ ├── ThemeItemView.java │ │ │ └── ZoomOutPageTransformer.java │ │ │ └── util │ │ │ ├── HttpUtils.java │ │ │ ├── JsonUtils.java │ │ │ ├── LogcatUtils.java │ │ │ ├── OkHttpUtils.java │ │ │ ├── ThreadPoolUtils.java │ │ │ ├── ToolUtils.java │ │ │ └── urlUtils.java │ └── res │ │ ├── anim │ │ ├── anim_in.xml │ │ ├── anim_out.xml │ │ └── anim_stay.xml │ │ ├── drawable-xhdpi │ │ ├── about.png │ │ ├── about_header.jpg │ │ ├── back.png │ │ ├── biz_plugin_weather_baoxue.png │ │ ├── biz_plugin_weather_baoyu.png │ │ ├── biz_plugin_weather_dabaoyu.png │ │ ├── biz_plugin_weather_daxue.png │ │ ├── biz_plugin_weather_dayu.png │ │ ├── biz_plugin_weather_duoyun.png │ │ ├── biz_plugin_weather_leizhenyu.png │ │ ├── biz_plugin_weather_leizhenyubingbao.png │ │ ├── biz_plugin_weather_qing.png │ │ ├── biz_plugin_weather_shachenbao.png │ │ ├── biz_plugin_weather_tedabaoyu.png │ │ ├── biz_plugin_weather_wu.png │ │ ├── biz_plugin_weather_xiaoxue.png │ │ ├── biz_plugin_weather_xiaoyu.png │ │ ├── biz_plugin_weather_yin.png │ │ ├── biz_plugin_weather_yujiaxue.png │ │ ├── biz_plugin_weather_zhenxue.png │ │ ├── biz_plugin_weather_zhenyu.png │ │ ├── biz_plugin_weather_zhongxue.png │ │ ├── biz_plugin_weather_zhongyu.png │ │ ├── book.png │ │ ├── book_bg.jpg │ │ ├── button_bg.png │ │ ├── flash_icon.png │ │ ├── flash_tip.png │ │ ├── gif.png │ │ ├── guide_1.jpg │ │ ├── guide_2.jpg │ │ ├── guide_3.png │ │ ├── guide_4.jpg │ │ ├── header.jpg │ │ ├── loading_photo.png │ │ ├── main_bg.png │ │ ├── main_load_bg.jpg │ │ ├── movie_top.jpg │ │ ├── music_heart.png │ │ ├── music_info.png │ │ ├── pausemusic.png │ │ ├── photo_bg.png │ │ ├── photo_default.jpg │ │ ├── photo_icon.png │ │ ├── photo_loaderror.png │ │ ├── playmusic.png │ │ ├── search.png │ │ ├── setting.png │ │ ├── share.png │ │ ├── theme.png │ │ ├── weather.png │ │ └── weather_bg.jpg │ │ ├── drawable │ │ ├── checkbox.xml │ │ ├── cursor_color.xml │ │ ├── dot_bg.xml │ │ ├── dot_focured.xml │ │ ├── dot_nomal.xml │ │ ├── ic_fast_forward_black_24dp.xml │ │ ├── ic_fast_rewind_black_24dp.xml │ │ ├── photo_gaoxiao_item_bg.xml │ │ ├── point_bg.xml │ │ ├── point_focured.xml │ │ ├── point_nomal.xml │ │ ├── progressbar.xml │ │ ├── slide_no.png │ │ └── slide_yes.png │ │ ├── layout-v21 │ │ ├── item_fanju_view.xml │ │ └── item_news_view.xml │ │ ├── layout │ │ ├── activity_about.xml │ │ ├── activity_change_theme.xml │ │ ├── activity_main.xml │ │ ├── activity_music_detail_item.xml │ │ ├── activity_music_play.xml │ │ ├── activity_news_detail.xml │ │ ├── activity_setting.xml │ │ ├── activity_weather.xml │ │ ├── base_fragment.xml │ │ ├── common_recycler_view.xml │ │ ├── find_book_activity.xml │ │ ├── fragment_detail.xml │ │ ├── item_activity_guide.xml │ │ ├── item_base_header.xml │ │ ├── item_base_header_view.xml │ │ ├── item_fanju_news_view.xml │ │ ├── item_fanju_video_view.xml │ │ ├── item_fanju_view.xml │ │ ├── item_find_fragment.xml │ │ ├── item_movie_detail_view.xml │ │ ├── item_movie_more_view.xml │ │ ├── item_movie_play_view.xml │ │ ├── item_music_detail.xml │ │ ├── item_music_view.xml │ │ ├── item_news_view.xml │ │ ├── item_photo_gaoxiao_view.xml │ │ ├── item_photo_qiubai_view.xml │ │ ├── item_photo_view.xml │ │ ├── item_weather.xml │ │ ├── layout_activity_guide.xml │ │ ├── layout_book_detail.xml │ │ ├── layout_fanju_news_view.xml │ │ ├── layout_fanjuvideo_view.xml │ │ ├── layout_flash_activity.xml │ │ ├── layout_movie_more_view.xml │ │ ├── layout_music_detail.xml │ │ ├── layout_music_play.xml │ │ ├── layout_search_view.xml │ │ ├── layout_show_photo.xml │ │ ├── layout_show_photo_list.xml │ │ ├── layout_tv_play_view.xml │ │ ├── main_layout.xml │ │ ├── navigation_header.xml │ │ ├── navigation_toolbar.xml │ │ ├── photo_popupwindow_layout.xml │ │ ├── setting_item_view.xml │ │ ├── stretch_view_layout.xml │ │ └── theme_item_view.xml │ │ ├── menu │ │ ├── menu_main.xml │ │ ├── navigation_menu.xml │ │ └── search_menu.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── app │ └── teacup │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── key └── keystore.properties ├── screenshot ├── photo1.jpg ├── photo2.jpg ├── photo3.jpg ├── photo4.jpg ├── photo5.jpg ├── photo6.jpg ├── photo7.jpg ├── photo8.jpg └── photo9.jpg ├── settings.gradle └── teacup-release.apk /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # Intellij 36 | *.iml 37 | .idea/workspace.xml 38 | 39 | # Keystore files 40 | *.jks 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TeaCup 2 | A Material Design app for entertainment 3 | 4 | ## functional list 5 | 6 | - fine interface 7 | - read fresh news 8 | - read excellent article 9 | - hear the unique music 10 | - listen to the radio 11 | - view picture 12 | 13 | ## ScreenShot 14 |

15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |

23 | 24 | ## Implementation 25 | 26 | ### Data 27 | 28 | Most data are fetched from network while some of them are cached for offline. 29 | 30 | - okhttp with custom extensions for network requests. 31 | - Gson for data model. 32 | - Glide for image loading. 33 | - jsoup for parse html. 34 | 35 | Data sources: 36 | 37 | - [煎蛋网](http://jandan.net/) 38 | - [豆瓣读书](https://book.douban.com/) 39 | - [神马电影网](http://www.82ke.com/) 40 | - [落网](http://www.luoo.net/) 41 | - [糗事百科](http://www.qiushibaike.com/) 42 | - [第一弹](http://www.diyidan.com/) 43 | 44 | ### UI 45 | 46 | - Material Design implemented with AppCompat, Design, CardView and RecyclerView from support library and some customization. 47 | - Animation implemented with shared element transition on Lollipop and above. 48 | 49 | ### location 50 | Use Baidu maps to locate. 51 | 52 | ## Libraries created for this project 53 | 54 | - [MiniMusicView](https://github.com/henryblue/MiniMusicView) 55 | - [MxVideoPlayer](https://github.com/henryblue/MxVideoPlayer) 56 | - [okhttp](https://github.com/square/okhttp) 57 | - [xrecyclerview](https://github.com/jianghejie/XRecyclerView) 58 | - [circleimageview](https://github.com/hdodenhof/CircleImageView) 59 | - [materialdialog](https://github.com/drakeet/MaterialDialog) 60 | 61 | ## Third party libraries 62 | 63 | - [PhotoView](https://github.com/chrisbanes/PhotoView) 64 | - [Glide](https://github.com/bumptech/glide) 65 | - [Gson](https://github.com/google/gson) 66 | - [jsoup](https://jsoup.org/download) 67 | 68 | ## Building 69 | 70 | You can download the APK file from [releases](/teacup-release.apk) of this project. 71 | 72 | 73 | ## License 74 | 75 | ``` 76 | Copyright 2016 henryblue 77 | 78 | Licensed under the Apache License, Version 2.0 (the "License"); 79 | you may not use this file except in compliance with the License. 80 | You may obtain a copy of the License at 81 | 82 | http://www.apache.org/licenses/LICENSE-2.0 83 | 84 | Unless required by applicable law or agreed to in writing, software 85 | distributed under the License is distributed on an "AS IS" BASIS, 86 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 87 | See the License for the specific language governing permissions and 88 | limitations under the License. 89 | ``` 90 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | def keystorePropertiesFile = rootProject.file("key/keystore.properties") 4 | def keystoreProperties = null 5 | boolean isKeyPropertiesExist = false 6 | if (keystorePropertiesFile != null && keystorePropertiesFile.exists()) { 7 | keystoreProperties = new Properties() 8 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 9 | isKeyPropertiesExist = true 10 | } 11 | 12 | android { 13 | boolean isKeyExist = false 14 | if (isKeyPropertiesExist) { 15 | signingConfigs { 16 | release { 17 | keyAlias keystoreProperties['keyAlias'] 18 | keyPassword keystoreProperties['keyPassword'] 19 | storeFile file(keystoreProperties['storeFile']) 20 | storePassword keystoreProperties['storePassword'] 21 | if (storeFile.exists()) { 22 | isKeyExist = true 23 | } 24 | } 25 | } 26 | } 27 | 28 | compileSdkVersion project.compileSdkVersion 29 | buildToolsVersion project.buildToolsVersion 30 | 31 | sourceSets { 32 | main { 33 | jniLibs.srcDirs = ['libs'] 34 | } 35 | } 36 | defaultConfig { 37 | multiDexEnabled true 38 | applicationId project.applicationId 39 | minSdkVersion project.minSdkVersion 40 | targetSdkVersion project.targetSdkVersion 41 | versionCode project.versionCode 42 | versionName project.versionName 43 | } 44 | buildTypes { 45 | release { 46 | minifyEnabled true 47 | signingConfig signingConfigs.release 48 | zipAlignEnabled true 49 | shrinkResources true 50 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 51 | manifestPlaceholders = [ 52 | APP_NAME : "@string/app_name", 53 | APPLICATION_ID: "@string/application_id" 54 | ] 55 | } 56 | } 57 | } 58 | repositories { 59 | flatDir { 60 | dirs 'libs' 61 | } 62 | } 63 | 64 | dependencies { 65 | compile fileTree(include: ['*.jar'], dir: 'libs') 66 | compile(name: 'circularMusicProgressbar', ext: 'aar') 67 | testCompile 'junit:junit:4.12' 68 | compile "com.android.support:appcompat-v7:$supportVersion" 69 | compile "com.android.support:support-v4:$supportVersion" 70 | compile "com.android.support:design:$supportVersion" 71 | compile "com.android.support:cardview-v7:$supportVersion" 72 | 73 | compile 'com.rengwuxian.materialedittext:library:2.1.4' 74 | compile 'com.github.bumptech.glide:glide:3.7.0' 75 | compile 'com.jcodecraeer:xrecyclerview:1.3.2' 76 | compile 'de.hdodenhof:circleimageview:1.3.0' 77 | compile 'org.apache.httpcomponents:httpcore:4.4.4' 78 | compile 'com.henryblue.mxvideoplayer:xvideoplayer:1.1.7' 79 | compile 'com.squareup.okhttp:okhttp:2.7.0' 80 | compile 'me.drakeet.materialdialog:library:1.3.1' 81 | compile 'com.henryblue.minimusicview:library:0.9.8' 82 | compile files('libs/gson-2.3.1.jar') 83 | compile files('libs/jsoup-1.9.2.jar') 84 | compile files('libs/BaiduLBS_Android.jar') 85 | } 86 | -------------------------------------------------------------------------------- /app/libs/BaiduLBS_Android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/BaiduLBS_Android.jar -------------------------------------------------------------------------------- /app/libs/arm64-v8a/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/arm64-v8a/liblocSDK7.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/armeabi-v7a/liblocSDK7.so -------------------------------------------------------------------------------- /app/libs/armeabi/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/armeabi/liblocSDK7.so -------------------------------------------------------------------------------- /app/libs/circularMusicProgressbar.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/circularMusicProgressbar.aar -------------------------------------------------------------------------------- /app/libs/gson-2.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/gson-2.3.1.jar -------------------------------------------------------------------------------- /app/libs/jsoup-1.9.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/jsoup-1.9.2.jar -------------------------------------------------------------------------------- /app/libs/photoview-library-1.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/photoview-library-1.2.2.jar -------------------------------------------------------------------------------- /app/libs/x86/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/x86/liblocSDK7.so -------------------------------------------------------------------------------- /app/libs/x86_64/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/libs/x86_64/liblocSDK7.so -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\android-studio-sdk-windows/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -keepattributes EnclosingMethod 19 | -dontwarn org.apache.http.** 20 | -dontwarn okio.** 21 | -dontwarn uk.co.senab.** 22 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/app/teacup/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 44 | 45 | 46 | 47 | 50 | 53 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 68 | 71 | 72 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.ActionBar; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.support.v7.widget.Toolbar; 7 | import android.view.MenuItem; 8 | 9 | import com.app.teacup.util.ToolUtils; 10 | 11 | 12 | public class AboutActivity extends AppCompatActivity { 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | ToolUtils.onActivityCreateSetTheme(this); 18 | setContentView(R.layout.activity_about); 19 | initToolBar(); 20 | } 21 | 22 | private void initToolBar() { 23 | Toolbar mToolbar = (Toolbar) findViewById(R.id.activity_navigation_toolbar); 24 | if (mToolbar != null) { 25 | mToolbar.setTitle(getString(R.string.about)); 26 | } 27 | setSupportActionBar(mToolbar); 28 | ActionBar actionBar = getSupportActionBar(); 29 | if (actionBar != null) { 30 | actionBar.setHomeButtonEnabled(true); 31 | actionBar.setDisplayHomeAsUpEnabled(true); 32 | } 33 | } 34 | 35 | @Override 36 | public boolean onOptionsItemSelected(MenuItem item) { 37 | switch (item.getItemId()) { 38 | case android.R.id.home: 39 | onBackPressed(); 40 | return true; 41 | default: 42 | return super.onOptionsItemSelected(item); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/PhotoActivity.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup; 2 | 3 | import android.os.Bundle; 4 | import android.support.design.widget.TabLayout; 5 | import android.support.v4.app.Fragment; 6 | import android.support.v4.view.ViewPager; 7 | import android.support.v7.app.AppCompatActivity; 8 | import android.support.v7.widget.Toolbar; 9 | import android.view.MenuItem; 10 | 11 | import com.app.teacup.adapter.PagerAdapter; 12 | import com.app.teacup.fragment.photo.DoubanMeiziFragment; 13 | import com.app.teacup.fragment.photo.GaoxiaoFragment; 14 | import com.app.teacup.fragment.photo.JiandanMeiziFragment; 15 | import com.app.teacup.fragment.photo.QiubaiFragment; 16 | import com.app.teacup.util.ToolUtils; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | 22 | public class PhotoActivity extends AppCompatActivity { 23 | 24 | @Override 25 | protected void onCreate(Bundle savedInstanceState) { 26 | super.onCreate(savedInstanceState); 27 | ToolUtils.onActivityCreateSetTheme(this); 28 | setContentView(R.layout.main_layout); 29 | initView(); 30 | initToolBar(); 31 | } 32 | 33 | private void initView() { 34 | List mFragmentLists = new ArrayList<>(); 35 | TabLayout mTabLayout = (TabLayout) findViewById(R.id.main_tab_layout); 36 | ViewPager mViewPager = (ViewPager) findViewById(R.id.main_view_pager); 37 | 38 | JiandanMeiziFragment jiandanMeiziFragment = new JiandanMeiziFragment(); 39 | mFragmentLists.add(jiandanMeiziFragment); 40 | DoubanMeiziFragment doubanMeiziFragment = new DoubanMeiziFragment(); 41 | mFragmentLists.add(doubanMeiziFragment); 42 | GaoxiaoFragment gaoxiaoFragment = new GaoxiaoFragment(); 43 | mFragmentLists.add(gaoxiaoFragment); 44 | QiubaiFragment qiubaiFragment = new QiubaiFragment(); 45 | mFragmentLists.add(qiubaiFragment); 46 | 47 | PagerAdapter mPagerAdapter = new PagerAdapter(getSupportFragmentManager(), 48 | mFragmentLists, getResources().getStringArray(R.array.tab_photo)); 49 | 50 | if (mViewPager != null) { 51 | mViewPager.setOffscreenPageLimit(3); 52 | mViewPager.setAdapter(mPagerAdapter); 53 | if (mTabLayout != null) { 54 | mTabLayout.setupWithViewPager(mViewPager); 55 | mTabLayout.setTabMode(TabLayout.MODE_FIXED); 56 | } 57 | } 58 | } 59 | 60 | private void initToolBar() { 61 | Toolbar mToolbar = (Toolbar) findViewById(R.id.activity_main_toolbar); 62 | if (mToolbar != null) { 63 | mToolbar.setTitle(getString(R.string.item_package)); 64 | } 65 | setSupportActionBar(mToolbar); 66 | if (getSupportActionBar() != null) { 67 | getSupportActionBar().setHomeButtonEnabled(true); 68 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 69 | } 70 | } 71 | 72 | @Override 73 | public boolean onOptionsItemSelected(MenuItem item) { 74 | switch (item.getItemId()) { 75 | case android.R.id.home: 76 | onBackPressed(); 77 | return true; 78 | default: 79 | return super.onOptionsItemSelected(item); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/ThemeChangeActivity.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup; 2 | 3 | import android.content.SharedPreferences; 4 | import android.os.Bundle; 5 | import android.support.v4.content.ContextCompat; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.support.v7.widget.Toolbar; 8 | import android.view.MenuItem; 9 | import android.view.View; 10 | import android.widget.LinearLayout; 11 | 12 | import com.app.teacup.ui.ThemeItemView; 13 | import com.app.teacup.util.ToolUtils; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | 19 | public class ThemeChangeActivity extends AppCompatActivity { 20 | 21 | private LinearLayout mLayout; 22 | private String[] mThemeArray; 23 | private int oldPos; 24 | private final List themeItemViews = new ArrayList<>(); 25 | 26 | private final int[] mColors = {R.color.colorPrimary, R.color.colorGreen, R.color.colorPink, 27 | R.color.colorBlack, R.color.colorGray, R.color.colorTeal, R.color.colorRed, R.color.colorPurple}; 28 | 29 | private SharedPreferences mSps; 30 | 31 | @Override 32 | protected void onCreate(Bundle savedInstanceState) { 33 | super.onCreate(savedInstanceState); 34 | mSps = getSharedPreferences("config", MODE_PRIVATE); 35 | oldPos = mSps.getInt("themePos", 0); 36 | ToolUtils.onActivityCreateSetTheme(ThemeChangeActivity.this); 37 | setContentView(R.layout.activity_change_theme); 38 | mLayout = (LinearLayout) findViewById(R.id.ll_theme); 39 | mThemeArray = getResources().getStringArray(R.array.theme_style); 40 | initToolBar(); 41 | loadLayout(); 42 | 43 | } 44 | 45 | private void loadLayout() { 46 | LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 47 | LinearLayout.LayoutParams.WRAP_CONTENT); 48 | 49 | final SharedPreferences.Editor edit = mSps.edit(); 50 | for (int i = 0; i < mThemeArray.length; i++) { 51 | final ThemeItemView themeView = new ThemeItemView(this); 52 | themeView.setLayoutParams(lp); 53 | themeView.setTitle(mThemeArray[i]); 54 | themeView.setTitleColor(ContextCompat.getColor(ThemeChangeActivity.this, mColors[i])); 55 | themeView.setImageBackground(mColors[i]); 56 | final int finalI = i; 57 | themeView.setOnClickListener(new View.OnClickListener() { 58 | @Override 59 | public void onClick(View view) { 60 | if (finalI != oldPos) { 61 | themeItemViews.get(oldPos).setChecked(false); 62 | themeView.setChecked(!themeView.isChecked()); 63 | if (themeView.isChecked()) { 64 | edit.putInt("themePos", finalI); 65 | edit.apply(); 66 | ToolUtils.changeToTheme(ThemeChangeActivity.this, true); 67 | } 68 | } 69 | oldPos = finalI; 70 | } 71 | }); 72 | if (i == mSps.getInt("themePos", 0)) { 73 | themeView.setChecked(true); 74 | } 75 | themeItemViews.add(themeView); 76 | mLayout.addView(themeView); 77 | } 78 | } 79 | 80 | private void initToolBar() { 81 | Toolbar mToolbar = (Toolbar) findViewById(R.id.activity_navigation_toolbar); 82 | if (mToolbar != null) { 83 | mToolbar.setTitle(getString(R.string.set_theme)); 84 | } 85 | setSupportActionBar(mToolbar); 86 | if (getSupportActionBar() != null) { 87 | getSupportActionBar().setHomeButtonEnabled(true); 88 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 89 | } 90 | } 91 | 92 | @Override 93 | public boolean onOptionsItemSelected(MenuItem item) { 94 | switch (item.getItemId()) { 95 | case android.R.id.home: 96 | onBackPressed(); 97 | return true; 98 | default: 99 | return super.onOptionsItemSelected(item); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/adapter/MusicRecyclerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.adapter; 2 | 3 | 4 | import android.content.Context; 5 | import android.support.v7.widget.RecyclerView; 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 com.app.teacup.bean.Music.MusicInfo; 13 | import com.app.teacup.MainActivity; 14 | import com.app.teacup.R; 15 | import com.bumptech.glide.Glide; 16 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 17 | 18 | import java.util.List; 19 | 20 | public class MusicRecyclerAdapter extends RecyclerView.Adapter { 21 | 22 | private final Context mContext; 23 | private List mDatas; 24 | private OnItemClickListener mListener; 25 | private final LayoutInflater mLayoutInflater; 26 | 27 | public interface OnItemClickListener { 28 | void onItemClick(View view, int position); 29 | } 30 | 31 | public MusicRecyclerAdapter(Context context, List datas) { 32 | mContext = context; 33 | mDatas = datas; 34 | mLayoutInflater = LayoutInflater.from(context); 35 | } 36 | 37 | @Override 38 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 39 | return new MusicViewHolder(mLayoutInflater.inflate(R.layout.item_music_view, parent, false)); 40 | } 41 | 42 | @Override 43 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 44 | onBindSingleItemViewHolder(holder, position); 45 | } 46 | 47 | private void onBindSingleItemViewHolder(final RecyclerView.ViewHolder holder, int position) { 48 | MusicInfo info = mDatas.get(position); 49 | String url = info.getImgUrl(); 50 | final MusicViewHolder myHolder = (MusicViewHolder) holder; 51 | if (!MainActivity.mIsLoadPhoto) { 52 | Glide.with(mContext).load(url).asBitmap() 53 | .error(R.drawable.photo_loaderror) 54 | .placeholder(R.drawable.main_load_bg) 55 | .diskCacheStrategy(DiskCacheStrategy.ALL) 56 | .dontAnimate() 57 | .into(myHolder.mPhotoImg); 58 | } else { 59 | if (MainActivity.mIsWIFIState) { 60 | Glide.with(mContext).load(url).asBitmap() 61 | .error(R.drawable.photo_loaderror) 62 | .placeholder(R.drawable.main_load_bg) 63 | .diskCacheStrategy(DiskCacheStrategy.ALL) 64 | .dontAnimate() 65 | .into(myHolder.mPhotoImg); 66 | } else { 67 | myHolder.mPhotoImg.setImageResource(R.drawable.main_load_bg); 68 | } 69 | } 70 | myHolder.mTitle.setText(info.getTitle()); 71 | myHolder.mHappy.setText(info.getHappyNum()); 72 | myHolder.mInfos.setText(info.getInfoNum()); 73 | 74 | if (mListener != null) { 75 | myHolder.mPhotoImg.setOnClickListener(new View.OnClickListener() { 76 | @Override 77 | public void onClick(View v) { 78 | int pos = myHolder.getLayoutPosition() - 1; 79 | mListener.onItemClick(myHolder.itemView, pos); 80 | } 81 | }); 82 | } 83 | } 84 | 85 | public void reSetData(List list) { 86 | mDatas = list; 87 | notifyDataSetChanged(); 88 | } 89 | 90 | public void setOnItemClickListener(OnItemClickListener listener) { 91 | mListener = listener; 92 | } 93 | 94 | 95 | @Override 96 | public int getItemCount() { 97 | return mDatas.size(); 98 | } 99 | 100 | private class MusicViewHolder extends RecyclerView.ViewHolder { 101 | 102 | private final TextView mTitle; 103 | private final ImageView mPhotoImg; 104 | private final TextView mHappy; 105 | private final TextView mInfos; 106 | 107 | public MusicViewHolder(View itemView) { 108 | super(itemView); 109 | mPhotoImg = (ImageView) itemView.findViewById(R.id.iv_music); 110 | mTitle = (TextView) itemView.findViewById(R.id.tv_title); 111 | mHappy = (TextView) itemView.findViewById(R.id.tv_happy); 112 | mInfos = (TextView) itemView.findViewById(R.id.tv_info); 113 | } 114 | 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/adapter/PagerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.adapter; 2 | 3 | import android.support.v4.app.Fragment; 4 | import android.support.v4.app.FragmentManager; 5 | import android.support.v4.app.FragmentPagerAdapter; 6 | 7 | import java.util.List; 8 | 9 | 10 | public class PagerAdapter extends FragmentPagerAdapter { 11 | 12 | private final String[] tabTitles; 13 | private final List mFragmentArrayList; 14 | 15 | public PagerAdapter(FragmentManager fm, List lists, String[] titles) { 16 | super(fm); 17 | mFragmentArrayList = lists; 18 | tabTitles = titles; 19 | } 20 | 21 | @Override 22 | public Fragment getItem(int position) { 23 | return mFragmentArrayList.get(position); 24 | } 25 | 26 | @Override 27 | public int getCount() { 28 | return tabTitles.length; 29 | } 30 | 31 | @Override 32 | public CharSequence getPageTitle(int position) { 33 | return tabTitles[position]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/adapter/PhotoGaoxiaoRecyclerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.adapter; 2 | 3 | 4 | import android.content.Context; 5 | import android.support.v7.widget.RecyclerView; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.ImageView; 9 | import android.widget.TextView; 10 | 11 | import com.app.teacup.MainActivity; 12 | import com.app.teacup.R; 13 | import com.app.teacup.bean.PhotoInfo; 14 | import com.app.teacup.ui.MoreTextView; 15 | import com.bumptech.glide.Glide; 16 | 17 | import java.util.List; 18 | 19 | public class PhotoGaoxiaoRecyclerAdapter extends RecyclerView.Adapter { 20 | 21 | private final Context mContext; 22 | private List mDatas; 23 | private OnItemClickListener mListener; 24 | 25 | public interface OnItemClickListener { 26 | void onItemClick(View view, int position); 27 | } 28 | 29 | public PhotoGaoxiaoRecyclerAdapter(Context context, List datas) { 30 | mContext = context; 31 | mDatas = datas; 32 | } 33 | 34 | @Override 35 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 36 | return new PhotoViewHolder(View.inflate(mContext, R.layout.item_photo_gaoxiao_view, null)); 37 | } 38 | 39 | @Override 40 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 41 | onBindSingleItemViewHolder(holder, position); 42 | } 43 | 44 | private void onBindSingleItemViewHolder(final RecyclerView.ViewHolder holder, int position) { 45 | String url = mDatas.get(position).getImgUrl(); 46 | if (url == null) { 47 | return; 48 | } 49 | 50 | final PhotoViewHolder myHolder = (PhotoViewHolder) holder; 51 | if (!MainActivity.mIsLoadPhoto) { 52 | Glide.with(mContext).load(url).asBitmap() 53 | .error(R.drawable.photo_loaderror) 54 | .placeholder(R.drawable.photo_default) 55 | .dontAnimate() 56 | .into(myHolder.mPhotoImg); 57 | } else { 58 | if (MainActivity.mIsWIFIState) { 59 | Glide.with(mContext).load(url).asBitmap() 60 | .error(R.drawable.photo_loaderror) 61 | .placeholder(R.drawable.photo_default) 62 | .dontAnimate() 63 | .into(myHolder.mPhotoImg); 64 | } else { 65 | myHolder.mPhotoImg.setImageResource(R.drawable.photo_default); 66 | } 67 | } 68 | 69 | myHolder.mTitle.setText(mDatas.get(position).getTitle()); 70 | myHolder.mContent.setContent(mDatas.get(position).getContent()); 71 | 72 | if (mListener != null) { 73 | myHolder.mPhotoImg.setOnClickListener(new View.OnClickListener() { 74 | @Override 75 | public void onClick(View v) { 76 | int pos = myHolder.getLayoutPosition() - 1; 77 | mListener.onItemClick(myHolder.itemView, pos); 78 | } 79 | }); 80 | } 81 | } 82 | 83 | public void reSetData(List list) { 84 | int start = mDatas.size(); 85 | int end = list.size(); 86 | mDatas = list; 87 | notifyItemRangeInserted(start, end); 88 | } 89 | 90 | public void setOnItemClickListener(OnItemClickListener listener) { 91 | mListener = listener; 92 | } 93 | 94 | 95 | @Override 96 | public int getItemCount() { 97 | return mDatas.size(); 98 | } 99 | 100 | private class PhotoViewHolder extends RecyclerView.ViewHolder { 101 | 102 | private final TextView mTitle; 103 | private final MoreTextView mContent; 104 | private final ImageView mPhotoImg; 105 | 106 | PhotoViewHolder(View itemView) { 107 | super(itemView); 108 | mPhotoImg = (ImageView) itemView.findViewById(R.id.iv_photo); 109 | mContent = (MoreTextView) itemView.findViewById(R.id.tv_content); 110 | mTitle = (TextView) itemView.findViewById(R.id.tv_title); 111 | } 112 | 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/adapter/PhotoRecyclerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.adapter; 2 | 3 | 4 | import android.content.Context; 5 | import android.graphics.Rect; 6 | import android.support.v7.widget.RecyclerView; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.ImageView; 10 | 11 | import com.app.teacup.MainActivity; 12 | import com.app.teacup.R; 13 | import com.bumptech.glide.Glide; 14 | 15 | import java.util.List; 16 | 17 | 18 | public class PhotoRecyclerAdapter extends RecyclerView.Adapter { 19 | 20 | private final Context mContext; 21 | private List mDatas; 22 | private OnItemClickListener mListener; 23 | 24 | 25 | public interface OnItemClickListener { 26 | void onItemClick(View view, int position); 27 | } 28 | 29 | public PhotoRecyclerAdapter(Context context, List datas) { 30 | mContext = context; 31 | mDatas = datas; 32 | } 33 | 34 | @Override 35 | public int getItemViewType(int position) { 36 | return position; 37 | } 38 | 39 | @Override 40 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 41 | return new PhotoViewHolder(View.inflate(mContext, R.layout.item_photo_view, null)); 42 | } 43 | 44 | @Override 45 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 46 | onBindItemViewHolder(holder, position); 47 | } 48 | 49 | public void reSetData(List list) { 50 | int start = mDatas.size(); 51 | int end = list.size(); 52 | mDatas = list; 53 | notifyItemRangeInserted(start, end); 54 | } 55 | 56 | public void refreshData(List list) { 57 | mDatas = list; 58 | notifyDataSetChanged(); 59 | } 60 | 61 | public void setOnItemClickListener(OnItemClickListener listener) { 62 | mListener = listener; 63 | } 64 | 65 | private void onBindItemViewHolder(final RecyclerView.ViewHolder holder, int position) { 66 | String url = mDatas.get(position); 67 | if (url == null) { 68 | return; 69 | } 70 | 71 | final PhotoViewHolder myHolder = (PhotoViewHolder) holder; 72 | loadImage(url, myHolder.mPhotoImg); 73 | 74 | if (mListener != null) { 75 | myHolder.mPhotoImg.setOnClickListener(new View.OnClickListener() { 76 | @Override 77 | public void onClick(View v) { 78 | int pos = myHolder.getLayoutPosition() - 1; 79 | mListener.onItemClick(myHolder.itemView, pos); 80 | } 81 | }); 82 | } 83 | } 84 | 85 | private void loadImage(String url, ImageView imgView) { 86 | if (!MainActivity.mIsLoadPhoto) { 87 | Glide.with(mContext).load(url).asBitmap() 88 | .error(R.drawable.photo_loaderror) 89 | .placeholder(R.drawable.photo_default) 90 | .dontAnimate() 91 | .into(imgView); 92 | } else { 93 | if (MainActivity.mIsWIFIState) { 94 | Glide.with(mContext).load(url).asBitmap() 95 | .error(R.drawable.photo_loaderror) 96 | .placeholder(R.drawable.photo_default) 97 | .dontAnimate() 98 | .into(imgView); 99 | } else { 100 | imgView.setImageResource(R.drawable.photo_default); 101 | } 102 | } 103 | } 104 | 105 | @Override 106 | public int getItemCount() { 107 | return mDatas.size(); 108 | } 109 | 110 | private class PhotoViewHolder extends RecyclerView.ViewHolder { 111 | 112 | private final ImageView mPhotoImg; 113 | 114 | PhotoViewHolder(View itemView) { 115 | super(itemView); 116 | mPhotoImg = (ImageView) itemView.findViewById(R.id.iv_photo); 117 | } 118 | 119 | } 120 | 121 | public class SpaceItemDecoration extends RecyclerView.ItemDecoration { 122 | 123 | private int space; 124 | 125 | public SpaceItemDecoration(int space) { 126 | this.space = space; 127 | } 128 | 129 | @Override 130 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, 131 | RecyclerView.State state) { 132 | int itemPosition = parent.getChildAdapterPosition(view); 133 | if (itemPosition % 2 != 0) { 134 | outRect.right = space; 135 | } 136 | outRect.bottom = space; 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/adapter/ReactViewPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.adapter; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.os.Handler; 5 | import android.os.Message; 6 | import android.support.v4.view.PagerAdapter; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.view.ViewParent; 10 | 11 | import com.app.teacup.ui.ReactViewPager; 12 | 13 | import java.util.List; 14 | 15 | public class ReactViewPagerAdapter extends PagerAdapter { 16 | 17 | private final List mViewList; 18 | private final ReactViewPager mViewPager; 19 | private boolean mIsAutoScroll = false; 20 | 21 | @SuppressLint("HandlerLeak") 22 | private final Handler mHandler = new Handler() { 23 | @Override 24 | public void handleMessage(Message msg) { 25 | mViewPager.setCurrentItem(mViewPager.getCurrentItem() + 1, true); 26 | if (mIsAutoScroll) { 27 | mHandler.sendEmptyMessageDelayed(0, 6000); 28 | } 29 | super.handleMessage(msg); 30 | } 31 | }; 32 | 33 | public ReactViewPagerAdapter(ReactViewPager viewPager, List imageViews) { 34 | mViewPager = viewPager; 35 | mViewList = imageViews; 36 | } 37 | 38 | @Override 39 | public int getCount() { 40 | return Integer.MAX_VALUE; 41 | } 42 | 43 | @Override 44 | public boolean isViewFromObject(View view, Object object) { 45 | return view == object; 46 | } 47 | 48 | @Override 49 | public void destroyItem(ViewGroup container, int position, Object object) { 50 | //container.removeView((View) object); 51 | } 52 | 53 | @Override 54 | public float getPageWidth(int position) { 55 | return 0.9f; 56 | } 57 | 58 | @Override 59 | public Object instantiateItem(ViewGroup container, int position) { 60 | position %= mViewList.size(); 61 | if (position < 0) { 62 | position = mViewList.size() + position; 63 | } 64 | View view = mViewList.get(position); 65 | ViewParent vp = view.getParent(); 66 | if (vp != null) { 67 | ViewGroup parent = (ViewGroup) vp; 68 | parent.removeView(view); 69 | } 70 | container.addView(view); 71 | return view; 72 | } 73 | 74 | 75 | public void startAutoScrolled() { 76 | if (mIsAutoScroll) { 77 | return; 78 | } 79 | mIsAutoScroll = true; 80 | mHandler.sendEmptyMessageDelayed(0, 6000); 81 | } 82 | 83 | public void stopAutoScrolled() { 84 | if (!mIsAutoScroll) { 85 | return; 86 | } 87 | mIsAutoScroll = false; 88 | mHandler.removeMessages(0); 89 | } 90 | } -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/adapter/TvPlayRecyclerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.adapter; 2 | 3 | 4 | import android.content.Context; 5 | import android.graphics.Color; 6 | import android.support.v4.content.ContextCompat; 7 | import android.support.v7.widget.RecyclerView; 8 | import android.util.TypedValue; 9 | import android.view.Gravity; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.widget.TextView; 13 | 14 | import com.app.teacup.MoviePlayActivity; 15 | import com.app.teacup.R; 16 | import com.app.teacup.bean.movie.TvItemInfo; 17 | 18 | import java.util.List; 19 | 20 | public class TvPlayRecyclerAdapter extends RecyclerView.Adapter { 21 | 22 | private final Context mContext; 23 | private final List mDatas; 24 | private OnItemClickListener mListener; 25 | 26 | public interface OnItemClickListener { 27 | void onItemClick(View view, int position); 28 | } 29 | 30 | public TvPlayRecyclerAdapter(Context context, List datas) { 31 | mContext = context; 32 | mDatas = datas; 33 | } 34 | 35 | @Override 36 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 37 | TextView textView = new TextView(mContext); 38 | return new TvViewHolder(textView); 39 | } 40 | 41 | @Override 42 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 43 | TvViewHolder viewHolder = (TvViewHolder) holder; 44 | viewHolder.mTextView.setTextColor(Color.BLACK); 45 | TvItemInfo info = mDatas.get(position); 46 | viewHolder.mTextView.setText(info.getName()); 47 | int playIndex = 0; 48 | if (mContext instanceof MoviePlayActivity) { 49 | playIndex = ((MoviePlayActivity) mContext).mPlayIndex; 50 | } 51 | if (position == playIndex) { 52 | viewHolder.mTextView.setTextColor(ContextCompat.getColor(mContext, R.color.deepYellow)); 53 | } 54 | } 55 | 56 | public void setOnItemClickListener(OnItemClickListener listener) { 57 | mListener = listener; 58 | } 59 | 60 | 61 | @Override 62 | public int getItemCount() { 63 | return mDatas.size(); 64 | } 65 | 66 | private class TvViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { 67 | 68 | private final TextView mTextView; 69 | private final int margin = mContext.getResources() 70 | .getDimensionPixelOffset(R.dimen.tv_series_textView_item_margin); 71 | private final int width = mContext.getResources() 72 | .getDimensionPixelOffset(R.dimen.tv_series_textView_item_width); 73 | private final int maxWidth = mContext.getResources() 74 | .getDimensionPixelOffset(R.dimen.tv_series_textView_item_max_width); 75 | private final int height = mContext.getResources() 76 | .getDimensionPixelOffset(R.dimen.tv_series_textView_item_height); 77 | private final int textSize = mContext.getResources().getDimensionPixelSize(R.dimen.tv_series_textView_item_textSize); 78 | 79 | public TvViewHolder(View itemView) { 80 | super(itemView); 81 | mTextView = (TextView) itemView; 82 | itemView.setOnClickListener(this); 83 | RecyclerView.LayoutParams params = new RecyclerView.LayoutParams( 84 | ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); 85 | params.setMargins(margin, margin, margin, margin); 86 | mTextView.setMinHeight(height); 87 | mTextView.setMinWidth(width); 88 | mTextView.setMaxWidth(maxWidth); 89 | mTextView.setLayoutParams(params); 90 | mTextView.setGravity(Gravity.CENTER); 91 | mTextView.setTextColor(Color.BLACK); 92 | mTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); 93 | mTextView.setBackgroundColor(ContextCompat.getColor(mContext, R.color.alpha_white)); 94 | } 95 | 96 | @Override 97 | public void onClick(View v) { 98 | if (mListener != null) { 99 | mListener.onItemClick(v, getLayoutPosition()); 100 | } 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/Music/MusicDetail.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.Music; 2 | 3 | 4 | import java.io.Serializable; 5 | 6 | public class MusicDetail implements Serializable { 7 | private String musicName; 8 | private String musicPlayer; 9 | private String imgUrl; 10 | private String musicUrl; 11 | 12 | public String getImgUrl() { 13 | return imgUrl; 14 | } 15 | 16 | public void setImgUrl(String imgUrl) { 17 | this.imgUrl = imgUrl; 18 | } 19 | 20 | public String getMusicName() { 21 | return musicName; 22 | } 23 | 24 | public void setMusicName(String musicName) { 25 | this.musicName = musicName; 26 | } 27 | 28 | public String getMusicPlayer() { 29 | return musicPlayer; 30 | } 31 | 32 | public void setMusicPlayer(String musicPlayer) { 33 | this.musicPlayer = musicPlayer; 34 | } 35 | 36 | public String getMusicUrl() { 37 | return musicUrl; 38 | } 39 | 40 | public void setMusicUrl(String musicUrl) { 41 | this.musicUrl = musicUrl; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/Music/MusicDetailInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.Music; 2 | 3 | import java.util.List; 4 | 5 | public class MusicDetailInfo { 6 | private String type; 7 | private String content; 8 | private List musicList; 9 | 10 | public List getMusicList() { 11 | return musicList; 12 | } 13 | 14 | public void setMusicList(List musicList) { 15 | this.musicList = musicList; 16 | } 17 | 18 | public String getContent() { 19 | return content; 20 | } 21 | 22 | public void setContent(String content) { 23 | this.content = content; 24 | } 25 | 26 | public String getType() { 27 | return type; 28 | } 29 | 30 | public void setType(String type) { 31 | this.type = type; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/Music/MusicInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.Music; 2 | 3 | 4 | import java.io.Serializable; 5 | 6 | public class MusicInfo implements Serializable { 7 | private String nextUrl; 8 | private String imgUrl; 9 | private String title; 10 | private String happyNum; 11 | private String infoNum; 12 | 13 | public String getNextUrl() { 14 | return nextUrl; 15 | } 16 | 17 | public void setNextUrl(String nextUrl) { 18 | this.nextUrl = nextUrl; 19 | } 20 | 21 | public String getHappyNum() { 22 | return happyNum; 23 | } 24 | 25 | public void setHappyNum(String happyNum) { 26 | this.happyNum = happyNum; 27 | } 28 | 29 | public String getImgUrl() { 30 | return imgUrl; 31 | } 32 | 33 | public void setImgUrl(String imgUrl) { 34 | this.imgUrl = imgUrl; 35 | } 36 | 37 | public String getInfoNum() { 38 | return infoNum; 39 | } 40 | 41 | public void setInfoNum(String infoNum) { 42 | this.infoNum = infoNum; 43 | } 44 | 45 | public String getTitle() { 46 | return title; 47 | } 48 | 49 | public void setTitle(String title) { 50 | this.title = title; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/News/NewsHeadInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.News; 2 | 3 | class NewsHeadInfo { 4 | private String imgUrl; 5 | private String newsUrl; 6 | private String newsTitle; 7 | 8 | public String getImgUrl() { 9 | return imgUrl; 10 | } 11 | 12 | public void setImgUrl(String imgUrl) { 13 | this.imgUrl = imgUrl; 14 | } 15 | 16 | public String getNewsTitle() { 17 | return newsTitle; 18 | } 19 | 20 | public void setNewsTitle(String newsTitle) { 21 | this.newsTitle = newsTitle; 22 | } 23 | 24 | public String getNewsUrl() { 25 | return newsUrl; 26 | } 27 | 28 | public void setNewsUrl(String newsUrl) { 29 | this.newsUrl = newsUrl; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/News/NewsInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.News; 2 | 3 | 4 | public class NewsInfo { 5 | private String imgUrl; 6 | private String nextUrl; 7 | private String title; 8 | private String label; 9 | 10 | public String getNextUrl() { 11 | return nextUrl; 12 | } 13 | 14 | public void setNextUrl(String nextUrl) { 15 | this.nextUrl = nextUrl; 16 | } 17 | 18 | public String getImgUrl() { 19 | return imgUrl; 20 | } 21 | 22 | public void setImgUrl(String imgUrl) { 23 | this.imgUrl = imgUrl; 24 | } 25 | 26 | public String getLabel() { 27 | return label; 28 | } 29 | 30 | public void setLabel(String label) { 31 | this.label = label; 32 | } 33 | 34 | public String getTitle() { 35 | return title; 36 | } 37 | 38 | public void setTitle(String title) { 39 | this.title = title; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/PhotoInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean; 2 | 3 | 4 | import java.io.Serializable; 5 | 6 | public class PhotoInfo implements Serializable { 7 | private String imgUrl; 8 | private String title; 9 | private String content; 10 | 11 | public String getImgUrl() { 12 | return imgUrl; 13 | } 14 | 15 | public void setImgUrl(String imgUrl) { 16 | this.imgUrl = imgUrl; 17 | } 18 | 19 | public String getTitle() { 20 | return title; 21 | } 22 | 23 | public void setTitle(String title) { 24 | this.title = title; 25 | } 26 | 27 | public String getContent() { 28 | return content; 29 | } 30 | 31 | public void setContent(String content) { 32 | this.content = content; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/book/Book.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.book; 2 | 3 | import java.util.List; 4 | 5 | 6 | public class Book { 7 | private int count; 8 | private int start; 9 | private int total; 10 | private List books; 11 | 12 | public List getBooks() { 13 | return books; 14 | } 15 | 16 | public void setBooks(List books) { 17 | this.books = books; 18 | } 19 | 20 | public int getCount() { 21 | return count; 22 | } 23 | 24 | public void setCount(int count) { 25 | this.count = count; 26 | } 27 | 28 | public int getStart() { 29 | return start; 30 | } 31 | 32 | public void setStart(int start) { 33 | this.start = start; 34 | } 35 | 36 | public int getTotal() { 37 | return total; 38 | } 39 | 40 | public void setTotal(int total) { 41 | this.total = total; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/book/FindBookInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.book; 2 | 3 | 4 | import java.io.Serializable; 5 | 6 | public class FindBookInfo implements Serializable { 7 | private String mImgUrl; 8 | private String mBookTitle; 9 | private String mBookContent; 10 | private String mSummary; 11 | private String mAuthor; 12 | private String mTable; 13 | 14 | public String getmSummary() { 15 | return mSummary; 16 | } 17 | 18 | public void setmSummary(String mSummary) { 19 | this.mSummary = mSummary; 20 | } 21 | 22 | public String getmAuthor() { 23 | return mAuthor; 24 | } 25 | 26 | public void setmAuthor(String mAuthor) { 27 | this.mAuthor = mAuthor; 28 | } 29 | 30 | public String getmTable() { 31 | return mTable; 32 | } 33 | 34 | public void setmTable(String mTable) { 35 | this.mTable = mTable; 36 | } 37 | 38 | public String getmImgUrl() { 39 | return mImgUrl; 40 | } 41 | 42 | public void setmImgUrl(String mImgUrl) { 43 | this.mImgUrl = mImgUrl; 44 | } 45 | 46 | public String getmBookTitle() { 47 | return mBookTitle; 48 | } 49 | 50 | public void setmBookTitle(String mBookTitle) { 51 | this.mBookTitle = mBookTitle; 52 | } 53 | 54 | public String getmBookContent() { 55 | return mBookContent; 56 | } 57 | 58 | public void setmBookContent(String mBookContent) { 59 | this.mBookContent = mBookContent; 60 | } 61 | 62 | @Override 63 | public String toString() { 64 | return "FindBookInfo{" + 65 | "mImgUrl='" + mImgUrl + '\'' + 66 | ", mBookTitle='" + mBookTitle + '\'' + 67 | ", mBookContent='" + mBookContent + '\'' + 68 | '}'; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/fanju/FanjuInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.fanju; 2 | 3 | 4 | public class FanjuInfo { 5 | private String authorName; 6 | private String authorImgUrl; 7 | private String publishTime; 8 | private String videoName; 9 | private String videoImgUrl; 10 | private String videoIndexUrl; 11 | private String videoContent; 12 | private String nextUrl; 13 | 14 | public String getVideoIndexUrl() { 15 | return videoIndexUrl; 16 | } 17 | 18 | public void setVideoIndexUrl(String videoIndexUrl) { 19 | this.videoIndexUrl = videoIndexUrl; 20 | } 21 | 22 | public String getAuthorImgUrl() { 23 | return authorImgUrl; 24 | } 25 | 26 | public void setAuthorImgUrl(String authorImgUrl) { 27 | this.authorImgUrl = authorImgUrl; 28 | } 29 | 30 | public String getAuthorName() { 31 | return authorName; 32 | } 33 | 34 | public void setAuthorName(String authorName) { 35 | this.authorName = authorName; 36 | } 37 | 38 | public String getNextUrl() { 39 | return nextUrl; 40 | } 41 | 42 | public void setNextUrl(String nextUrl) { 43 | this.nextUrl = nextUrl; 44 | } 45 | 46 | public String getPublishTime() { 47 | return publishTime; 48 | } 49 | 50 | public void setPublishTime(String publishTime) { 51 | this.publishTime = publishTime; 52 | } 53 | 54 | public String getVideoContent() { 55 | return videoContent; 56 | } 57 | 58 | public void setVideoContent(String videoContent) { 59 | this.videoContent = videoContent; 60 | } 61 | 62 | public String getVideoImgUrl() { 63 | return videoImgUrl; 64 | } 65 | 66 | public void setVideoImgUrl(String videoImgUrl) { 67 | this.videoImgUrl = videoImgUrl; 68 | } 69 | 70 | public String getVideoName() { 71 | return videoName; 72 | } 73 | 74 | public void setVideoName(String videoName) { 75 | this.videoName = videoName; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/fanju/FanjuNewInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.fanju; 2 | 3 | 4 | import java.util.List; 5 | 6 | public class FanjuNewInfo { 7 | private String userImgUrl; 8 | private String userName; 9 | private List datas; 10 | private String publishTime; 11 | 12 | public List getDatas() { 13 | return datas; 14 | } 15 | 16 | public void setDatas(List datas) { 17 | this.datas = datas; 18 | } 19 | 20 | public String getPublishTime() { 21 | return publishTime; 22 | } 23 | 24 | public void setPublishTime(String publishTime) { 25 | this.publishTime = publishTime; 26 | } 27 | 28 | public String getUserImgUrl() { 29 | return userImgUrl; 30 | } 31 | 32 | public void setUserImgUrl(String userImgUrl) { 33 | this.userImgUrl = userImgUrl; 34 | } 35 | 36 | public String getUserName() { 37 | return userName; 38 | } 39 | 40 | public void setUserName(String userName) { 41 | this.userName = userName; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/fanju/FanjuVideoInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.fanju; 2 | 3 | 4 | public class FanjuVideoInfo { 5 | private String nextUrl; 6 | private String videoName; 7 | private String imgeUrl; 8 | 9 | public String getImgeUrl() { 10 | return imgeUrl; 11 | } 12 | 13 | public void setImgeUrl(String imgeUrl) { 14 | this.imgeUrl = imgeUrl; 15 | } 16 | 17 | public String getNextUrl() { 18 | return nextUrl; 19 | } 20 | 21 | public void setNextUrl(String nextUrl) { 22 | this.nextUrl = nextUrl; 23 | } 24 | 25 | public String getVideoName() { 26 | return videoName; 27 | } 28 | 29 | public void setVideoName(String videoName) { 30 | this.videoName = videoName; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/movie/MovieDetailInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.movie; 2 | 3 | 4 | import java.util.List; 5 | 6 | public class MovieDetailInfo { 7 | 8 | private String movieBlockName; 9 | private String moreUrl; 10 | private List movieInfoList; 11 | 12 | public String getMoreUrl() { 13 | return moreUrl; 14 | } 15 | 16 | public void setMoreUrl(String moreUrl) { 17 | this.moreUrl = moreUrl; 18 | } 19 | 20 | public String getMovieBlockName() { 21 | return movieBlockName; 22 | } 23 | 24 | public void setMovieBlockName(String movieBlockName) { 25 | this.movieBlockName = movieBlockName; 26 | } 27 | 28 | public List getMovieInfoList() { 29 | return movieInfoList; 30 | } 31 | 32 | public void setMovieInfoList(List movieInfoList) { 33 | this.movieInfoList = movieInfoList; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/movie/MovieItemInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.movie; 2 | 3 | 4 | public class MovieItemInfo { 5 | private String imageUrl; 6 | private String imageIndex; 7 | private String nextUrl; 8 | private String movieName; 9 | 10 | public String getImageIndex() { 11 | return imageIndex; 12 | } 13 | 14 | public void setImageIndex(String imageIndex) { 15 | this.imageIndex = imageIndex; 16 | } 17 | 18 | public String getImageUrl() { 19 | return imageUrl; 20 | } 21 | 22 | public void setImageUrl(String imageUrl) { 23 | this.imageUrl = imageUrl; 24 | } 25 | 26 | public String getMovieName() { 27 | return movieName; 28 | } 29 | 30 | public void setMovieName(String movieName) { 31 | this.movieName = movieName; 32 | } 33 | 34 | public String getNextUrl() { 35 | return nextUrl; 36 | } 37 | 38 | public void setNextUrl(String nextUrl) { 39 | this.nextUrl = nextUrl; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/movie/MoviePlayInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.movie; 2 | 3 | 4 | public class MoviePlayInfo { 5 | private String imgUrl; 6 | private String movieName; 7 | private String addTime; 8 | private String nextUrl; 9 | 10 | public String getNextUrl() { 11 | return nextUrl; 12 | } 13 | 14 | public void setNextUrl(String nextUrl) { 15 | this.nextUrl = nextUrl; 16 | } 17 | 18 | public String getAddTime() { 19 | return addTime; 20 | } 21 | 22 | public void setAddTime(String addTime) { 23 | this.addTime = addTime; 24 | } 25 | 26 | public String getImgUrl() { 27 | return imgUrl; 28 | } 29 | 30 | public void setImgUrl(String imgUrl) { 31 | this.imgUrl = imgUrl; 32 | } 33 | 34 | public String getMovieName() { 35 | return movieName; 36 | } 37 | 38 | public void setMovieName(String movieName) { 39 | this.movieName = movieName; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/bean/movie/TvItemInfo.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.bean.movie; 2 | 3 | 4 | public class TvItemInfo { 5 | private String name; 6 | private String nextUrl; 7 | 8 | public String getName() { 9 | return name; 10 | } 11 | 12 | public void setName(String name) { 13 | this.name = name; 14 | } 15 | 16 | public String getNextUrl() { 17 | return nextUrl; 18 | } 19 | 20 | public void setNextUrl(String nextUrl) { 21 | this.nextUrl = nextUrl; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/fragment/DetailFragment.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.fragment; 2 | 3 | 4 | import android.os.Bundle; 5 | import android.support.v4.app.Fragment; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.TextView; 10 | 11 | import com.app.teacup.R; 12 | 13 | public class DetailFragment extends Fragment { 14 | 15 | public static DetailFragment newInstance(String info) { 16 | Bundle args = new Bundle(); 17 | DetailFragment fragment = new DetailFragment(); 18 | args.putString("info", info); 19 | fragment.setArguments(args); 20 | return fragment; 21 | } 22 | 23 | 24 | @Override 25 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 26 | Bundle savedInstanceState) { 27 | View view = inflater.inflate(R.layout.fragment_detail, container, false); 28 | TextView tvInfo = (TextView) view.findViewById(R.id.tvInfo); 29 | tvInfo.setText(getArguments().getString("info")); 30 | return view; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/fragment/photo/DoubanMeiziFragment.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.fragment.photo; 2 | 3 | 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.support.v7.widget.StaggeredGridLayoutManager; 7 | import android.text.TextUtils; 8 | import android.util.Log; 9 | import android.view.View; 10 | 11 | import com.app.teacup.R; 12 | import com.app.teacup.ShowPhotoListActivity; 13 | import com.app.teacup.adapter.PhotoRecyclerAdapter; 14 | import com.app.teacup.fragment.BaseFragment; 15 | import com.app.teacup.util.urlUtils; 16 | 17 | import org.jsoup.Jsoup; 18 | import org.jsoup.nodes.Document; 19 | import org.jsoup.nodes.Element; 20 | import org.jsoup.select.Elements; 21 | 22 | import java.util.ArrayList; 23 | 24 | public class DoubanMeiziFragment extends BaseFragment { 25 | 26 | private ArrayList mImageUrls; 27 | private PhotoRecyclerAdapter mPhotoRecyclerAdapter; 28 | 29 | @Override 30 | public void onAttach(Context context) { 31 | super.onAttach(context); 32 | mImageUrls = new ArrayList<>(); 33 | mRequestUrl = urlUtils.DOUBAN_MEINV_URL; 34 | } 35 | 36 | @Override 37 | protected void onRecycleViewResponseLoadMore() { 38 | if (mImageUrls.size() <= 0) { 39 | mRecyclerView.loadMoreComplete(); 40 | } else { 41 | startLoadData(urlUtils.DOUBAN_MEINV_NEXT_URL, 50); 42 | } 43 | } 44 | 45 | @Override 46 | protected void setupRecycleViewAndAdapter() { 47 | final StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2, 48 | StaggeredGridLayoutManager.VERTICAL); 49 | layoutManager.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_NONE); 50 | mRecyclerView.setLayoutManager(layoutManager); 51 | 52 | int itemSpace = getResources(). 53 | getDimensionPixelSize(R.dimen.item_photo_view_item_margin); 54 | mPhotoRecyclerAdapter = new PhotoRecyclerAdapter(getContext(), mImageUrls); 55 | mPhotoRecyclerAdapter.setHasStableIds(true); 56 | mRecyclerView.addItemDecoration(mPhotoRecyclerAdapter.new SpaceItemDecoration(itemSpace)); 57 | mRecyclerView.setAdapter(mPhotoRecyclerAdapter); 58 | 59 | mPhotoRecyclerAdapter.setOnItemClickListener(new PhotoRecyclerAdapter.OnItemClickListener() { 60 | @Override 61 | public void onItemClick(View view, int position) { 62 | String url = mImageUrls.get(position); 63 | if (!TextUtils.isEmpty(url)) { 64 | Intent intent = new Intent(getContext(), ShowPhotoListActivity.class); 65 | intent.putStringArrayListExtra("photoList", mImageUrls); 66 | intent.putExtra("photoPos", position); 67 | startActivity(intent); 68 | } 69 | } 70 | }); 71 | } 72 | 73 | @Override 74 | protected void parseData(String response) { 75 | Document document = Jsoup.parse(response); 76 | try { 77 | Element main = document.getElementById("main"); 78 | Elements liElements = main.getElementsByTag("li"); 79 | for (Element element : liElements) { 80 | 81 | Elements aElements = element.getElementsByTag("a"); 82 | for (Element a : aElements) { 83 | Elements height_min = a.getElementsByClass("height_min"); 84 | for (Element height : height_min) { 85 | String url = height.attr("src"); 86 | if (url.contains(".jpg")) { 87 | mImageUrls.add(url); 88 | } 89 | } 90 | } 91 | } 92 | } catch (Exception e) { 93 | Log.i(TAG, "DoubanMeiziFragment::parseData: ==error==" + e.getMessage()); 94 | } 95 | } 96 | 97 | @Override 98 | protected void startRefreshData() { 99 | mImageUrls.clear(); 100 | super.startRefreshData(); 101 | } 102 | 103 | @Override 104 | protected void onLoadDataFinish() { 105 | super.onLoadDataFinish(); 106 | mPhotoRecyclerAdapter.reSetData(mImageUrls); 107 | } 108 | 109 | @Override 110 | protected void onRefreshFinish() { 111 | super.onRefreshFinish(); 112 | mPhotoRecyclerAdapter.refreshData(mImageUrls); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/manager/WrapContentGridLayoutManager.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.manager; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.GridLayoutManager; 5 | import android.support.v7.widget.RecyclerView; 6 | import android.util.AttributeSet; 7 | 8 | 9 | public class WrapContentGridLayoutManager extends GridLayoutManager { 10 | 11 | public WrapContentGridLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 12 | super(context, attrs, defStyleAttr, defStyleRes); 13 | } 14 | 15 | public WrapContentGridLayoutManager(Context context, int spanCount) { 16 | super(context, spanCount); 17 | } 18 | 19 | public WrapContentGridLayoutManager(Context context, int spanCount, int orientation, boolean reverseLayout) { 20 | super(context, spanCount, orientation, reverseLayout); 21 | } 22 | 23 | @Override 24 | public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { 25 | try { 26 | super.onLayoutChildren(recycler, state); 27 | } catch (IndexOutOfBoundsException e) { 28 | e.printStackTrace(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/receiver/ConnectionChangeReceiver.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.receiver; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | 7 | import com.app.teacup.MainActivity; 8 | import com.app.teacup.util.HttpUtils; 9 | 10 | 11 | public class ConnectionChangeReceiver extends BroadcastReceiver { 12 | @Override 13 | public void onReceive(Context context, Intent intent) { 14 | MainActivity.mIsWIFIState = HttpUtils.isWifi(context); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/ui/ReactViewPager.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.ui; 2 | 3 | 4 | import android.app.Activity; 5 | import android.content.Context; 6 | import android.support.v4.view.ViewPager; 7 | import android.util.AttributeSet; 8 | 9 | import java.lang.reflect.Field; 10 | 11 | public class ReactViewPager extends CenterViewPager { 12 | 13 | public ReactViewPager(Context context) { 14 | this(context, null); 15 | } 16 | 17 | public ReactViewPager(Context context, AttributeSet attrs) { 18 | super(context, attrs); 19 | } 20 | 21 | @Override 22 | protected void onAttachedToWindow() { 23 | super.onAttachedToWindow(); 24 | try { 25 | Field mFirstLayout = ViewPager.class.getDeclaredField("mFirstLayout"); 26 | mFirstLayout.setAccessible(true); 27 | mFirstLayout.set(this, false); 28 | if (getAdapter() != null) { 29 | getAdapter().notifyDataSetChanged(); 30 | } 31 | setCurrentItem(getCurrentItem(), true); 32 | } catch (Exception e) { 33 | e.printStackTrace(); 34 | } 35 | } 36 | 37 | @Override 38 | protected void onDetachedFromWindow() { 39 | if (((Activity) getContext()).isFinishing()) { 40 | super.onDetachedFromWindow(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/ui/SettingItemView.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.ui; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.text.TextUtils; 6 | import android.util.AttributeSet; 7 | import android.view.MotionEvent; 8 | import android.view.View; 9 | import android.widget.CheckBox; 10 | import android.widget.RelativeLayout; 11 | import android.widget.TextView; 12 | 13 | import com.app.teacup.R; 14 | 15 | 16 | public class SettingItemView extends RelativeLayout { 17 | 18 | private CheckBox mCbStatus; 19 | private TextView mTitle; 20 | private TextView mContent; 21 | 22 | public SettingItemView(Context context) { 23 | super(context); 24 | initView(context); 25 | } 26 | 27 | public SettingItemView(Context context, AttributeSet attrs) { 28 | super(context, attrs); 29 | initView(context); 30 | setAttributeSet(context, attrs); 31 | } 32 | 33 | /** 34 | * 初始化布局文件 35 | * 36 | * @param context context 37 | */ 38 | private void initView(Context context) { 39 | View.inflate(context, R.layout.setting_item_view, this); 40 | mCbStatus = (CheckBox) this.findViewById(R.id.cb_is_update); 41 | mTitle = (TextView) this.findViewById(R.id.tv_setting_title); 42 | mContent = (TextView) this.findViewById(R.id.tv_setting_content); 43 | } 44 | 45 | private void setAttributeSet(Context context, AttributeSet attrs) { 46 | if (attrs == null) { 47 | return; 48 | } 49 | TypedArray typeArray = context.obtainStyledAttributes(attrs, 50 | R.styleable.SettingItemView); 51 | final String title = typeArray 52 | .getString(R.styleable.SettingItemView_setting_title); 53 | if (!TextUtils.isEmpty(title)) { 54 | setTitle(title); 55 | } 56 | 57 | final String content = typeArray 58 | .getString(R.styleable.SettingItemView_setting_content); 59 | if (!TextUtils.isEmpty(title)) { 60 | setContent(content); 61 | } else { 62 | mContent.setVisibility(View.GONE); 63 | } 64 | 65 | final boolean isHideCb = typeArray 66 | .getBoolean(R.styleable.SettingItemView_hide_checkbox, false); 67 | if (isHideCb) { 68 | mCbStatus.setVisibility(View.INVISIBLE); 69 | } 70 | 71 | typeArray.recycle(); 72 | } 73 | 74 | /** 75 | * 设置标题 76 | * 77 | * @param title title 78 | */ 79 | public void setTitle(String title) { 80 | mTitle.setText(title); 81 | } 82 | 83 | /** 84 | * 设置说明内容 85 | * @param content content 86 | */ 87 | public void setContent(String content) { 88 | mContent.setText(content); 89 | } 90 | 91 | /** 92 | * 判断checkbox是否获得焦点 93 | */ 94 | public boolean isChecked() { 95 | return mCbStatus.isChecked(); 96 | } 97 | 98 | /** 99 | * 设置checkbox选中状态 100 | */ 101 | public void setChecked(boolean checked) { 102 | mCbStatus.setChecked(checked); 103 | } 104 | 105 | @Override 106 | public boolean onInterceptTouchEvent(MotionEvent ev) { 107 | switch (ev.getAction()) { 108 | case MotionEvent.ACTION_DOWN: 109 | return true; 110 | default: 111 | break; 112 | } 113 | return super.onInterceptTouchEvent(ev); 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/ui/ThemeItemView.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.ui; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.text.TextUtils; 6 | import android.util.AttributeSet; 7 | import android.view.MotionEvent; 8 | import android.view.View; 9 | import android.widget.CheckBox; 10 | import android.widget.RelativeLayout; 11 | import android.widget.TextView; 12 | 13 | import com.app.teacup.R; 14 | 15 | import de.hdodenhof.circleimageview.CircleImageView; 16 | 17 | 18 | public class ThemeItemView extends RelativeLayout { 19 | 20 | private CheckBox mCbStatus; 21 | private TextView mTitle; 22 | private CircleImageView mImgView; 23 | 24 | public ThemeItemView(Context context) { 25 | super(context); 26 | initView(context); 27 | } 28 | 29 | public ThemeItemView(Context context, AttributeSet attrs) { 30 | super(context, attrs); 31 | initView(context); 32 | setAttributeSet(context, attrs); 33 | } 34 | 35 | /** 36 | * 初始化布局文件 37 | * 38 | * @param context context 39 | */ 40 | private void initView(Context context) { 41 | View.inflate(context, R.layout.theme_item_view, this); 42 | mCbStatus = (CheckBox) findViewById(R.id.cb_is_update); 43 | mTitle = (TextView) findViewById(R.id.tv_theme_title); 44 | mImgView = (CircleImageView) findViewById(R.id.tv_theme_img); 45 | } 46 | 47 | private void setAttributeSet(Context context, AttributeSet attrs) { 48 | if (attrs == null) { 49 | return; 50 | } 51 | TypedArray typeArray = context.obtainStyledAttributes(attrs, 52 | R.styleable.ThemeItemView); 53 | final String title = typeArray 54 | .getString(R.styleable.ThemeItemView_theme_title); 55 | if (!TextUtils.isEmpty(title)) { 56 | setTitle(title); 57 | } 58 | final int resourceId = typeArray 59 | .getResourceId(R.styleable.ThemeItemView_theme_background, R.color.colorPrimary); 60 | setImageBackground(resourceId); 61 | final boolean isHideCb = typeArray 62 | .getBoolean(R.styleable.ThemeItemView_theme_checkbox, false); 63 | if (isHideCb) { 64 | mCbStatus.setVisibility(View.INVISIBLE); 65 | } 66 | 67 | typeArray.recycle(); 68 | } 69 | 70 | /** 71 | * 设置标题 72 | * 73 | * @param title title 74 | */ 75 | public void setTitle(String title) { 76 | mTitle.setText(title); 77 | } 78 | 79 | public void setTitleColor(int color) { 80 | mTitle.setTextColor(color); 81 | } 82 | 83 | public void setImageBackground(int resourceId) { 84 | mImgView.setImageResource(resourceId); 85 | } 86 | /** 87 | * 判断checkbox是否获得焦点 88 | */ 89 | public boolean isChecked() { 90 | return mCbStatus.isChecked(); 91 | } 92 | 93 | /** 94 | * 设置checkbox选中状态 95 | */ 96 | public void setChecked(boolean checked) { 97 | mCbStatus.setChecked(checked); 98 | } 99 | 100 | @Override 101 | public boolean onInterceptTouchEvent(MotionEvent ev) { 102 | switch (ev.getAction()) { 103 | case MotionEvent.ACTION_DOWN: 104 | return true; 105 | default: 106 | break; 107 | } 108 | return super.onInterceptTouchEvent(ev); 109 | } 110 | 111 | } 112 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/ui/ZoomOutPageTransformer.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.ui; 2 | 3 | import android.view.View; 4 | 5 | public class ZoomOutPageTransformer implements CenterViewPager.PageTransformer { 6 | 7 | @Override 8 | public void transformPage(View view, float position) { 9 | int pageWidth = view.getWidth(); 10 | int pageHeight = view.getHeight(); 11 | if (position <= 1) { // [-1,1] 12 | float MIN_SCALE = 0.9f; 13 | float scaleFactor = MIN_SCALE 14 | + (1 - MIN_SCALE) * (1 - Math.abs(position)); 15 | float verMargin = pageHeight * (1 - scaleFactor) / 2; 16 | float horMargin = pageWidth * (1 - scaleFactor) / 2; 17 | if (position < 0) { 18 | view.setTranslationX(horMargin - verMargin / 2); 19 | } else { 20 | view.setTranslationX(-horMargin + verMargin / 2); 21 | } 22 | // Scale the page down (between MIN_SCALE and 1) 23 | view.setScaleX(scaleFactor); 24 | view.setScaleY(scaleFactor); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/util/JsonUtils.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.util; 2 | 3 | 4 | import com.app.teacup.bean.book.Book; 5 | import com.google.gson.Gson; 6 | 7 | 8 | public class JsonUtils { 9 | 10 | private static final Gson gson = new Gson(); 11 | 12 | public static Book parseJsonData(String jsonStr) { 13 | return gson.fromJson(jsonStr, Book.class); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/util/LogcatUtils.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.util; 2 | 3 | 4 | import java.io.BufferedReader; 5 | import java.io.IOException; 6 | import java.io.InputStreamReader; 7 | import java.util.ArrayList; 8 | 9 | 10 | public class LogcatUtils { 11 | private static LogcatUtils INSTANCE = null; 12 | private LogDumper mLogDumper = null; 13 | private String mResult; 14 | 15 | 16 | public static LogcatUtils getInstance() { 17 | if (INSTANCE == null) { 18 | INSTANCE = new LogcatUtils(); 19 | } 20 | return INSTANCE; 21 | } 22 | 23 | private LogcatUtils() { 24 | } 25 | 26 | public void start() { 27 | mResult = null; 28 | if (mLogDumper == null) 29 | mLogDumper = new LogDumper(); 30 | mLogDumper.clearLog(); 31 | mLogDumper.start(); 32 | } 33 | 34 | public void stop() { 35 | mResult = null; 36 | if (mLogDumper != null) { 37 | mLogDumper.stopLogs(); 38 | mLogDumper = null; 39 | } 40 | } 41 | 42 | public String getResult() { 43 | return mResult; 44 | } 45 | 46 | private class LogDumper extends Thread { 47 | 48 | private Process logcatProc; 49 | private BufferedReader mReader = null; 50 | private boolean mRunning = true; 51 | private final ArrayList mClearLog; 52 | 53 | LogDumper() { 54 | //设置命令 logcat -c 清除日志 55 | mClearLog = new ArrayList<>(); 56 | mClearLog.add("logcat"); 57 | mClearLog.add("-c"); 58 | 59 | } 60 | 61 | void stopLogs() { 62 | mRunning = false; 63 | clearLog(); 64 | } 65 | 66 | void clearLog() { 67 | try { 68 | Runtime.getRuntime().exec(mClearLog.toArray(new String[mClearLog.size()])); 69 | } catch (IOException e) { 70 | e.printStackTrace(); 71 | } 72 | } 73 | @Override 74 | public void run() { 75 | try { 76 | logcatProc = Runtime.getRuntime().exec(new String[] { "logcat","MediaResourceGetter:I *:S" }); 77 | mReader = new BufferedReader(new InputStreamReader( 78 | logcatProc.getInputStream()), 1024); 79 | String line; 80 | while (mRunning && (line = mReader.readLine()) != null) { 81 | if (!mRunning) { 82 | break; 83 | } 84 | if (line.length() == 0) { 85 | continue; 86 | } 87 | if (line.indexOf("MediaResourceGetter") > 0) { 88 | mResult = line; 89 | break; 90 | } 91 | } 92 | 93 | } catch (IOException e) { 94 | e.printStackTrace(); 95 | } finally { 96 | if (logcatProc != null) { 97 | logcatProc.destroy(); 98 | logcatProc = null; 99 | } 100 | if (mReader != null) { 101 | try { 102 | mReader.close(); 103 | mReader = null; 104 | } catch (IOException e) { 105 | e.printStackTrace(); 106 | } 107 | } 108 | } 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/util/ThreadPoolUtils.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.util; 2 | 3 | 4 | import java.util.concurrent.Executors; 5 | import java.util.concurrent.LinkedBlockingQueue; 6 | import java.util.concurrent.ThreadPoolExecutor; 7 | import java.util.concurrent.TimeUnit; 8 | 9 | public class ThreadPoolUtils { 10 | 11 | private ThreadPoolExecutor mExecutor; 12 | private static ThreadPoolUtils mInstance; 13 | 14 | public static ThreadPoolUtils getInstance() { 15 | if (mInstance == null) { 16 | synchronized (ThreadPoolUtils.class) { 17 | if (mInstance == null) { 18 | mInstance = new ThreadPoolUtils(); 19 | } 20 | } 21 | } 22 | return mInstance; 23 | } 24 | 25 | private ThreadPoolUtils() { 26 | int corePoolSize = Runtime.getRuntime().availableProcessors() * 2 + 1; 27 | mExecutor = new ThreadPoolExecutor( 28 | corePoolSize, corePoolSize, 1, 29 | TimeUnit.HOURS, 30 | new LinkedBlockingQueue(), 31 | Executors.defaultThreadFactory(), 32 | new ThreadPoolExecutor.AbortPolicy() 33 | ); 34 | } 35 | 36 | public void execute(Runnable runnable){ 37 | if(runnable==null)return; 38 | 39 | mExecutor.execute(runnable); 40 | } 41 | 42 | public void remove(Runnable runnable){ 43 | if(runnable ==null) return; 44 | mExecutor.remove(runnable); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/teacup/util/urlUtils.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup.util; 2 | 3 | 4 | public class urlUtils { 5 | public static final String DOUBAN_URL_ADDR = "https://api.douban.com/v2/book/search?q=你好&fields=all"; 6 | public static final String DOUBAN_URL_SEARCH = "https://api.douban.com/v2/book/"; 7 | 8 | public static final String WEATHER_URL = "http://wthrcdn.etouch.cn/weather_mini?city="; 9 | 10 | public static final String MUSIC_URL = "http://www.luoo.net/music/"; 11 | public static final String MUSIC_NEXT_URL = "http://www.luoo.net/tag/?p="; 12 | public static final String MUSIC_PLAYER_URL = "http://mp3-cdn.luoo.net/low/luoo/radio"; 13 | 14 | public static final String DOUBAN_MEINV_URL = "http://www.dbmeinv.com/dbgroup/show.htm?pager_offset=1"; 15 | public static final String DOUBAN_MEINV_NEXT_URL = "http://www.dbmeinv.com/dbgroup/show.htm?pager_offset="; 16 | 17 | public static final String GAOXIAO_URL = "http://www.qiushibaike.com/pic/"; 18 | public static final String GAOXIAO_URL_NEXT = "http://www.qiushibaike.com/pic/page/"; 19 | 20 | public static final String JIANDAN_URL = "http://jandan.net/ooxx"; 21 | public static final String JIANDAN_NEXT_URL = "http://jandan.net/ooxx/page-"; 22 | 23 | public static final String QIUBAI18_URL = "http://m.qiubaichengren.net/gif/"; 24 | public static final String QIUBAI18_NEXT_URL = "http://www.qiushibaike18.com/gif/page/"; 25 | 26 | public static final String MOVIE_URL = "http://www.15yc.com"; 27 | public static final String MOVIE_SEARCH_URL = "http://www.15yc.com/search?wd="; 28 | 29 | public static final String NEWS_JIANDAN_URL = "http://jandan.net"; 30 | public static final String NEWS_NEXT_URL = "http://jandan.net/page/"; 31 | public static final String VIDEO_DIYIDAN_URL = "http://www.diyidan.com/main/area/120001/1"; 32 | public static final String VIDEO_DIYIDAN_URL_NEXT = "http://www.diyidan.com/main/area/120001/"; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 14 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_stay.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/about_header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/about_header.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_baoxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_baoxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_baoyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_baoyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_dabaoyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_dabaoyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_daxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_daxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_dayu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_dayu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_duoyun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_duoyun.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_leizhenyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_leizhenyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_leizhenyubingbao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_leizhenyubingbao.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_qing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_qing.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_shachenbao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_shachenbao.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_tedabaoyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_tedabaoyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_wu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_wu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_xiaoxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_xiaoxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_xiaoyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_xiaoyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_yin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_yin.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_yujiaxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_yujiaxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_zhenxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_zhenxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_zhenyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_zhenyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_zhongxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_zhongxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/biz_plugin_weather_zhongyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/biz_plugin_weather_zhongyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/book.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/book_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/book_bg.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/button_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/button_bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/flash_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/flash_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/flash_tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/flash_tip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/gif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/gif.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/guide_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/guide_1.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/guide_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/guide_2.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/guide_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/guide_3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/guide_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/guide_4.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/header.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/loading_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/loading_photo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/main_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/main_bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/main_load_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/main_load_bg.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/movie_top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/movie_top.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/music_heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/music_heart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/music_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/music_info.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/pausemusic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/pausemusic.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/photo_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/photo_bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/photo_default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/photo_default.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/photo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/photo_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/photo_loaderror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/photo_loaderror.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/playmusic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/playmusic.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/setting.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/theme.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/weather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/weather.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/weather_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable-xhdpi/weather_bg.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/checkbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/cursor_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/dot_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/dot_focured.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/dot_nomal.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_fast_forward_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_fast_rewind_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/photo_gaoxiao_item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/point_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/point_focured.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/point_nomal.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progressbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/slide_no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable/slide_no.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/slide_yes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/drawable/slide_yes.png -------------------------------------------------------------------------------- /app/src/main/res/layout-v21/item_fanju_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 17 | 18 | 22 | 23 | 33 | 34 | 43 | 44 | 45 | 46 | 52 | 53 | 58 | 59 | 65 | 66 | 77 | 78 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /app/src/main/res/layout-v21/item_news_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 23 | 24 | 34 | 35 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 13 | 14 | 18 | 19 | 24 | 25 | 33 | 34 | 42 | 43 | 51 | 52 | 56 | 57 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_change_theme.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_music_detail_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | 25 | 26 | 35 | 36 | 46 | 47 | 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_music_play.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_news_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 13 | 14 | 19 | 20 | 25 | 26 | 33 | 34 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_setting.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 16 | 17 | 22 | 23 | 28 | 29 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_weather.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 20 | 21 | 27 | 28 | 33 | 34 | 42 | 43 | 49 | 50 | 56 | 57 | 63 | 64 | 65 | 66 | 72 | 73 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /app/src/main/res/layout/base_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/common_recycler_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/find_book_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_activity_guide.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_base_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_base_header_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 10 | 11 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_fanju_news_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 16 | 17 | 21 | 22 | 32 | 33 | 42 | 43 | 44 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_fanju_video_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 14 | 15 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_fanju_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 21 | 22 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 57 | 58 | 64 | 65 | 76 | 77 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_find_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 21 | 22 | 31 | 32 | 37 | 38 | 47 | 48 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_movie_more_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 16 | 17 | 29 | 30 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_movie_play_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 14 | 15 | 27 | 28 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_music_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 18 | 19 | 23 | 24 | 28 | 38 | 39 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_music_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | 19 | 29 | 30 | 37 | 38 | 42 | 43 | 50 | 51 | 56 | 57 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_news_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 22 | 23 | 33 | 34 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_photo_gaoxiao_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 22 | 23 | 30 | 31 | 32 | 45 | 46 | 57 | 58 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_photo_qiubai_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 19 | 25 | 34 | 35 | 38 | 39 | 47 | 48 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_photo_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_weather.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | 15 | 20 | 21 | 27 | 28 | 34 | 35 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_activity_guide.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 18 | 19 | 24 | 25 | 32 | 33 | 40 | 41 | 48 | 49 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_book_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 15 | 16 | 25 | 26 | 27 | 38 | 39 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 57 | 58 | 65 | 66 | 70 | 71 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_fanju_news_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_fanjuvideo_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 20 | 21 | 25 | 26 | 29 | 30 | 34 | 35 | 44 | 45 | 53 | 54 | 63 | 64 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_flash_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_movie_more_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 17 | 18 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_music_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 25 | 26 | 27 | 37 | 38 | 44 | 45 | 46 | 47 | 48 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_music_play.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 20 | 21 | 22 | 33 | 34 | 43 | 44 | 50 | 51 | 58 | 59 | 65 | 66 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_search_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 23 | 24 | 32 | 33 | 41 | 42 | 43 | 49 | 50 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_show_photo.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_show_photo_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/main_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 21 | 22 | 32 | 33 | 34 | 35 | 36 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/navigation_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | 19 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/navigation_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/photo_popupwindow_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 19 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/setting_item_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 19 | 25 | 26 | 27 | 28 | 35 | 36 | 37 | 38 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/stretch_view_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/theme_item_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 19 | 20 | 28 | 29 | 30 | 31 | 38 | 39 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/menu/navigation_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/menu/search_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FF4081 4 | #ffffff 5 | #000000 6 | #44000000 7 | #88000000 8 | #00796B 9 | #727272 10 | #9e9e9e 11 | #99ffffff 12 | #ffc107 13 | #F57C00 14 | #f5f5f5 15 | 16 | #2b9bff 17 | #2b9bff 18 | 19 | #4fc7bf 20 | 21 | #ff80ab 22 | #FF5252 23 | 24 | #434a54 25 | 26 | #607d8b 27 | 28 | #009688 29 | 30 | #ed7171 31 | 32 | #9c27b0 33 | 34 | -------------------------------------------------------------------------------- /app/src/test/java/com/app/teacup/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.app.teacup; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /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 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | 25 | project.ext { 26 | applicationId = "com.app.teacup" 27 | compileSdkVersion = 24 28 | buildToolsVersion = '24.0.0' 29 | minSdkVersion = 16 30 | targetSdkVersion = 24 31 | versionCode = 1 32 | versionName = '1.2_6' 33 | supportVersion = "24.2.1" 34 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Oct 05 15:17:38 CST 2016 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-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /key/keystore.properties: -------------------------------------------------------------------------------- 1 | storePassword=123456 2 | keyPassword=123456 3 | keyAlias=teacupRelease 4 | storeFile=../key/teacupRelease.jks 5 | -------------------------------------------------------------------------------- /screenshot/photo1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/screenshot/photo1.jpg -------------------------------------------------------------------------------- /screenshot/photo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/screenshot/photo2.jpg -------------------------------------------------------------------------------- /screenshot/photo3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/screenshot/photo3.jpg -------------------------------------------------------------------------------- /screenshot/photo4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/screenshot/photo4.jpg -------------------------------------------------------------------------------- /screenshot/photo5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/screenshot/photo5.jpg -------------------------------------------------------------------------------- /screenshot/photo6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/screenshot/photo6.jpg -------------------------------------------------------------------------------- /screenshot/photo7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/screenshot/photo7.jpg -------------------------------------------------------------------------------- /screenshot/photo8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/screenshot/photo8.jpg -------------------------------------------------------------------------------- /screenshot/photo9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/screenshot/photo9.jpg -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /teacup-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/henryblue/TeaCup/09f735dbb5cdf7c498664383c7555db369bc298e/teacup-release.apk --------------------------------------------------------------------------------