├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml └── misc.xml ├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── integers.xml │ │ │ │ ├── attrs.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable-hdpi │ │ │ │ ├── bg.jpg │ │ │ │ ├── arrow.png │ │ │ │ ├── line.png │ │ │ │ ├── shadow.9.png │ │ │ │ ├── main_set1.png │ │ │ │ ├── main_set2.png │ │ │ │ ├── close_guide.png │ │ │ │ ├── downloading.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_next_play.png │ │ │ │ ├── todayemotion.png │ │ │ │ ├── weiyan_icon.png │ │ │ │ ├── ic_action_previous_item.png │ │ │ │ └── detail_content_temp_icon.png │ │ │ ├── drawable-ldpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_action_previous_item.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── qrcode_wuxiaolong.jpg │ │ │ │ └── ic_action_previous_item.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── base_horization_line.png │ │ │ │ └── ic_action_previous_item.png │ │ │ ├── anim │ │ │ │ ├── cycle_7.xml │ │ │ │ ├── shake.xml │ │ │ │ ├── in_anim.xml │ │ │ │ ├── welcome_alpha.xml │ │ │ │ └── out_anim.xml │ │ │ ├── layout │ │ │ │ ├── activity_base.xml │ │ │ │ ├── main_fragment.xml │ │ │ │ ├── fragment_my_blog.xml │ │ │ │ ├── fragment_tngou_news.xml │ │ │ │ ├── welcome.xml │ │ │ │ ├── fragment_tngou_girl.xml │ │ │ │ ├── fragment_tngou_girl_detail.xml │ │ │ │ ├── activity_web_view.xml │ │ │ │ ├── activity_my_blog.xml │ │ │ │ ├── activity_tngou_girl_detail.xml │ │ │ │ ├── toolbar.xml │ │ │ │ ├── activity_show_image.xml │ │ │ │ ├── ad_layout.xml │ │ │ │ ├── fragment_show_image.xml │ │ │ │ ├── image_detail_item.xml │ │ │ │ ├── drawer_list_item.xml │ │ │ │ ├── my_blog_item.xml │ │ │ │ ├── activity_main_new.xml │ │ │ │ ├── nav_header_main_new.xml │ │ │ │ ├── recycler_view_item.xml │ │ │ │ ├── tngou_girl_item.xml │ │ │ │ ├── tngou_new_item.xml │ │ │ │ ├── menu_layout.xml │ │ │ │ ├── activity_tngou_news_detail.xml │ │ │ │ ├── activity_circle.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── aboutus.xml │ │ │ │ └── works_show.xml │ │ │ ├── menu │ │ │ │ ├── set.xml │ │ │ │ ├── main_new.xml │ │ │ │ └── activity_main_new_drawer.xml │ │ │ └── drawable │ │ │ │ ├── main_set.xml │ │ │ │ ├── side_nav_bar.xml │ │ │ │ ├── ic_home_24dp.xml │ │ │ │ ├── list_item_bg.xml │ │ │ │ ├── ic_build_24dp.xml │ │ │ │ ├── actionbar_menu_selector.xml │ │ │ │ ├── ic_insert_link_24dp.xml │ │ │ │ ├── ic_border_color_24dp.xml │ │ │ │ ├── ic_face_24dp.xml │ │ │ │ ├── shape_widget_bg.xml │ │ │ │ ├── shape_red.xml │ │ │ │ └── shape_white.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── wuxiaolong │ │ │ │ └── wewin │ │ │ │ ├── ui │ │ │ │ ├── set │ │ │ │ │ ├── CircleActivity.java │ │ │ │ │ ├── AboutUsActivity.java │ │ │ │ │ └── SetActivity.java │ │ │ │ ├── myblog │ │ │ │ │ ├── MyBlogActivity.java │ │ │ │ │ └── MyBlogFragment.java │ │ │ │ ├── WorksShowActivity.java │ │ │ │ ├── WelcomeActivity.java │ │ │ │ ├── tngougirl │ │ │ │ │ ├── TngouGirlDetailFragment.java │ │ │ │ │ ├── TngouGirlDetailActivity.java │ │ │ │ │ └── TngouGirlFragment.java │ │ │ │ ├── BaseFragment.java │ │ │ │ ├── juzimi │ │ │ │ │ ├── ShowImageFragment.java │ │ │ │ │ ├── ShowImageActivity.java │ │ │ │ │ ├── RecyclerViewAdapter.java │ │ │ │ │ └── MainFragment.java │ │ │ │ ├── tngounews │ │ │ │ │ ├── TngouNewsDetailActivity.java │ │ │ │ │ └── TngouNewsFragment.java │ │ │ │ ├── MainNewActivity.java │ │ │ │ ├── WebViewActivity.java │ │ │ │ ├── BaseActivity.java │ │ │ │ └── MainActivity.java │ │ │ │ ├── model │ │ │ │ ├── BaseModel.java │ │ │ │ ├── MainModel.java │ │ │ │ ├── TngouNewsModel.java │ │ │ │ ├── TngouNewsDetailModel.java │ │ │ │ ├── TngouGirlDetailModel.java │ │ │ │ └── TngouGirlModel.java │ │ │ │ ├── utils │ │ │ │ ├── AndroidApplication.java │ │ │ │ ├── dragLayout │ │ │ │ │ └── MyRelativeLayout.java │ │ │ │ ├── HackyViewPager.java │ │ │ │ ├── ImageLoader.java │ │ │ │ └── AppConstants.java │ │ │ │ ├── retrofit │ │ │ │ ├── RetrofitCallback.java │ │ │ │ ├── AppClient.java │ │ │ │ └── ApiStores.java │ │ │ │ └── draglayout │ │ │ │ └── MainLayout.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── com │ │ └── xiaomolongstudio │ │ └── wewin │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── updateLog.txt ├── screenshots ├── qrcode.png └── screenshots.gif ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── WeWin.iml ├── README.md ├── gradlew.bat ├── import-summary.txt └── gradlew /.idea/.name: -------------------------------------------------------------------------------- 1 | WeWin -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /updateLog.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/updateLog.txt -------------------------------------------------------------------------------- /screenshots/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/screenshots/qrcode.png -------------------------------------------------------------------------------- /app/src/main/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /screenshots/screenshots.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/screenshots/screenshots.gif -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/bg.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/line.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/shadow.9.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/main_set1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/main_set1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/main_set2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/main_set2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/close_guide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/close_guide.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/downloading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/downloading.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_next_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/ic_next_play.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/todayemotion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/todayemotion.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/weiyan_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/weiyan_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/qrcode_wuxiaolong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-xhdpi/qrcode_wuxiaolong.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_previous_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/ic_action_previous_item.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_previous_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-mdpi/ic_action_previous_item.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/base_horization_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-xxhdpi/base_horization_line.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/detail_content_temp_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-hdpi/detail_content_temp_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_previous_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-xhdpi/ic_action_previous_item.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_previous_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WuXiaolong/WeWin/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_previous_item.png -------------------------------------------------------------------------------- /app/src/main/res/anim/cycle_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/shake.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Nov 02 08:44:35 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 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/menu/set.xml: -------------------------------------------------------------------------------- 1 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/main_set.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_home_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main_new.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/list_item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/xiaomolongstudio/wewin/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.xiaomolongstudio.wewin; 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/res/layout/main_fragment.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/set/CircleActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.set; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.wuxiaolong.wewin.ui.BaseActivity; 6 | import com.xiaomolongstudio.wewin.R; 7 | 8 | public class CircleActivity extends BaseActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_circle); 14 | initToolbar("剩友圈"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/myblog/MyBlogActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.myblog; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.wuxiaolong.wewin.ui.BaseActivity; 6 | import com.xiaomolongstudio.wewin.R; 7 | 8 | public class MyBlogActivity extends BaseActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_my_blog); 14 | initToolbar("吴小龙同學"); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_build_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/actionbar_menu_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_my_blog.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/model/BaseModel.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.model; 2 | 3 | /** 4 | * Created by Administrator 5 | * on 2016/11/3. 6 | */ 7 | 8 | public class BaseModel { 9 | private boolean status; 10 | private int total; 11 | 12 | public int getTotal() { 13 | return total; 14 | } 15 | 16 | public void setTotal(int total) { 17 | this.total = total; 18 | } 19 | 20 | public boolean isStatus() { 21 | return status; 22 | } 23 | 24 | public void setStatus(boolean status) { 25 | this.status = status; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_insert_link_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_tngou_news.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/welcome.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_tngou_girl.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_tngou_girl_detail.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_border_color_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/anim/in_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/model/MainModel.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.model; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by Administrator on 2015/11/22 0022. 7 | */ 8 | public class MainModel implements Serializable { 9 | String title; 10 | String iamgeUrl; 11 | 12 | public String getTitle() { 13 | return title; 14 | } 15 | 16 | public void setTitle(String title) { 17 | this.title = title; 18 | } 19 | 20 | public String getIamgeUrl() { 21 | return iamgeUrl; 22 | } 23 | 24 | public void setIamgeUrl(String iamgeUrl) { 25 | this.iamgeUrl = iamgeUrl; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/anim/welcome_alpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_web_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_my_blog.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/anim/out_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/utils/AndroidApplication.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.utils; 2 | 3 | import android.app.Application; 4 | 5 | import com.squareup.leakcanary.LeakCanary; 6 | 7 | /** 8 | * Created by Administrator 9 | * on 2016/11/28. 10 | */ 11 | 12 | public class AndroidApplication extends Application { 13 | @Override 14 | public void onCreate() { 15 | super.onCreate(); 16 | if (LeakCanary.isInAnalyzerProcess(this)) { 17 | // This process is dedicated to LeakCanary for heap analysis. 18 | // You should not init your app in this process. 19 | return; 20 | } 21 | LeakCanary.install(this); 22 | // Normal app init code... 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /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 C:\Program Files\Android\android-studio\sdk/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 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_tngou_girl_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_face_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_show_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Settings specified in this file will override any Gradle settings 5 | # configured through the IDE. 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 -------------------------------------------------------------------------------- /app/src/main/res/layout/ad_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 17 | 18 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_widget_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /WeWin.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/menu/activity_main_new_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 14 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_show_image.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 12 | 13 | 17 | 18 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/retrofit/RetrofitCallback.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.retrofit; 2 | 3 | import retrofit2.Call; 4 | import retrofit2.Callback; 5 | import retrofit2.Response; 6 | 7 | /** 8 | * Created by WuXiaolong 9 | * on 2016/9/22. 10 | * github:https://github.com/WuXiaolong/ 11 | * weibo:http://weibo.com/u/2175011601 12 | * 微信公众号:吴小龙同学 13 | * 个人博客:http://wuxiaolong.me/ 14 | */ 15 | 16 | public abstract class RetrofitCallback implements Callback { 17 | 18 | public abstract void onSuccess(M model); 19 | 20 | public abstract void onFailure(int code, String msg); 21 | 22 | public abstract void onThrowable(Throwable t); 23 | 24 | public abstract void onFinish(); 25 | 26 | @Override 27 | public void onResponse(Call call, Response response) { 28 | if (response.isSuccessful()) { 29 | onSuccess(response.body()); 30 | } else { 31 | onFailure(response.code(), response.errorBody().toString()); 32 | } 33 | onFinish(); 34 | } 35 | 36 | @Override 37 | public void onFailure(Call call, Throwable t) { 38 | onThrowable(t); 39 | onFinish(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 11sp 7 | 14sp 8 | 16sp 9 | 18sp 10 | 16dp 11 | 12 | 16dp 13 | 160dp 14 | 16dp 15 | 14sp 16 | 17 | 12sp 18 | 14sp 19 | 20 | 16sp 21 | 20sp 22 | 24sp 23 | 34sp 24 | 45sp 25 | 56sp 26 | 112sp 27 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/image_detail_item.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 12 | 13 | 17 | 18 | 26 | 27 | 28 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/set/AboutUsActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.set; 2 | 3 | import android.content.Intent; 4 | import android.net.Uri; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | import android.widget.TextView; 8 | 9 | import com.wuxiaolong.wewin.ui.BaseActivity; 10 | import com.wuxiaolong.wewin.utils.AppUtils; 11 | import com.xiaomolongstudio.wewin.R; 12 | 13 | /** 14 | * 关于我们 15 | */ 16 | public class AboutUsActivity extends BaseActivity { 17 | private TextView versionName; 18 | 19 | protected void onCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.aboutus); 22 | initToolbar(getString(R.string.aboutus)); 23 | versionName = (TextView) findViewById(R.id.versionName); 24 | versionName.setText(getString(R.string.version) + AppUtils.getVersionName(this)); 25 | findViewById(R.id.aboutusText).setOnClickListener(new View.OnClickListener() { 26 | @Override 27 | public void onClick(View v) { 28 | Uri uri = Uri.parse("https://github.com/WuXiaolong/WeWin"); 29 | Intent intent = new Intent(Intent.ACTION_VIEW, uri); 30 | startActivity(intent); 31 | 32 | } 33 | }); 34 | } 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/WorksShowActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | import android.view.View.OnClickListener; 6 | 7 | import com.xiaomolongstudio.wewin.R; 8 | import com.wuxiaolong.wewin.utils.AppUtils; 9 | 10 | /** 11 | * 作品秀 12 | */ 13 | public class WorksShowActivity extends BaseActivity implements OnClickListener { 14 | 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.works_show); 18 | initToolbar("作品秀"); 19 | findViewById(R.id.weiyan).setOnClickListener(this); 20 | findViewById(R.id.danhuaer).setOnClickListener(this); 21 | } 22 | 23 | @Override 24 | public void onClick(View v) { 25 | switch (v.getId()) { 26 | case R.id.weiyan: 27 | AppUtils.marketDownload(WorksShowActivity.this, 28 | "com.android.xiaomolongstudio.weiyan"); 29 | break; 30 | case R.id.danhuaer: 31 | AppUtils.marketDownload(WorksShowActivity.this, 32 | "com.android.xiaomolongstudio.danhuaer"); 33 | break; 34 | 35 | default: 36 | break; 37 | } 38 | 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/drawer_list_item.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/my_blog_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | 26 | 27 | 34 | 35 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main_new.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 19 | 20 | 25 | 26 | 27 | 28 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/draglayout/MainLayout.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.draglayout; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.MotionEvent; 6 | import android.widget.RelativeLayout; 7 | 8 | import com.wuxiaolong.wewin.draglayout.DragLayout.Status; 9 | 10 | 11 | public class MainLayout extends RelativeLayout { 12 | private DragLayout mDragLayout; 13 | 14 | public MainLayout(Context context) { 15 | super(context); 16 | } 17 | 18 | public MainLayout(Context context, AttributeSet attrs) { 19 | super(context, attrs); 20 | } 21 | 22 | public MainLayout(Context context, AttributeSet attrs, int defStyle) { 23 | super(context, attrs, defStyle); 24 | } 25 | 26 | public void setDragLayout(DragLayout dl) { 27 | this.mDragLayout = dl; 28 | } 29 | 30 | @Override 31 | public boolean onInterceptTouchEvent(MotionEvent event) { 32 | if (mDragLayout.getmStatus() != Status.Close) { 33 | return true; 34 | } 35 | return super.onInterceptTouchEvent(event); 36 | } 37 | 38 | @Override 39 | public boolean onTouchEvent(MotionEvent event) { 40 | if (mDragLayout.getmStatus() != Status.Close) { 41 | if (event.getAction() == MotionEvent.ACTION_UP) { 42 | mDragLayout.close(); 43 | } 44 | return true; 45 | } 46 | return super.onTouchEvent(event); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/utils/dragLayout/MyRelativeLayout.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.utils.dragLayout; 2 | 3 | import com.wuxiaolong.wewin.utils.dragLayout.DragLayout.Status; 4 | 5 | import android.content.Context; 6 | import android.util.AttributeSet; 7 | import android.view.MotionEvent; 8 | import android.widget.RelativeLayout; 9 | 10 | 11 | public class MyRelativeLayout extends RelativeLayout { 12 | private DragLayout dl; 13 | 14 | public MyRelativeLayout(Context context) { 15 | super(context); 16 | } 17 | 18 | public MyRelativeLayout(Context context, AttributeSet attrs) { 19 | super(context, attrs); 20 | } 21 | 22 | public MyRelativeLayout(Context context, AttributeSet attrs, int defStyle) { 23 | super(context, attrs, defStyle); 24 | } 25 | 26 | public void setDragLayout(DragLayout dl) { 27 | this.dl = dl; 28 | } 29 | 30 | @Override 31 | public boolean onInterceptTouchEvent(MotionEvent event) { 32 | if (dl.getStatus() != Status.Close) { 33 | return true; 34 | } 35 | return super.onInterceptTouchEvent(event); 36 | } 37 | 38 | @Override 39 | public boolean onTouchEvent(MotionEvent event) { 40 | if (dl.getStatus() != Status.Close) { 41 | if (event.getAction() == MotionEvent.ACTION_UP) { 42 | dl.close(); 43 | } 44 | return true; 45 | } 46 | return super.onTouchEvent(event); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nav_header_main_new.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 21 | 22 | 28 | 29 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/utils/HackyViewPager.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.utils; 2 | 3 | import android.content.Context; 4 | import android.support.v4.view.ViewPager; 5 | import android.util.AttributeSet; 6 | import android.view.MotionEvent; 7 | 8 | /** 9 | * Created by Administrator on 2015/11/22 0022. 10 | */ 11 | public class HackyViewPager extends ViewPager { 12 | 13 | private boolean isLocked; 14 | 15 | public HackyViewPager(Context context) { 16 | super(context); 17 | isLocked = false; 18 | } 19 | 20 | public HackyViewPager(Context context, AttributeSet attrs) { 21 | super(context, attrs); 22 | isLocked = false; 23 | } 24 | 25 | @Override 26 | public boolean onInterceptTouchEvent(MotionEvent ev) { 27 | if (!isLocked) { 28 | try { 29 | return super.onInterceptTouchEvent(ev); 30 | } catch (IllegalArgumentException e) { 31 | e.printStackTrace(); 32 | return false; 33 | } 34 | } 35 | return false; 36 | } 37 | 38 | @Override 39 | public boolean onTouchEvent(MotionEvent event) { 40 | return !isLocked && super.onTouchEvent(event); 41 | } 42 | 43 | public void toggleLock() { 44 | isLocked = !isLocked; 45 | } 46 | 47 | public void setLocked(boolean isLocked) { 48 | this.isLocked = isLocked; 49 | } 50 | 51 | public boolean isLocked() { 52 | return isLocked; 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/retrofit/AppClient.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.retrofit; 2 | 3 | 4 | import com.xiaomolongstudio.wewin.BuildConfig; 5 | 6 | import okhttp3.OkHttpClient; 7 | import okhttp3.logging.HttpLoggingInterceptor; 8 | import retrofit2.Retrofit; 9 | import retrofit2.converter.gson.GsonConverterFactory; 10 | 11 | /** 12 | * Created by WuXiaolong 13 | * on 2016/3/24. 14 | * github:https://github.com/WuXiaolong/ 15 | * weibo:http://weibo.com/u/2175011601 16 | * 微信公众号:吴小龙同学 17 | * 个人博客:http://wuxiaolong.me/ 18 | */ 19 | public class AppClient { 20 | public static Retrofit mRetrofit; 21 | 22 | public static Retrofit retrofit() { 23 | if (mRetrofit == null) { 24 | OkHttpClient.Builder builder = new OkHttpClient.Builder(); 25 | 26 | if (BuildConfig.DEBUG) { 27 | // Log信息拦截器 28 | HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); 29 | loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); 30 | //设置 Debug Log 模式 31 | builder.addInterceptor(loggingInterceptor); 32 | } 33 | OkHttpClient okHttpClient = builder.build(); 34 | mRetrofit = new Retrofit.Builder() 35 | .baseUrl(ApiStores.API_SERVER_URL) 36 | .addConverterFactory(GsonConverterFactory.create()) 37 | .client(okHttpClient) 38 | .build(); 39 | } 40 | return mRetrofit; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/utils/ImageLoader.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.utils; 2 | 3 | import android.app.Activity; 4 | import android.widget.ImageView; 5 | 6 | import com.squareup.picasso.Picasso; 7 | import com.xiaomolongstudio.wewin.R; 8 | 9 | import java.io.File; 10 | 11 | /** 12 | * Created by WuXiaolong on 2016/8/16. 13 | */ 14 | public class ImageLoader { 15 | public static void load(Activity activity, String url, ImageView imageView) { 16 | load(activity, url, R.drawable.downloading, imageView); 17 | } 18 | 19 | public static void load(Activity activity, File file, ImageView imageView) { 20 | load(activity, file, R.drawable.downloading, imageView); 21 | } 22 | 23 | public static void load(Activity activity, Integer resourceId, ImageView imageView) { 24 | load(activity, resourceId, R.drawable.downloading, imageView); 25 | } 26 | 27 | public static void load(Activity activity, String url, int defaultImage, ImageView imageView) { 28 | Picasso.with(activity).load(url).placeholder(defaultImage).error(defaultImage).into(imageView); 29 | } 30 | 31 | public static void load(Activity activity, File file, int defaultImage, ImageView imageView) { 32 | Picasso.with(activity).load(file).placeholder(defaultImage).error(defaultImage).into(imageView); 33 | } 34 | 35 | public static void load(Activity activity, int resourceId, int defaultImage, ImageView imageView) { 36 | Picasso.with(activity).load(resourceId).placeholder(defaultImage).error(defaultImage).into(imageView); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/retrofit/ApiStores.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.retrofit; 2 | 3 | 4 | import com.wuxiaolong.wewin.model.TngouGirlDetailModel; 5 | import com.wuxiaolong.wewin.model.TngouGirlModel; 6 | import com.wuxiaolong.wewin.model.TngouNewsDetailModel; 7 | import com.wuxiaolong.wewin.model.TngouNewsModel; 8 | 9 | import okhttp3.ResponseBody; 10 | import retrofit2.Call; 11 | import retrofit2.http.GET; 12 | import retrofit2.http.Path; 13 | import retrofit2.http.Query; 14 | 15 | /** 16 | * Created by WuXiaolong 17 | * on 2016/3/24. 18 | * github:https://github.com/WuXiaolong/ 19 | * weibo:http://weibo.com/u/2175011601 20 | * 微信公众号:吴小龙同学 21 | * 个人博客:http://wuxiaolong.me/ 22 | */ 23 | public interface ApiStores { 24 | //baseUrl 25 | String API_SERVER_URL = "http://www.tngou.net/"; 26 | 27 | 28 | @GET("http://wuxiaolong.me/") 29 | Call loadMyBlog(); 30 | 31 | @GET("http://wuxiaolong.me/page/{page}") 32 | Call loadMyBlog(@Path("page") int page); 33 | 34 | @GET("api/top/list") 35 | Call loadTngouNews(@Query("page") int page, @Query("rows") int rows); 36 | 37 | @GET("api/top/show") 38 | Call loadTngouNewsDetail(@Query("id") int id); 39 | 40 | @GET("tnfs/api/list") 41 | Call loadTngouGirl(@Query("page") int page, @Query("rows") int rows); 42 | 43 | @GET("tnfs/api/show") 44 | Call loadTngouGirlDetail(@Query("id") int id); 45 | 46 | @GET("http://www.juzimi.com/meitumeiju/{type}") 47 | Call loadMainData(@Path("type") String type, @Query("page") int page); 48 | 49 | @GET("http://www.juzimi.com/meitumeiju?/page") 50 | Call loadMainData(@Query("page") int page); 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/utils/AppConstants.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.utils; 2 | 3 | import android.os.Environment; 4 | import android.support.v4.app.Fragment; 5 | 6 | import com.wuxiaolong.wewin.ui.juzimi.MainFragment; 7 | 8 | public class AppConstants { 9 | public static final String COLOR = "color"; 10 | public static final String ID = "id"; 11 | public static final String TNGOU_GIRL_LIST = "TngouGirlList"; 12 | public static String API_SERVER_IMAGE_URL = "http://tnfs.tngou.net/img"; 13 | public static String IMAGE_URL = "imageUrl"; 14 | public static final String TRANSIT_PIC = "picture"; 15 | public static final String INDEX = "index"; 16 | public static int USER_NICKNAME_LAYOUT = 1; 17 | public static int USER_EMAIL_LAYOUT = 2; 18 | public static int USER_INTRODUCTION_LAYOUT = 3; 19 | public static int USER_HEAD = 4; 20 | 21 | public static int PHOTO_CUTTING = 5; 22 | public static int REQUEST_CODE_USER_ALBUM = 10;// 验证码登录 23 | public static int BTN_PHOTOGRAPH = 13;// 验证码登录 24 | public static String SAVED_IMAGE_DIR_PATH = Environment 25 | .getExternalStorageDirectory().getPath() + "/wewin/camera/";// 拍照路径 26 | 27 | public static int REQUEST_CODE_SETTINGS = 11; 28 | public static String APPKEY56 = "3000004972"; 29 | public static String SECRET56 = "526f5ec9519c7205"; 30 | public static int REQUEST_CODE_ADD = 14; 31 | 32 | public static String KEY_AD_MOGO = "84849cb4db40477eae961541fbde48b4"; 33 | public static Fragment[] mFragments = {AppUtils.newInstance(new MainFragment()) 34 | }; 35 | public static String POSITION = "position"; 36 | public static String WEBVIEW_TITLE = "webview_title"; 37 | public static String WEBVIEW_URL = "webview_url"; 38 | public static String WEBVIEW_URL_DATA = "webviewUrlData"; 39 | public static String MY_Blog_URL = "http://wuxiaolong.me"; 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/recycler_view_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 19 | 20 | 24 | 25 | 31 | 32 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/tngou_girl_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 19 | 20 | 24 | 25 | 31 | 32 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/WelcomeActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.view.animation.Animation; 7 | import android.view.animation.Animation.AnimationListener; 8 | import android.view.animation.AnimationUtils; 9 | import android.widget.TextView; 10 | 11 | import com.umeng.analytics.MobclickAgent; 12 | import com.xiaomolongstudio.wewin.R; 13 | 14 | /** 15 | * 欢迎页 16 | */ 17 | public class WelcomeActivity extends Activity { 18 | TextView appName; 19 | 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.welcome); 23 | appName = (TextView) findViewById(R.id.appName); 24 | Animation mAnimation; 25 | mAnimation = AnimationUtils.loadAnimation(this, R.anim.welcome_alpha); 26 | appName.setAnimation(mAnimation); 27 | mAnimation.setAnimationListener(new AnimationListener() { 28 | 29 | @Override 30 | public void onAnimationStart(Animation arg0) { 31 | 32 | } 33 | 34 | @Override 35 | public void onAnimationRepeat(Animation arg0) { 36 | 37 | } 38 | 39 | @Override 40 | public void onAnimationEnd(Animation arg0) { 41 | intoMain(); 42 | } 43 | }); 44 | 45 | } 46 | 47 | 48 | /** 49 | * 进入首页 50 | */ 51 | private void intoMain() { 52 | startActivity(new Intent(WelcomeActivity.this, MainNewActivity.class)); 53 | overridePendingTransition(R.anim.in_anim, R.anim.out_anim); 54 | finish(); 55 | } 56 | 57 | @Override 58 | public void onResume() { 59 | super.onResume(); 60 | MobclickAgent.onResume(this); 61 | } 62 | 63 | @Override 64 | public void onPause() { 65 | super.onPause(); 66 | MobclickAgent.onPause(this); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/res/layout/tngou_new_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 21 | 22 | 26 | 27 | 33 | 34 | 40 | 41 | 42 | 50 | 51 | 52 | 56 | -------------------------------------------------------------------------------- /app/src/main/res/layout/menu_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 20 | 21 | 29 | 30 | 31 | 41 | 42 | 43 | 44 | 55 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'android-apt' 3 | def supportVersion = "25.0.0" 4 | android { 5 | compileSdkVersion 23 6 | buildToolsVersion '25' 7 | defaultConfig { 8 | applicationId "com.xiaomolongstudio.wewin" 9 | minSdkVersion 14 10 | targetSdkVersion 22 11 | versionCode 111 12 | versionName "1.1.1" 13 | vectorDrawables.useSupportLibrary = true 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | } 22 | 23 | dependencies { 24 | compile fileTree(include: ['*.jar'], dir: 'libs') 25 | compile 'com.android.support:support-v4:' + supportVersion 26 | compile 'com.android.support:appcompat-v7:' + supportVersion 27 | compile 'com.android.support:cardview-v7:' + supportVersion 28 | compile 'com.android.support:palette-v7:' + supportVersion 29 | compile 'com.android.support:design:' + supportVersion 30 | compile 'com.nineoldandroids:library:2.4.0' 31 | compile 'com.commit451:PhotoView:1.2.4' 32 | compile 'com.wuxiaolong.pullloadmorerecyclerview:library:1.1.2' 33 | compile 'com.squareup.picasso:picasso:2.5.2' 34 | compile 'org.jsoup:jsoup:1.10.1' 35 | compile 'com.squareup.retrofit2:retrofit:2.0.2' 36 | compile 'com.squareup.okhttp3:logging-interceptor:3.1.2' 37 | compile 'com.squareup.retrofit2:converter-gson:2.0.2' 38 | compile 'com.wuxiaolong.androidutils:androidutils:1.0.6' 39 | compile 'com.jakewharton:butterknife:8.4.0' 40 | apt 'com.jakewharton:butterknife-compiler:8.4.0' 41 | compile 'com.wuxiaolong.androidutils:androidutils:1.0.6' 42 | compile 'com.mostafagazar:customshapeimageview:1.0.4' 43 | compile 'com.romainpiel.shimmer:library:1.4.0@aar' 44 | compile 'com.umeng.analytics:analytics:latest.integration' 45 | debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' 46 | releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 47 | testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WeWin 5 | 一款开源应用,包括热点新闻、天狗妹妹、我的博客。安卓手机下载:http://app.mi.com/detail/67787 ,源码地址:https://github.com/WuXiaolong/WeWin 6 | " 一款开源应用,包括热点新闻、天狗妹妹、我的博客,源码地址:https://github.com/WuXiaolong/WeWin。" 7 | Open navigation drawer 8 | Close navigation drawer 9 | <b>v1.0</b><br>一款小清新应用,包括美图美句、手写美句、经典对白。来吧,让我们尽情感受文艺范。 10 | "<b>剩者为王</b>,据说这个APP程序猿爱不释手,集成了github主流的库是如何使用的,项目开源(https://github.com/WuXiaolong/WeWin),将持续更新,欢迎Star。<br><br><b>Android技术交流QQ群</b>③群:370527306" 11 | 原版 12 | 13 | 14 | 美图美句 15 | 手写美句 16 | 经典对白 17 | 18 | 19 | Hello world! 20 | 关于我们 21 | 版本: 22 | 剩友圈 23 | 再按一次退出程序 24 | 设置 25 | MainNewActivity 26 | 27 | Open navigation drawer 28 | Close navigation drawer 29 | 30 | 31 | Hello blank fragment 32 | 热点新闻 33 | 天狗妹妹 34 | 我的博客 35 | 个人博客:http://wuxiaolong.me/ 36 | 微信公众号:吴小龙同学 37 | github:https://github.com/WuXiaolong/ 38 | QQ群\n剩者为王③群 370527306\n剩者为王②群 376526418\n剩者为王①群 314447894\n请勿重复加群 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/tngougirl/TngouGirlDetailFragment.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.tngougirl; 2 | 3 | 4 | import android.os.Bundle; 5 | import android.support.annotation.Nullable; 6 | import android.support.v4.app.Fragment; 7 | import android.support.v4.view.ViewCompat; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | 12 | import com.wuxiaolong.wewin.ui.BaseFragment; 13 | import com.wuxiaolong.wewin.utils.AppConstants; 14 | import com.wuxiaolong.wewin.utils.ImageLoader; 15 | import com.xiaomolongstudio.wewin.R; 16 | 17 | import butterknife.BindView; 18 | import butterknife.ButterKnife; 19 | import uk.co.senab.photoview.PhotoView; 20 | 21 | public class TngouGirlDetailFragment extends BaseFragment { 22 | 23 | 24 | @BindView(R.id.photoView) 25 | PhotoView photoView; 26 | private String imageUrl; 27 | 28 | 29 | public static Fragment newFragment(String imageUrl) { 30 | Bundle bundle = new Bundle(); 31 | bundle.putString(AppConstants.IMAGE_URL, imageUrl); 32 | TngouGirlDetailFragment fragment = new TngouGirlDetailFragment(); 33 | fragment.setArguments(bundle); 34 | return fragment; 35 | } 36 | 37 | @Override 38 | public void onCreate(@Nullable Bundle savedInstanceState) { 39 | super.onCreate(savedInstanceState); 40 | imageUrl = this.getArguments().getString(AppConstants.IMAGE_URL); 41 | } 42 | 43 | @Override 44 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 45 | Bundle savedInstanceState) { 46 | // Inflate the layout for this fragment 47 | View view = inflater.inflate(R.layout.fragment_tngou_girl_detail, container, false); 48 | ButterKnife.bind(this, view); 49 | return view; 50 | } 51 | 52 | @Override 53 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 54 | super.onViewCreated(view, savedInstanceState); 55 | ViewCompat.setTransitionName(photoView, imageUrl); 56 | ImageLoader.load(mActivity, AppConstants.API_SERVER_IMAGE_URL + imageUrl, photoView); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_tngou_news_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 18 | 19 | 22 | 23 | 27 | 28 | 33 | 34 | 40 | 41 | 45 | 46 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/BaseFragment.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui; 2 | 3 | 4 | import android.app.Activity; 5 | import android.os.Bundle; 6 | import android.support.annotation.Nullable; 7 | import android.support.v4.app.Fragment; 8 | import android.view.View; 9 | import android.widget.Toast; 10 | 11 | import com.umeng.analytics.MobclickAgent; 12 | import com.wuxiaolong.wewin.retrofit.ApiStores; 13 | import com.wuxiaolong.wewin.retrofit.AppClient; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | import butterknife.ButterKnife; 19 | import retrofit2.Call; 20 | 21 | public class BaseFragment extends Fragment { 22 | 23 | private List calls; 24 | public ApiStores apiStores = AppClient.retrofit().create(ApiStores.class); 25 | public Activity mActivity; 26 | 27 | 28 | @Override 29 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 30 | super.onViewCreated(view, savedInstanceState); 31 | ButterKnife.bind(this, view); 32 | mActivity = getActivity(); 33 | } 34 | 35 | @Override 36 | public void onDestroyView() { 37 | callCancel(); 38 | super.onDestroyView(); 39 | } 40 | 41 | public void addCalls(Call call) { 42 | if (calls == null) { 43 | calls = new ArrayList<>(); 44 | } 45 | calls.add(call); 46 | } 47 | 48 | private void callCancel() { 49 | if (calls != null && calls.size() > 0) { 50 | for (Call call : calls) { 51 | if (!call.isCanceled()) 52 | call.cancel(); 53 | } 54 | calls.clear(); 55 | } 56 | } 57 | 58 | public void toastShow(int resId) { 59 | Toast.makeText(mActivity, resId, Toast.LENGTH_SHORT).show(); 60 | } 61 | 62 | public void toastShow(String resId) { 63 | Toast.makeText(mActivity, resId, Toast.LENGTH_SHORT).show(); 64 | } 65 | @Override 66 | public void onResume() { 67 | super.onResume(); 68 | //统计页面,"MainScreen"为页面名称,可自定义 69 | MobclickAgent.onPageStart(this.getClass().getSimpleName()); 70 | } 71 | 72 | @Override 73 | public void onPause() { 74 | super.onPause(); 75 | MobclickAgent.onPageEnd(this.getClass().getSimpleName()); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 剩者为王WeWin 2 | 当时尝鲜Android studio beta版,做的这个开源项目An Android app for Android studio beta. 3 | 4 | # 效果预览Preview 5 | ![](http://7q5c2h.com1.z0.glb.clouddn.com/WeWin.jpg?watermark/2/text/5ZC05bCP6b6Z5ZCM5a24/font/5qW35L2T/fontsize/500/fill/I0VGRUZFRg==/dissolve/100/gravity/SouthEast/dx/10/dy/10) 6 | 7 | 10 | 11 | # 开源库Open source projects 12 | 13 | * [PullLoadMoreRecyclerView](https://github.com/WuXiaolong/PullLoadMoreRecyclerView) 14 | * [AndroidUtils](https://github.com/WuXiaolong/AndroidUtils) 15 | * [Shimmer-android](https://github.com/RomainPiel/Shimmer-android) 16 | * [ButterKnife](https://github.com/JakeWharton/butterknife) 17 | * [PhotoView](https://github.com/chrisbanes/PhotoView) 18 | * [picasso](https://github.com/square/picasso) 19 | * [retrofit](https://github.com/square/retrofit) 20 | * [CustomShapeImageView](https://github.com/MostafaGazar/CustomShapeImageView) 21 | * [NineOldAndroids](https://github.com/JakeWharton/NineOldAndroids) 22 | 23 | 24 | # 作者博客 25 | [https://wuxiaolong.github.io/](https://wuxiaolong.github.io/) 26 | 27 | # 微博 28 | [吴小龙同學](http://weibo.com/u/2175011601) 29 | 30 | # 联系我 31 | 我的微信公众号:吴小龙同学,欢迎关注交流。 32 | 33 | ![](http://7q5c2h.com1.z0.glb.clouddn.com/qrcode_wuxiaolong.jpg) 34 | 35 | # License 36 | 37 | MIT License 38 | 39 | Copyright (c) 2016 吴小龙同學 40 | 41 | Permission is hereby granted, free of charge, to any person obtaining a copy 42 | of this software and associated documentation files (the "Software"), to deal 43 | in the Software without restriction, including without limitation the rights 44 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 45 | copies of the Software, and to permit persons to whom the Software is 46 | furnished to do so, subject to the following conditions: 47 | 48 | The above copyright notice and this permission notice shall be included in all 49 | copies or substantial portions of the Software. 50 | 51 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 52 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 53 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 54 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 55 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 56 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 57 | SOFTWARE. 58 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 17 | 18 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 40 | 41 | 46 | 47 | 48 | 49 | 55 | 56 | 61 | 62 | 63 | 69 | 70 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 21 | 22 | 26 | 27 | 35 | 36 | 47 | 48 | 49 | 50 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | 1.8 51 | 52 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /import-summary.txt: -------------------------------------------------------------------------------- 1 | ECLIPSE ANDROID PROJECT IMPORT SUMMARY 2 | ====================================== 3 | 4 | Ignored Files: 5 | -------------- 6 | The following files were *not* copied into the new Gradle project; you 7 | should evaluate whether these are still needed in your project and if 8 | so manually move them: 9 | 10 | * java\ 11 | * java\com\ 12 | * java\com\etsy\ 13 | * java\com\etsy\android\ 14 | * java\com\etsy\android\grid\ 15 | * java\com\etsy\android\grid\ClassLoaderSavedState.java 16 | * java\com\etsy\android\grid\ExtendableListView.java 17 | * java\com\etsy\android\grid\HeaderViewListAdapter.java 18 | * java\com\etsy\android\grid\StaggeredGridView.java 19 | * java\com\etsy\android\grid\util\ 20 | * java\com\etsy\android\grid\util\DynamicHeightImageView.java 21 | * java\com\etsy\android\grid\util\DynamicHeightTextView.java 22 | 23 | Replaced Jars with Dependencies: 24 | -------------------------------- 25 | The importer recognized the following .jar files as third party 26 | libraries and replaced them with Gradle dependencies instead. This has 27 | the advantage that more explicit version information is known, and the 28 | libraries can be updated automatically. However, it is possible that 29 | the .jar file in your project was of an older version than the 30 | dependency we picked, which could render the project not compileable. 31 | You can disable the jar replacement in the import wizard and try again: 32 | 33 | android-support-v4.jar => com.android.support:support-v4:18.+ 34 | 35 | Moved Files: 36 | ------------ 37 | Android Gradle projects use a different directory structure than ADT 38 | Eclipse projects. Here's how the projects were restructured: 39 | 40 | * AndroidManifest.xml => StaggeredGridView\src\main\AndroidManifest.xml 41 | * assets\ => StaggeredGridView\src\main\assets\ 42 | * res\ => StaggeredGridView\src\main\res\ 43 | * src\ => StaggeredGridView\src\main\java\ 44 | 45 | Missing Android Support Repository: 46 | ----------------------------------- 47 | Some useful libraries, such as the Android Support Library, are 48 | installed from a special Maven repository, which should be installed 49 | via the SDK manager. 50 | 51 | It looks like this library is missing from your SDK installation at: 52 | null 53 | 54 | To install it, open the SDK manager, and in the Extras category, 55 | select "Android Support Repository". You may also want to install the 56 | "Google Repository" if you want to use libraries like Google Play 57 | Services. 58 | 59 | Next Steps: 60 | ----------- 61 | You can now build the project. The Gradle project needs network 62 | connectivity to download dependencies. 63 | 64 | Bugs: 65 | ----- 66 | If for some reason your project does not build, and you determine that 67 | it is due to a bug or limitation of the Eclipse to Gradle importer, 68 | please file a bug at http://b.android.com with category 69 | Component-Tools. 70 | 71 | (This import summary is for your information only, and can be deleted 72 | after import once you are satisfied with the results.) 73 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #259b24 4 | #0a7e07 5 | @color/primary 6 | #212121 7 | #646464 8 | #f5f5f5 9 | #2f2725 10 | #f82c22 11 | #393c44 12 | #000000 13 | #3e3e39 14 | #9fa0a0 15 | #ffffff 16 | #f4f6f6 17 | #f4f6f6 18 | 19 | #b0000000 20 | #80000000 21 | #e0000000 22 | 23 | #ffa1a1a1 24 | #272a2e 25 | #9da0a4 26 | #4f9ef6 27 | #969696 28 | #00000000 29 | #eceff4 30 | #f0f2f5 31 | #489cfa 32 | #ed4e23 33 | #f82c22 34 | #898989 35 | #fcfcfc 36 | #3475be 37 | #489cfa 38 | #90489cfa 39 | #ffffff 40 | #50ff0000 41 | #90000000 42 | #50CACACA 43 | #ffffff 44 | #CACACA 45 | #CACACA 46 | #50CACACA 47 | #EBEBEB 48 | #313131 49 | #ffdddddd 50 | #FF0000 51 | #666666 52 | #493420 53 | #50ff0000 54 | #008ff1 55 | 56 | #3333b5e5 57 | #3399cc00 58 | #33ff4444 59 | #33ffbb33 60 | #33aa66cc 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/juzimi/ShowImageFragment.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.juzimi; 2 | 3 | 4 | import android.content.Context; 5 | import android.os.Bundle; 6 | import android.support.annotation.Nullable; 7 | import android.support.v4.app.Fragment; 8 | import android.support.v4.view.ViewCompat; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.widget.TextView; 13 | 14 | import com.squareup.picasso.Callback; 15 | import com.squareup.picasso.Picasso; 16 | import com.wuxiaolong.wewin.model.MainModel; 17 | import com.wuxiaolong.wewin.ui.BaseFragment; 18 | import com.xiaomolongstudio.wewin.R; 19 | 20 | import butterknife.BindView; 21 | import uk.co.senab.photoview.PhotoView; 22 | 23 | public class ShowImageFragment extends BaseFragment { 24 | 25 | private MainModel mMainModel; 26 | private ShowImageActivity mActivity; 27 | @BindView(R.id.imageView) 28 | PhotoView mPhotoView; 29 | 30 | public static Fragment newFragment(MainModel mainModel, int position) { 31 | Bundle bundle = new Bundle(); 32 | bundle.putSerializable("mainList", mainModel); 33 | bundle.putInt("position", position); 34 | ShowImageFragment fragment = new ShowImageFragment(); 35 | fragment.setArguments(bundle); 36 | return fragment; 37 | } 38 | 39 | @Override 40 | public void onAttach(Context context) { 41 | super.onAttach(context); 42 | this.mActivity = (ShowImageActivity) context; 43 | 44 | } 45 | 46 | @Override 47 | public void onCreate(@Nullable Bundle savedInstanceState) { 48 | super.onCreate(savedInstanceState); 49 | mMainModel = (MainModel) this.getArguments().getSerializable("mainList"); 50 | } 51 | 52 | @Override 53 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 54 | Bundle savedInstanceState) { 55 | // Inflate the layout for this fragment 56 | return inflater.inflate(R.layout.fragment_show_image, container, false); 57 | } 58 | 59 | @Override 60 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 61 | super.onViewCreated(view, savedInstanceState); 62 | final String imageUrl = mMainModel.getIamgeUrl(); 63 | final TextView introduction = (TextView) view.findViewById(R.id.introduction); 64 | introduction.setText(mMainModel.getTitle()); 65 | ViewCompat.setTransitionName(mPhotoView, imageUrl); 66 | Picasso.with(getActivity()).load(imageUrl) 67 | .into(mPhotoView, new Callback() { 68 | @Override 69 | public void onSuccess() { 70 | } 71 | 72 | @Override 73 | public void onError() { 74 | } 75 | }); 76 | } 77 | 78 | 79 | @Override 80 | public void onResume() { 81 | super.onResume(); 82 | Picasso.with(mActivity) 83 | .load(mMainModel.getIamgeUrl()) 84 | .into(mPhotoView); 85 | } 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/tngougirl/TngouGirlDetailActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.tngougirl; 2 | 3 | import android.os.Build; 4 | import android.os.Bundle; 5 | import android.support.v4.app.ActivityCompat; 6 | import android.support.v4.app.Fragment; 7 | import android.support.v4.app.FragmentStatePagerAdapter; 8 | import android.support.v4.view.ViewPager; 9 | 10 | import com.wuxiaolong.wewin.model.TngouGirlDetailModel; 11 | import com.wuxiaolong.wewin.retrofit.RetrofitCallback; 12 | import com.wuxiaolong.wewin.ui.BaseActivity; 13 | import com.wuxiaolong.wewin.utils.AppConstants; 14 | import com.xiaomolongstudio.wewin.R; 15 | 16 | import java.util.List; 17 | 18 | import butterknife.BindView; 19 | import butterknife.ButterKnife; 20 | import retrofit2.Call; 21 | 22 | public class TngouGirlDetailActivity extends BaseActivity { 23 | 24 | @BindView(R.id.viewPager) 25 | ViewPager viewPager; 26 | private List tngouGirlDetailList; 27 | private int id; 28 | 29 | @Override 30 | protected void onCreate(Bundle savedInstanceState) { 31 | super.onCreate(savedInstanceState); 32 | setContentView(R.layout.activity_tngou_girl_detail); 33 | ButterKnife.bind(this); 34 | id = this.getIntent().getIntExtra(AppConstants.ID, 0); 35 | setStatusBarColor(); 36 | loadData(); 37 | 38 | } 39 | 40 | 41 | public void setStatusBarColor() { 42 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 43 | getWindow().setStatusBarColor(ActivityCompat.getColor(mActivity, R.color.color_black)); 44 | } 45 | } 46 | 47 | private void loadData() { 48 | Call call = apiStores.loadTngouGirlDetail(id); 49 | call.enqueue(new RetrofitCallback() { 50 | @Override 51 | public void onSuccess(TngouGirlDetailModel model) { 52 | if (model.isStatus()) { 53 | tngouGirlDetailList = model.getList(); 54 | // initToolbar(model.getTitle()); 55 | viewPager.setAdapter(new FragmentPagerAdapter()); 56 | } 57 | 58 | } 59 | 60 | @Override 61 | public void onFailure(int code, String msg) { 62 | toastShow(msg); 63 | } 64 | 65 | @Override 66 | public void onThrowable(Throwable t) { 67 | toastShow(t.getMessage()); 68 | } 69 | 70 | @Override 71 | public void onFinish() { 72 | } 73 | }); 74 | addCalls(call); 75 | } 76 | 77 | private class FragmentPagerAdapter extends FragmentStatePagerAdapter { 78 | 79 | public FragmentPagerAdapter() { 80 | super(getSupportFragmentManager()); 81 | } 82 | 83 | @Override 84 | public int getCount() { 85 | return tngouGirlDetailList.size(); 86 | } 87 | 88 | @Override 89 | public Fragment getItem(int position) { 90 | return TngouGirlDetailFragment.newFragment(tngouGirlDetailList.get(position).getSrc()); 91 | } 92 | 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/tngounews/TngouNewsDetailActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.tngounews; 2 | 3 | import android.os.Bundle; 4 | import android.support.v4.widget.SwipeRefreshLayout; 5 | import android.webkit.WebView; 6 | import android.widget.TextView; 7 | 8 | import com.wuxiaolong.androidutils.library.TimeUtil; 9 | import com.wuxiaolong.wewin.model.TngouNewsDetailModel; 10 | import com.wuxiaolong.wewin.retrofit.RetrofitCallback; 11 | import com.wuxiaolong.wewin.ui.BaseActivity; 12 | import com.wuxiaolong.wewin.utils.AppConstants; 13 | import com.xiaomolongstudio.wewin.R; 14 | 15 | import butterknife.BindView; 16 | import butterknife.ButterKnife; 17 | import retrofit2.Call; 18 | 19 | public class TngouNewsDetailActivity extends BaseActivity { 20 | 21 | @BindView(R.id.time) 22 | TextView time; 23 | @BindView(R.id.title) 24 | TextView title; 25 | @BindView(R.id.message) 26 | TextView message; 27 | @BindView(R.id.swipeRefreshLayout) 28 | SwipeRefreshLayout swipeRefreshLayout; 29 | @BindView(R.id.webview) 30 | WebView webview; 31 | private int id; 32 | TngouNewsDetailModel tngouNewsDetailModel; 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.activity_tngou_news_detail); 38 | ButterKnife.bind(this); 39 | id = this.getIntent().getIntExtra(AppConstants.ID, 0); 40 | setRefreshing(true); 41 | loadData(); 42 | } 43 | 44 | private void setRefreshing(final boolean refreshing) { 45 | swipeRefreshLayout.post(new Runnable() { 46 | @Override 47 | public void run() { 48 | swipeRefreshLayout.setRefreshing(refreshing); 49 | } 50 | }); 51 | } 52 | 53 | private void loadData() { 54 | Call call = apiStores.loadTngouNewsDetail(id); 55 | call.enqueue(new RetrofitCallback() { 56 | @Override 57 | public void onSuccess(TngouNewsDetailModel model) { 58 | if (model.isStatus()) { 59 | tngouNewsDetailModel = model; 60 | initToolbar(model.getTitle()); 61 | title.setText(model.getTitle()); 62 | time.setText(TimeUtil.unixTimestamp2BeijingTime(model.getTime(), "yyyy-MM-dd HH:mm:ss")); 63 | // message.setText(Html.fromHtml(model.getMessage())); 64 | webview.loadData(model.getMessage(), "text/html; charset=UTF-8", null); 65 | } 66 | 67 | } 68 | 69 | @Override 70 | public void onFailure(int code, String msg) { 71 | toastShow(msg); 72 | } 73 | 74 | @Override 75 | public void onThrowable(Throwable t) { 76 | toastShow(t.getMessage()); 77 | } 78 | 79 | @Override 80 | public void onFinish() { 81 | setRefreshing(false); 82 | swipeRefreshLayout.setEnabled(false); 83 | } 84 | }); 85 | addCalls(call); 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/juzimi/ShowImageActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.juzimi; 2 | 3 | import android.os.Build; 4 | import android.os.Bundle; 5 | import android.support.v4.app.Fragment; 6 | import android.support.v4.app.FragmentStatePagerAdapter; 7 | import android.support.v4.view.ViewPager; 8 | import android.view.View; 9 | import android.view.Window; 10 | 11 | import com.wuxiaolong.wewin.model.MainModel; 12 | import com.wuxiaolong.wewin.ui.BaseActivity; 13 | import com.xiaomolongstudio.wewin.R; 14 | 15 | import java.util.List; 16 | 17 | import butterknife.BindView; 18 | import butterknife.ButterKnife; 19 | 20 | public class ShowImageActivity extends BaseActivity { 21 | private List mMainList; 22 | @BindView(R.id.viewPager) 23 | ViewPager mViewPager; 24 | private int position; 25 | private int color; 26 | 27 | 28 | @Override 29 | protected void onCreate(Bundle savedInstanceState) { 30 | getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS); 31 | super.onCreate(savedInstanceState); 32 | setContentView(R.layout.activity_show_image); 33 | ButterKnife.bind(this); 34 | mMainList = (List) this.getIntent().getSerializableExtra("mainList"); 35 | position = this.getIntent().getIntExtra("position", 0); 36 | color = this.getIntent().getIntExtra("color", getResources().getColor(R.color.red)); 37 | setStatusBarColor(color); 38 | mViewPager.setPageTransformer(true, new CardTransformer(0.8f)); 39 | mViewPager.setAdapter(new FragmentPagerAdapter()); 40 | mViewPager.setCurrentItem(position); 41 | } 42 | 43 | public void setStatusBarColor(int statusBarColor) { 44 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 45 | getWindow().setStatusBarColor(statusBarColor); 46 | } 47 | } 48 | 49 | /** 50 | * Awesome Launcher-inspired page transformer 51 | */ 52 | private static class CardTransformer implements ViewPager.PageTransformer { 53 | 54 | private final float scaleAmount; 55 | 56 | public CardTransformer(float scalingStart) { 57 | scaleAmount = 1 - scalingStart; 58 | } 59 | 60 | @Override 61 | public void transformPage(View page, float position) { 62 | if (position >= 0f) { 63 | final int w = page.getWidth(); 64 | float scaleFactor = 1 - scaleAmount * position; 65 | 66 | page.setAlpha(1f - position); 67 | page.setScaleX(scaleFactor); 68 | page.setScaleY(scaleFactor); 69 | page.setTranslationX(w * (1 - position) - w); 70 | } 71 | } 72 | 73 | } 74 | 75 | private class FragmentPagerAdapter extends FragmentStatePagerAdapter { 76 | 77 | public FragmentPagerAdapter() { 78 | super(getSupportFragmentManager()); 79 | } 80 | 81 | @Override 82 | public int getCount() { 83 | return mMainList.size(); 84 | } 85 | 86 | @Override 87 | public Fragment getItem(int position) { 88 | return ShowImageFragment.newFragment(mMainList.get(position), position); 89 | } 90 | 91 | } 92 | 93 | 94 | } 95 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 31 | 34 | 35 | 39 | 40 | 45 | 46 | 51 | 52 | 57 | 58 | 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/MainNewActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.design.widget.NavigationView; 6 | import android.support.v4.app.Fragment; 7 | import android.support.v4.app.FragmentTransaction; 8 | import android.support.v4.view.GravityCompat; 9 | import android.support.v4.widget.DrawerLayout; 10 | import android.support.v7.app.ActionBarDrawerToggle; 11 | import android.support.v7.widget.Toolbar; 12 | import android.view.MenuItem; 13 | import android.widget.Toast; 14 | 15 | import com.wuxiaolong.wewin.ui.myblog.MyBlogFragment; 16 | import com.wuxiaolong.wewin.ui.set.SetActivity; 17 | import com.wuxiaolong.wewin.ui.tngougirl.TngouGirlFragment; 18 | import com.wuxiaolong.wewin.ui.tngounews.TngouNewsFragment; 19 | import com.xiaomolongstudio.wewin.R; 20 | 21 | import butterknife.BindView; 22 | import butterknife.ButterKnife; 23 | 24 | /** 25 | * 首页,侧滑菜单 26 | * 作者:吴小龙同學 27 | * github:https://github.com/WuXiaolong 28 | * 微信公众号:吴小龙同学 29 | */ 30 | public class MainNewActivity extends BaseActivity implements NavigationView.OnNavigationItemSelectedListener { 31 | 32 | @BindView(R.id.nav_view) 33 | NavigationView navView; 34 | @BindView(R.id.drawer_layout) 35 | DrawerLayout drawerLayout; 36 | 37 | @Override 38 | protected void onCreate(Bundle savedInstanceState) { 39 | super.onCreate(savedInstanceState); 40 | setContentView(R.layout.activity_main_new); 41 | ButterKnife.bind(this); 42 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 43 | setSupportActionBar(toolbar); 44 | 45 | 46 | ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( 47 | this, drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); 48 | drawerLayout.addDrawerListener(toggle); 49 | toggle.syncState(); 50 | 51 | navView.setNavigationItemSelectedListener(this); 52 | setTitle(getString(R.string.tngou_news)); 53 | switchFragment(new TngouNewsFragment()); 54 | } 55 | 56 | private long exitTime = 0; 57 | 58 | @Override 59 | public void onBackPressed() { 60 | if (drawerLayout.isDrawerOpen(GravityCompat.START)) { 61 | drawerLayout.closeDrawer(GravityCompat.START); 62 | } else { 63 | if (System.currentTimeMillis() - exitTime > 2000) { 64 | Toast.makeText(getApplicationContext(), R.string.exit_text, Toast.LENGTH_SHORT).show(); 65 | exitTime = System.currentTimeMillis(); 66 | } else { 67 | super.onBackPressed(); 68 | } 69 | } 70 | } 71 | 72 | 73 | @Override 74 | public boolean onNavigationItemSelected(MenuItem item) { 75 | // Handle navigation view item clicks here. 76 | int id = item.getItemId(); 77 | if (id == R.id.nav_tngou_girl) { 78 | switchFragment(new TngouGirlFragment()); 79 | } else if (id == R.id.nav_my_blog) { 80 | switchFragment(new MyBlogFragment()); 81 | } else if (id == R.id.nav_tngou_news) { 82 | switchFragment(new TngouNewsFragment()); 83 | } else if (id == R.id.nav_set) { 84 | startActivity(new Intent(mActivity, SetActivity.class)); 85 | return true; 86 | } 87 | setTitle(item.getTitle()); 88 | drawerLayout.closeDrawer(GravityCompat.START); 89 | return true; 90 | } 91 | 92 | /** 93 | * 切换Fragment 94 | */ 95 | 96 | public void switchFragment(Fragment newFragment) { 97 | FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); 98 | fragmentTransaction.replace(R.id.content_frame, newFragment).commit(); 99 | } 100 | 101 | 102 | } 103 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/model/TngouNewsModel.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.model; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by Administrator 7 | * on 2016/11/3. 8 | */ 9 | 10 | public class TngouNewsModel extends BaseModel { 11 | 12 | /** 13 | * count : 0 14 | * description : 一位开着手动挡的驾驶员说:“三秒钟完成挂挡、加油、提速的过程,正好可以锻炼技术,飙车通过,如果前面有排队的话,就悲催了 15 | * fcount : 0 16 | * fromname : 中华网 17 | * fromurl : http://news.china.com/socialgd/10000169/20161103/23844026.html 18 | * id : 14055 19 | * img : /top/161103/6fa28c1ab23f389df788ec56a46d21c3.jpg 20 | * keywords : 最短红绿灯3秒钟 21 | * rcount : 0 22 | * time : 1478141413000 23 | * title : 最短红绿灯只有3秒钟 飙车才可以通过(图) 24 | * topclass : 0 25 | */ 26 | 27 | private List tngou; 28 | 29 | public List getTngou() { 30 | return tngou; 31 | } 32 | 33 | public void setTngou(List tngou) { 34 | this.tngou = tngou; 35 | } 36 | 37 | public static class TngouBean { 38 | private int count; 39 | private String description; 40 | private int fcount; 41 | private String fromname; 42 | private String fromurl; 43 | private int id; 44 | private String img; 45 | private String keywords; 46 | private int rcount; 47 | private long time; 48 | private String title; 49 | private int topclass; 50 | 51 | public int getCount() { 52 | return count; 53 | } 54 | 55 | public void setCount(int count) { 56 | this.count = count; 57 | } 58 | 59 | public String getDescription() { 60 | return description; 61 | } 62 | 63 | public void setDescription(String description) { 64 | this.description = description; 65 | } 66 | 67 | public int getFcount() { 68 | return fcount; 69 | } 70 | 71 | public void setFcount(int fcount) { 72 | this.fcount = fcount; 73 | } 74 | 75 | public String getFromname() { 76 | return fromname; 77 | } 78 | 79 | public void setFromname(String fromname) { 80 | this.fromname = fromname; 81 | } 82 | 83 | public String getFromurl() { 84 | return fromurl; 85 | } 86 | 87 | public void setFromurl(String fromurl) { 88 | this.fromurl = fromurl; 89 | } 90 | 91 | public int getId() { 92 | return id; 93 | } 94 | 95 | public void setId(int id) { 96 | this.id = id; 97 | } 98 | 99 | public String getImg() { 100 | return img; 101 | } 102 | 103 | public void setImg(String img) { 104 | this.img = img; 105 | } 106 | 107 | public String getKeywords() { 108 | return keywords; 109 | } 110 | 111 | public void setKeywords(String keywords) { 112 | this.keywords = keywords; 113 | } 114 | 115 | public int getRcount() { 116 | return rcount; 117 | } 118 | 119 | public void setRcount(int rcount) { 120 | this.rcount = rcount; 121 | } 122 | 123 | public long getTime() { 124 | return time; 125 | } 126 | 127 | public void setTime(long time) { 128 | this.time = time; 129 | } 130 | 131 | public String getTitle() { 132 | return title; 133 | } 134 | 135 | public void setTitle(String title) { 136 | this.title = title; 137 | } 138 | 139 | public int getTopclass() { 140 | return topclass; 141 | } 142 | 143 | public void setTopclass(int topclass) { 144 | this.topclass = topclass; 145 | } 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/WebViewActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui; 2 | 3 | import android.graphics.Bitmap; 4 | import android.os.Bundle; 5 | import android.text.TextUtils; 6 | import android.view.KeyEvent; 7 | import android.view.View; 8 | import android.webkit.WebResourceError; 9 | import android.webkit.WebResourceRequest; 10 | import android.webkit.WebResourceResponse; 11 | import android.webkit.WebSettings; 12 | import android.webkit.WebView; 13 | import android.webkit.WebViewClient; 14 | 15 | import com.wuxiaolong.androidutils.library.LogUtil; 16 | import com.wuxiaolong.wewin.utils.AppConstants; 17 | import com.xiaomolongstudio.wewin.R; 18 | 19 | import butterknife.BindView; 20 | import butterknife.ButterKnife; 21 | 22 | public class WebViewActivity extends BaseActivity { 23 | private String webviewTitle; 24 | private String webviewUrl; 25 | private String webviewUrlData; 26 | @BindView(R.id.webview) 27 | WebView webview; 28 | 29 | @Override 30 | protected void onCreate(Bundle savedInstanceState) { 31 | super.onCreate(savedInstanceState); 32 | setContentView(R.layout.activity_web_view); 33 | ButterKnife.bind(this); 34 | webviewTitle = this.getIntent().getStringExtra(AppConstants.WEBVIEW_TITLE); 35 | webviewUrl = this.getIntent().getStringExtra(AppConstants.WEBVIEW_URL); 36 | webviewUrlData = this.getIntent().getStringExtra(AppConstants.WEBVIEW_URL_DATA); 37 | initToolbar(webviewTitle); 38 | if (!TextUtils.isEmpty(webviewUrl)) { 39 | webview.loadUrl(webviewUrl); 40 | } 41 | if (!TextUtils.isEmpty(webviewUrlData)) { 42 | webview.loadData(webviewUrlData, "text/html; charset=UTF-8", null); 43 | } 44 | LogUtil.d("webviewUrl=" + webviewUrl); 45 | WebSettings webSettings = webview.getSettings(); 46 | webSettings.setJavaScriptEnabled(true); 47 | webview.setWebViewClient( 48 | new WebViewClient() { 49 | 50 | @Override 51 | public void onPageStarted(WebView view, String url, Bitmap favicon) { 52 | super.onPageStarted(view, url, favicon); 53 | } 54 | 55 | @Override 56 | public void onPageFinished(WebView view, String url) { 57 | super.onPageFinished(view, url); 58 | LogUtil.d("onPageFinished="); 59 | } 60 | 61 | @Override 62 | public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) { 63 | super.onReceivedHttpError(view, request, errorResponse); 64 | LogUtil.d("onReceivedHttpError"); 65 | } 66 | 67 | @Override 68 | public boolean shouldOverrideUrlLoading(WebView view, String url) { 69 | webview.setVisibility(View.VISIBLE); 70 | LogUtil.d("shouldOverrideUrlLoading"); 71 | // view.loadUrl(url); 72 | // return super.shouldOverrideUrlLoading(view, url); 73 | return true; 74 | } 75 | 76 | @Override 77 | public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { 78 | // Handle the error 79 | LogUtil.d("onReceivedError errorCode=" + errorCode); 80 | webview.setVisibility(View.GONE); 81 | 82 | } 83 | 84 | @Override 85 | public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) { 86 | super.onReceivedError(view, request, error); 87 | //表示此方法无效 88 | } 89 | } 90 | ); 91 | } 92 | 93 | public boolean onKeyDown(int keyCode, KeyEvent event) { 94 | if ((KeyEvent.KEYCODE_BACK == keyCode) && webview.canGoBack()) { 95 | webview.goBack(); 96 | return true; 97 | } 98 | return super.onKeyDown(keyCode, event); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /app/src/main/res/layout/aboutus.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 16 | 17 | 21 | 22 | 29 | 30 | 37 | 38 | 46 | 47 | 55 | 56 | 57 | 62 | 63 | 68 | 69 | 77 | 78 | 86 | 87 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/set/SetActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.set; 2 | 3 | import android.app.AlertDialog.Builder; 4 | import android.content.DialogInterface; 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.text.Html; 8 | import android.view.Menu; 9 | import android.view.MenuItem; 10 | import android.view.View; 11 | import android.view.View.OnClickListener; 12 | 13 | import com.wuxiaolong.wewin.ui.BaseActivity; 14 | import com.wuxiaolong.wewin.ui.MainActivity; 15 | import com.wuxiaolong.wewin.ui.WorksShowActivity; 16 | import com.wuxiaolong.wewin.utils.AppUtils; 17 | import com.xiaomolongstudio.wewin.R; 18 | 19 | /** 20 | * 设置 21 | */ 22 | public class SetActivity extends BaseActivity implements OnClickListener { 23 | 24 | protected void onCreate(Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | setContentView(R.layout.activity_set); 27 | initToolbar(getString(R.string.set)); 28 | initView(); 29 | } 30 | 31 | private void initView() { 32 | findViewById(R.id.recommend).setOnClickListener(this); 33 | findViewById(R.id.good).setOnClickListener(this); 34 | findViewById(R.id.sign_out).setOnClickListener(this); 35 | findViewById(R.id.works_show).setOnClickListener(this); 36 | findViewById(R.id.sponsored_author).setOnClickListener(this); 37 | findViewById(R.id.aboutus).setOnClickListener(this); 38 | findViewById(R.id.circle).setOnClickListener(this); 39 | } 40 | 41 | @Override 42 | public void onClick(View v) { 43 | Builder builder = new Builder(SetActivity.this); 44 | switch (v.getId()) { 45 | case R.id.good: 46 | AppUtils.marketDownload(SetActivity.this, "com.xiaomolongstudio.wewin"); 47 | 48 | break; 49 | case R.id.recommend: 50 | String shareContent = SetActivity.this.getResources().getString( 51 | R.string.share_content); 52 | Intent intent = new Intent(Intent.ACTION_SEND); // 启动分享发送的属性 53 | intent.setType("text/plain"); // 分享发送的数据类型 54 | intent.putExtra(Intent.EXTRA_TEXT, shareContent); // 分享的内容 55 | startActivity(Intent.createChooser(intent, "选择分享"));// 目标应用选择对话框的标题 56 | break; 57 | case R.id.aboutus: 58 | 59 | startActivity(new Intent(SetActivity.this, AboutUsActivity.class)); 60 | 61 | break; 62 | case R.id.works_show: 63 | 64 | startActivity(new Intent(SetActivity.this, WorksShowActivity.class)); 65 | 66 | break; 67 | case R.id.circle: 68 | 69 | startActivity(new Intent(SetActivity.this, CircleActivity.class)); 70 | 71 | break; 72 | case R.id.sponsored_author: 73 | 74 | builder.setMessage(Html 75 | .fromHtml("好的产品需要更多的赞助,来奉献您的一份力量。开发者支付宝账号:1413129987@qq.com,作者在此谢过。")); 76 | builder.setTitle("邀请赞助"); 77 | builder.setPositiveButton("确认", 78 | new DialogInterface.OnClickListener() { 79 | @Override 80 | public void onClick(DialogInterface dialog, int which) { 81 | 82 | dialog.dismiss(); 83 | } 84 | }); 85 | builder.create().show(); 86 | 87 | break; 88 | 89 | default: 90 | break; 91 | } 92 | 93 | } 94 | 95 | @Override 96 | public boolean onCreateOptionsMenu(Menu menu) { 97 | // Inflate the menu; this adds items to the action bar if it is present. 98 | getMenuInflater().inflate(R.menu.set, menu); 99 | return true; 100 | } 101 | 102 | @Override 103 | public boolean onOptionsItemSelected(MenuItem item) { 104 | // Handle action bar item clicks here. The action bar will 105 | // automatically handle clicks on the Home/Up button, so long 106 | // as you specify a parent activity in AndroidManifest.xml. 107 | int id = item.getItemId(); 108 | if (id == R.id.action_old) { 109 | startActivity(new Intent(mActivity, MainActivity.class)); 110 | return true; 111 | } 112 | return super.onOptionsItemSelected(item); 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/model/TngouNewsDetailModel.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.model; 2 | 3 | /** 4 | * Created by Administrator 5 | * on 2016/11/3. 6 | */ 7 | 8 | public class TngouNewsDetailModel extends BaseModel { 9 | 10 | /** 11 | * count : 675 12 | * description : 原标题:【图】广东高速公路收费调整哪些车涨价哪些车降价据悉由于广东省高速公路6月底前将接入全国ETC联网,因此6月底起高速收费将要调整 13 | * fcount : 0 14 | * fromname : 人们政协网 15 | * fromurl : http://www.rmzxb.com.cn/sqmy/nywy/2015/06/11/515590.shtml 16 | * id : 100 17 | * img : /top/default.jpg 18 | * keywords : 广东高速收费将调整 19 | * message :

20 |

  原标题:【图】广东高速公路收费调整 哪些车涨价哪些车降价

21 |

  据悉由于广东省高速公路6月底前将接入全国ETC联网,因此6月底起高速收费将要调整。那么届时哪些车收费降价,哪些车收费升价?

22 |

 

23 |

1

24 |

 

25 |

  伊秀新闻讯,6月11日,广东高速公路收费调整哪些车涨价哪些车降价。据悉由于广东省高速公路6月底前将接入全国ETC联网,因此6月底起高速收费将要调整。那么届时哪些车收费降价,哪些车收费升价?

26 |

  据悉届时大部分小车的通行费不变,但也有一部分车自费调整。上升的有:车头高度小于1.3米,座位数大于或等于8的小轿车由原一类车上升为二类;40座及以上的大型客车由原三类车上升为四类。但是上调为四类车的40座以上大型客车实施降档收费,即按三类车收费。

27 |

  下调的有:车头高度大于或等于1.3米的,但座位数小于7座的面包车和小型客车由原二类车下调为一类,单车收费额下降1/3;2轴6轮,10座及以上、19座以下的中型客车,19座大型客车由原三类车下调为二类,单车收费额下降1/4.而货车全部计重收费,总体降价1.7%.一些网友表示,这次降价调整不痛不痒,并没有想象中那么强大啊。而大部分网友还是表示支持,有得降一点就不错了,还想怎么样?

28 |

 

29 | * rcount : 0 30 | * time : 1434002582000 31 | * title : 【图】广东高速公路收费调整 哪些车涨价哪些车降价 32 | * topclass : 1 33 | * url : http://www.tngou.net/top/show/100 34 | */ 35 | 36 | private int count; 37 | private String description; 38 | private int fcount; 39 | private String fromname; 40 | private String fromurl; 41 | private int id; 42 | private String img; 43 | private String keywords; 44 | private String message; 45 | private int rcount; 46 | private long time; 47 | private String title; 48 | private int topclass; 49 | private String url; 50 | 51 | public int getCount() { 52 | return count; 53 | } 54 | 55 | public void setCount(int count) { 56 | this.count = count; 57 | } 58 | 59 | public String getDescription() { 60 | return description; 61 | } 62 | 63 | public void setDescription(String description) { 64 | this.description = description; 65 | } 66 | 67 | public int getFcount() { 68 | return fcount; 69 | } 70 | 71 | public void setFcount(int fcount) { 72 | this.fcount = fcount; 73 | } 74 | 75 | public String getFromname() { 76 | return fromname; 77 | } 78 | 79 | public void setFromname(String fromname) { 80 | this.fromname = fromname; 81 | } 82 | 83 | public String getFromurl() { 84 | return fromurl; 85 | } 86 | 87 | public void setFromurl(String fromurl) { 88 | this.fromurl = fromurl; 89 | } 90 | 91 | public int getId() { 92 | return id; 93 | } 94 | 95 | public void setId(int id) { 96 | this.id = id; 97 | } 98 | 99 | public String getImg() { 100 | return img; 101 | } 102 | 103 | public void setImg(String img) { 104 | this.img = img; 105 | } 106 | 107 | public String getKeywords() { 108 | return keywords; 109 | } 110 | 111 | public void setKeywords(String keywords) { 112 | this.keywords = keywords; 113 | } 114 | 115 | public String getMessage() { 116 | return message; 117 | } 118 | 119 | public void setMessage(String message) { 120 | this.message = message; 121 | } 122 | 123 | public int getRcount() { 124 | return rcount; 125 | } 126 | 127 | public void setRcount(int rcount) { 128 | this.rcount = rcount; 129 | } 130 | 131 | public long getTime() { 132 | return time; 133 | } 134 | 135 | public void setTime(long time) { 136 | this.time = time; 137 | } 138 | 139 | public String getTitle() { 140 | return title; 141 | } 142 | 143 | public void setTitle(String title) { 144 | this.title = title; 145 | } 146 | 147 | public int getTopclass() { 148 | return topclass; 149 | } 150 | 151 | public void setTopclass(int topclass) { 152 | this.topclass = topclass; 153 | } 154 | 155 | public String getUrl() { 156 | return url; 157 | } 158 | 159 | public void setUrl(String url) { 160 | this.url = url; 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/model/TngouGirlDetailModel.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.model; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by Administrator 7 | * on 2016/11/3. 8 | */ 9 | 10 | public class TngouGirlDetailModel { 11 | 12 | /** 13 | * count : 213 14 | * fcount : 0 15 | * galleryclass : 3 16 | * id : 997 17 | * img : /ext/161031/8e4063576efa51e1f92f444b0a322ac5.jpg 18 | * list : [{"gallery":997,"id":15250,"src":"/ext/161031/8e4063576efa51e1f92f444b0a322ac5.jpg"},{"gallery":997,"id":15251,"src":"/ext/161031/70ae430dcabc05cdb34f40bf63a77a3b.jpg"},{"gallery":997,"id":15252,"src":"/ext/161031/88b628f6f0c2efd98877f82bbd353e0c.jpg"},{"gallery":997,"id":15253,"src":"/ext/161031/46b707cbf09e3ae45eece2f1e722e5b0.jpg"},{"gallery":997,"id":15254,"src":"/ext/161031/c6c20d437fe8d403989b6cfee3b5d76f.jpg"},{"gallery":997,"id":15255,"src":"/ext/161031/f8a01d2669362e95827be280fb98ff50.jpg"},{"gallery":997,"id":15256,"src":"/ext/161031/39be3cc4a4a0f3d855a8f16500551416.jpg"},{"gallery":997,"id":15257,"src":"/ext/161031/4d721ec6ee136c47a3ab1517a4a643c6.jpg"},{"gallery":997,"id":15258,"src":"/ext/161031/6d594960e51e93895d6f21c091e4d328.jpg"},{"gallery":997,"id":15259,"src":"/ext/161031/1038b2200b02d094a2b8c4441a031c20.jpg"}] 19 | * rcount : 0 20 | * size : 10 21 | * status : true 22 | * time : 1477919562000 23 | * title : beautyleg红艳国韵旗袍美女性感高清美腿 24 | * url : http://www.tngou.net/tnfs/show/997 25 | */ 26 | 27 | private int count; 28 | private int fcount; 29 | private int galleryclass; 30 | private int id; 31 | private String img; 32 | private int rcount; 33 | private int size; 34 | private boolean status; 35 | private long time; 36 | private String title; 37 | private String url; 38 | /** 39 | * gallery : 997 40 | * id : 15250 41 | * src : /ext/161031/8e4063576efa51e1f92f444b0a322ac5.jpg 42 | */ 43 | 44 | private List list; 45 | 46 | public int getCount() { 47 | return count; 48 | } 49 | 50 | public void setCount(int count) { 51 | this.count = count; 52 | } 53 | 54 | public int getFcount() { 55 | return fcount; 56 | } 57 | 58 | public void setFcount(int fcount) { 59 | this.fcount = fcount; 60 | } 61 | 62 | public int getGalleryclass() { 63 | return galleryclass; 64 | } 65 | 66 | public void setGalleryclass(int galleryclass) { 67 | this.galleryclass = galleryclass; 68 | } 69 | 70 | public int getId() { 71 | return id; 72 | } 73 | 74 | public void setId(int id) { 75 | this.id = id; 76 | } 77 | 78 | public String getImg() { 79 | return img; 80 | } 81 | 82 | public void setImg(String img) { 83 | this.img = img; 84 | } 85 | 86 | public int getRcount() { 87 | return rcount; 88 | } 89 | 90 | public void setRcount(int rcount) { 91 | this.rcount = rcount; 92 | } 93 | 94 | public int getSize() { 95 | return size; 96 | } 97 | 98 | public void setSize(int size) { 99 | this.size = size; 100 | } 101 | 102 | public boolean isStatus() { 103 | return status; 104 | } 105 | 106 | public void setStatus(boolean status) { 107 | this.status = status; 108 | } 109 | 110 | public long getTime() { 111 | return time; 112 | } 113 | 114 | public void setTime(long time) { 115 | this.time = time; 116 | } 117 | 118 | public String getTitle() { 119 | return title; 120 | } 121 | 122 | public void setTitle(String title) { 123 | this.title = title; 124 | } 125 | 126 | public String getUrl() { 127 | return url; 128 | } 129 | 130 | public void setUrl(String url) { 131 | this.url = url; 132 | } 133 | 134 | public List getList() { 135 | return list; 136 | } 137 | 138 | public void setList(List list) { 139 | this.list = list; 140 | } 141 | 142 | public static class ListBean { 143 | private int gallery; 144 | private int id; 145 | private String src; 146 | 147 | public int getGallery() { 148 | return gallery; 149 | } 150 | 151 | public void setGallery(int gallery) { 152 | this.gallery = gallery; 153 | } 154 | 155 | public int getId() { 156 | return id; 157 | } 158 | 159 | public void setId(int id) { 160 | this.id = id; 161 | } 162 | 163 | public String getSrc() { 164 | return src; 165 | } 166 | 167 | public void setSrc(String src) { 168 | this.src = src; 169 | } 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 43 | 44 | 47 | 48 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 63 | 66 | 70 | 74 | 78 | 83 | 84 | 87 | 88 | 91 | 92 | 93 | 94 | 97 | 98 | 101 | 102 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.support.annotation.Nullable; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.support.v7.widget.Toolbar; 8 | import android.view.MenuItem; 9 | import android.widget.TextView; 10 | import android.widget.Toast; 11 | 12 | import com.umeng.analytics.MobclickAgent; 13 | import com.wuxiaolong.wewin.retrofit.ApiStores; 14 | import com.wuxiaolong.wewin.retrofit.AppClient; 15 | import com.xiaomolongstudio.wewin.R; 16 | 17 | import java.util.ArrayList; 18 | import java.util.List; 19 | 20 | import retrofit2.Call; 21 | 22 | 23 | public class BaseActivity extends AppCompatActivity { 24 | 25 | private List calls; 26 | public ApiStores apiStores = AppClient.retrofit().create(ApiStores.class); 27 | public Activity mActivity; 28 | 29 | @Override 30 | protected void onCreate(@Nullable Bundle savedInstanceState) { 31 | super.onCreate(savedInstanceState); 32 | setContentView(R.layout.activity_base); 33 | mActivity = this; 34 | } 35 | 36 | public Toolbar initToolbarAsHome(CharSequence title) { 37 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 38 | TextView mTitleView = (TextView) toolbar.findViewById(R.id.toolbar_title); 39 | mTitleView.setText(title); 40 | setSupportActionBar(toolbar); 41 | android.support.v7.app.ActionBar actionBar = getSupportActionBar(); 42 | if (actionBar != null) { 43 | actionBar.setDisplayHomeAsUpEnabled(false); 44 | actionBar.setDisplayShowTitleEnabled(false); 45 | 46 | } 47 | return toolbar; 48 | } 49 | 50 | public Toolbar initToolbar(CharSequence title) { 51 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 52 | // toolbar.setTitle(title); 53 | TextView mTitleView = (TextView) toolbar.findViewById(R.id.toolbar_title); 54 | mTitleView.setText(title); 55 | // toolbar.setTitleTextColor(getResources().getColor(R.color.white)); 56 | setSupportActionBar(toolbar); 57 | android.support.v7.app.ActionBar actionBar = getSupportActionBar(); 58 | if (actionBar != null) { 59 | actionBar.setDisplayHomeAsUpEnabled(true); 60 | actionBar.setDisplayShowTitleEnabled(false); 61 | } 62 | return toolbar; 63 | } 64 | 65 | public Toolbar initToolbar(int title) { 66 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 67 | toolbar.setTitle(title); 68 | toolbar.setTitleTextColor(getResources().getColor(R.color.white)); 69 | setSupportActionBar(toolbar); 70 | android.support.v7.app.ActionBar actionBar = getSupportActionBar(); 71 | if (actionBar != null) { 72 | actionBar.setDisplayHomeAsUpEnabled(true); 73 | } 74 | return toolbar; 75 | } 76 | 77 | public void addCalls(Call call) { 78 | if (calls == null) { 79 | calls = new ArrayList<>(); 80 | } 81 | calls.add(call); 82 | } 83 | 84 | private void callCancel() { 85 | if (calls != null && calls.size() > 0) { 86 | for (Call call : calls) { 87 | if (!call.isCanceled()) 88 | call.cancel(); 89 | } 90 | calls.clear(); 91 | } 92 | } 93 | 94 | @Override 95 | protected void onDestroy() { 96 | callCancel(); 97 | super.onDestroy(); 98 | } 99 | 100 | public void onResume() { 101 | super.onResume(); 102 | //统计页面(仅有Activity的应用中SDK自动调用,不需要单独写。"SplashScreen"为页面名称,可自定义) 103 | MobclickAgent.onPageStart(this.getClass().getSimpleName()); 104 | //统计时长 105 | MobclickAgent.onResume(this); 106 | } 107 | 108 | public void onPause() { 109 | super.onPause(); 110 | // (仅有Activity的应用中SDK自动调用,不需要单独写)保证 onPageEnd 在onPause 之前调用,因为 onPause 中会保存信息。 111 | // "SplashScreen"为页面名称,可自定义 112 | MobclickAgent.onPageEnd(this.getClass().getSimpleName()); 113 | MobclickAgent.onPause(this); 114 | } 115 | 116 | @Override 117 | public boolean onOptionsItemSelected(MenuItem item) { 118 | 119 | switch (item.getItemId()) { 120 | case android.R.id.home: 121 | super.onBackPressed(); 122 | break; 123 | default: 124 | //对没有处理的事件,交给父类来处理 125 | return super.onOptionsItemSelected(item); 126 | 127 | } 128 | 129 | return true; 130 | } 131 | 132 | public void toastShow(int resId) { 133 | Toast.makeText(mActivity, resId, Toast.LENGTH_SHORT).show(); 134 | } 135 | 136 | public void toastShow(String resId) { 137 | Toast.makeText(mActivity, resId, Toast.LENGTH_SHORT).show(); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/model/TngouGirlModel.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.model; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | /** 7 | * Created by WuXiaolong 8 | * on 2016/11/2. 9 | */ 10 | 11 | public class TngouGirlModel implements Serializable { 12 | 13 | /** 14 | * status : true 15 | * total : 983 16 | * tngou : [{"count":189,"fcount":0,"galleryclass":3,"id":997,"img":"/ext/161031/8e4063576efa51e1f92f444b0a322ac5.jpg","rcount":0,"size":10,"time":1477919562000,"title":"beautyleg红艳国韵旗袍美女性感高清美腿"},{"count":236,"fcount":0,"galleryclass":1,"id":996,"img":"/ext/161031/02b5547ab0f10831a4cec27995b3d793.jpg","rcount":0,"size":9,"time":1477919443000,"title":"都市极品巨乳女神李妍静私房妩媚动人性感"},{"count":520,"fcount":0,"galleryclass":3,"id":995,"img":"/ext/161027/c3f11f510ab9bc302739140cef619be6.jpg","rcount":0,"size":11,"time":1477575845000,"title":"OL白领美女秘书大胆肉丝美腿高跟迷人养眼写真"},{"count":332,"fcount":0,"galleryclass":5,"id":994,"img":"/ext/161027/6d4d0d7a02be668b4830904ad2c094f3.jpg","rcount":0,"size":8,"time":1477575744000,"title":"极品女秘书孙允珠大长腿性感美女酒店写真"},{"count":693,"fcount":0,"galleryclass":1,"id":993,"img":"/ext/161027/5b2b08f2e757d3de84fb4c1fa8e92f23.jpg","rcount":0,"size":6,"time":1477575688000,"title":"极品大胸美女腿模连体泳装大白腿美胸爆乳性感"},{"count":347,"fcount":0,"galleryclass":3,"id":992,"img":"/ext/161027/aa48f5ac5ce6e454efbe16cbfae4f617.jpg","rcount":0,"size":10,"time":1477575544000,"title":"大胆空姐LO制服诱惑巨乳喷血诱人黑丝美腿性感"},{"count":362,"fcount":0,"galleryclass":6,"id":991,"img":"/ext/161025/b2af6fd0a88d8979f8e957794c1ae270.jpg","rcount":0,"size":8,"time":1477400647000,"title":"模特美女白嫩美腿性感私房照图片"},{"count":340,"fcount":0,"galleryclass":3,"id":990,"img":"/ext/161025/e1bf044ccef5ce3e4e0b7abe37e5d7a8.jpg","rcount":0,"size":9,"time":1477400547000,"title":"大长腿美女性感蕾丝裙黑丝高跟美腿"},{"count":306,"fcount":0,"galleryclass":4,"id":989,"img":"/ext/161025/43a23ffb1b589354bcf479d6c9e6d032.jpg","rcount":0,"size":9,"time":1477400299000,"title":"气质嫩模蕾丝透视朦胧撩人性感"},{"count":679,"fcount":0,"galleryclass":5,"id":988,"img":"/ext/161022/adc5c851b1adafe140303b6d06dd4c00.jpg","rcount":0,"size":13,"time":1477137202000,"title":"风韵美女少妇文静美乳丝袜翘臀妖娆"}] 17 | */ 18 | 19 | private boolean status; 20 | private int total; 21 | /** 22 | * count : 189 23 | * fcount : 0 24 | * galleryclass : 3 25 | * id : 997 26 | * img : /ext/161031/8e4063576efa51e1f92f444b0a322ac5.jpg 27 | * rcount : 0 28 | * size : 10 29 | * time : 1477919562000 30 | * title : beautyleg红艳国韵旗袍美女性感高清美腿 31 | */ 32 | 33 | private List tngou; 34 | 35 | public boolean isStatus() { 36 | return status; 37 | } 38 | 39 | public void setStatus(boolean status) { 40 | this.status = status; 41 | } 42 | 43 | public int getTotal() { 44 | return total; 45 | } 46 | 47 | public void setTotal(int total) { 48 | this.total = total; 49 | } 50 | 51 | public List getTngou() { 52 | return tngou; 53 | } 54 | 55 | public void setTngou(List tngou) { 56 | this.tngou = tngou; 57 | } 58 | 59 | public static class TngouEntity implements Serializable{ 60 | private int count; 61 | private int fcount; 62 | private int galleryclass; 63 | private int id; 64 | private String img; 65 | private int rcount; 66 | private int size; 67 | private long time; 68 | private String title; 69 | 70 | public int getCount() { 71 | return count; 72 | } 73 | 74 | public void setCount(int count) { 75 | this.count = count; 76 | } 77 | 78 | public int getFcount() { 79 | return fcount; 80 | } 81 | 82 | public void setFcount(int fcount) { 83 | this.fcount = fcount; 84 | } 85 | 86 | public int getGalleryclass() { 87 | return galleryclass; 88 | } 89 | 90 | public void setGalleryclass(int galleryclass) { 91 | this.galleryclass = galleryclass; 92 | } 93 | 94 | public int getId() { 95 | return id; 96 | } 97 | 98 | public void setId(int id) { 99 | this.id = id; 100 | } 101 | 102 | public String getImg() { 103 | return img; 104 | } 105 | 106 | public void setImg(String img) { 107 | this.img = img; 108 | } 109 | 110 | public int getRcount() { 111 | return rcount; 112 | } 113 | 114 | public void setRcount(int rcount) { 115 | this.rcount = rcount; 116 | } 117 | 118 | public int getSize() { 119 | return size; 120 | } 121 | 122 | public void setSize(int size) { 123 | this.size = size; 124 | } 125 | 126 | public long getTime() { 127 | return time; 128 | } 129 | 130 | public void setTime(long time) { 131 | this.time = time; 132 | } 133 | 134 | public String getTitle() { 135 | return title; 136 | } 137 | 138 | public void setTitle(String title) { 139 | this.title = title; 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/juzimi/RecyclerViewAdapter.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.juzimi; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.graphics.Bitmap; 6 | import android.graphics.drawable.BitmapDrawable; 7 | import android.os.Build; 8 | import android.support.v4.app.ActivityCompat; 9 | import android.support.v4.app.ActivityOptionsCompat; 10 | import android.support.v4.view.ViewCompat; 11 | import android.support.v7.widget.RecyclerView; 12 | import android.view.View; 13 | import android.view.ViewGroup; 14 | import android.widget.ImageView; 15 | import android.widget.TextView; 16 | 17 | import com.squareup.picasso.Picasso; 18 | import com.wuxiaolong.wewin.model.MainModel; 19 | import com.wuxiaolong.wewin.utils.AppConstants; 20 | import com.wuxiaolong.wewin.utils.AppUtils; 21 | import com.xiaomolongstudio.wewin.R; 22 | 23 | import java.io.Serializable; 24 | import java.util.ArrayList; 25 | import java.util.List; 26 | 27 | import butterknife.BindView; 28 | import butterknife.ButterKnife; 29 | 30 | /** 31 | * Created by 吴小龙同學 32 | * on 2015/11/22. 33 | */ 34 | public class RecyclerViewAdapter extends RecyclerView.Adapter { 35 | private List mMainList = new ArrayList<>(); 36 | private Activity activity; 37 | private boolean hasTitle; 38 | 39 | public RecyclerViewAdapter(Activity activity, boolean hasTitle) { 40 | this.activity = activity; 41 | this.hasTitle = hasTitle; 42 | } 43 | 44 | public List getmMainList() { 45 | return mMainList; 46 | } 47 | 48 | @Override 49 | public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 50 | View view = View.inflate(parent.getContext(), R.layout.recycler_view_item, null); 51 | return new ViewHolder(view); 52 | } 53 | 54 | @Override 55 | public void onBindViewHolder(ViewHolder holder, int position) { 56 | Picasso.with(activity) 57 | .load(mMainList.get(position).getIamgeUrl()) 58 | .placeholder(R.drawable.downloading) 59 | .error(R.drawable.downloading) 60 | .into(holder.imageView); 61 | if (hasTitle) { 62 | holder.title.setVisibility(View.VISIBLE); 63 | holder.title.setText(mMainList.get(position).getTitle()); 64 | } else { 65 | holder.title.setVisibility(View.GONE); 66 | } 67 | holder.imageView.setTag(mMainList.get(position).getIamgeUrl()); 68 | ViewCompat.setTransitionName(holder.imageView, mMainList.get(position).getIamgeUrl()); 69 | } 70 | 71 | @Override 72 | public int getItemCount() { 73 | return mMainList.size(); 74 | } 75 | 76 | public class ViewHolder extends RecyclerView.ViewHolder { 77 | @BindView(R.id.imgView) 78 | ImageView imageView; 79 | @BindView(R.id.title) 80 | TextView title; 81 | 82 | public ViewHolder(final View itemView) { 83 | super(itemView); 84 | ButterKnife.bind(this, itemView); 85 | itemView.setOnClickListener( 86 | new View.OnClickListener() { 87 | @Override 88 | public void onClick(View v) { 89 | Bitmap bitmap = null; 90 | BitmapDrawable bitmapDrawable = (BitmapDrawable) imageView.getDrawable(); 91 | if (bitmapDrawable != null) { 92 | bitmap = bitmapDrawable.getBitmap(); 93 | } 94 | Intent intent = new Intent(activity, ShowImageActivity.class); 95 | intent.putExtra("mainList", (Serializable) mMainList); 96 | intent.putExtra("position", getLayoutPosition()); 97 | intent.putExtra(AppConstants.COLOR, AppUtils.getPaletteColor(bitmap)); 98 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 99 | // Pair pair1 = Pair.create((View) imageView, mMainList.get(getLayoutPosition()).getIamgeUrl()); 100 | // Pair pair2 = Pair.create((View) title, mMainList.get(getLayoutPosition()).getTitle()); 101 | // Log.d("wxl", "title===" + mMainList.get(getLayoutPosition()).getTitle()); 102 | // ActivityOptionsCompat options; 103 | // options = ActivityOptionsCompat 104 | // .makeSceneTransitionAnimation(activity, pair1, pair2); 105 | ActivityOptionsCompat options = ActivityOptionsCompat 106 | .makeSceneTransitionAnimation(activity, itemView, mMainList.get(getLayoutPosition()).getIamgeUrl()); 107 | // ActivityOptionsCompat options = ActivityOptionsCompat 108 | // .makeSceneTransitionAnimation(activity, itemView, AppConstants.TRANSIT_PIC); 109 | ActivityCompat.startActivity(activity, intent, options.toBundle()); 110 | } else { 111 | activity.startActivity(intent); 112 | } 113 | 114 | } 115 | } 116 | 117 | ); 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v4.app.Fragment; 6 | import android.support.v4.app.FragmentTransaction; 7 | import android.support.v7.widget.Toolbar; 8 | import android.view.View; 9 | import android.view.animation.AnimationUtils; 10 | import android.widget.AdapterView; 11 | import android.widget.ArrayAdapter; 12 | import android.widget.ImageView; 13 | import android.widget.ListView; 14 | import android.widget.TextView; 15 | 16 | import com.nineoldandroids.view.ViewHelper; 17 | import com.romainpiel.shimmer.Shimmer; 18 | import com.romainpiel.shimmer.ShimmerTextView; 19 | import com.wuxiaolong.wewin.draglayout.DragLayout; 20 | import com.wuxiaolong.wewin.draglayout.DragLayout.DragListener; 21 | import com.wuxiaolong.wewin.ui.juzimi.MainFragment; 22 | import com.wuxiaolong.wewin.ui.set.SetActivity; 23 | import com.wuxiaolong.wewin.utils.AppConstants; 24 | import com.wuxiaolong.wewin.utils.AppUtils; 25 | import com.xiaomolongstudio.wewin.R; 26 | 27 | import butterknife.BindView; 28 | import butterknife.ButterKnife; 29 | 30 | /** 31 | * 首页,侧滑菜单 32 | * 作者:吴小龙同學 33 | * github:https://github.com/WuXiaolong 34 | * 微信公众号:吴小龙同学 35 | */ 36 | public class MainActivity extends BaseActivity { 37 | 38 | 39 | private String[] mPlanetTitles; 40 | @BindView(R.id.left_drawer) 41 | ListView mDrawerList; 42 | @BindView(R.id.dl) 43 | DragLayout mDragLayout; 44 | @BindView(R.id.main_title) 45 | ShimmerTextView main_title; 46 | @BindView(R.id.tv_set) 47 | TextView tv_set; 48 | @BindView(R.id.iv_icon) 49 | ImageView iv_icon; 50 | 51 | 52 | @Override 53 | protected void onCreate(Bundle savedInstanceState) { 54 | super.onCreate(savedInstanceState); 55 | setContentView(R.layout.activity_main); 56 | ButterKnife.bind(this); 57 | initDragLayout(); 58 | initView(); 59 | AppUtils.getWeekAndDay(this);//邀请评论 60 | } 61 | 62 | 63 | private void initDragLayout() { 64 | mDragLayout.setmDragListener(new DragListener() { 65 | public void onOpen() { 66 | // mDrawerList.smoothScrollToPosition(new Random().nextInt(30)); 67 | } 68 | 69 | public void onClose() { 70 | shake(); 71 | } 72 | 73 | public void onDrag(float percent) { 74 | ViewHelper.setAlpha(iv_icon, 1 - percent); 75 | } 76 | }); 77 | } 78 | 79 | private void shake() { 80 | iv_icon.startAnimation(AnimationUtils.loadAnimation(this, R.anim.shake)); 81 | } 82 | 83 | private void initView() { 84 | main_title.setReflectionColor(R.color.primary); 85 | Shimmer shimmer = new Shimmer(); 86 | shimmer.start(main_title); 87 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 88 | setSupportActionBar(toolbar); 89 | toolbar.setNavigationIcon(null); 90 | android.support.v7.app.ActionBar actionBar = getSupportActionBar(); 91 | if (actionBar != null) { 92 | actionBar.setDisplayHomeAsUpEnabled(false); 93 | actionBar.setDisplayShowTitleEnabled(false); 94 | } 95 | iv_icon = (ImageView) findViewById(R.id.iv_icon); 96 | mPlanetTitles = getResources().getStringArray(R.array.planets_array); 97 | mDrawerList.setAdapter(new ArrayAdapter(this, 98 | R.layout.drawer_list_item, mPlanetTitles)); 99 | mDrawerList.setOnItemClickListener(new DrawerItemClickListener()); 100 | 101 | iv_icon.setOnClickListener(new View.OnClickListener() { 102 | public void onClick(View arg0) { 103 | mDragLayout.open(); 104 | } 105 | }); 106 | tv_set.setOnClickListener(new View.OnClickListener() { 107 | public void onClick(View arg0) { 108 | startActivity(new Intent(MainActivity.this, SetActivity.class)); 109 | } 110 | }); 111 | selectItem(0); 112 | } 113 | 114 | /* The click listner for ListView in the navigation drawer */ 115 | private class DrawerItemClickListener implements 116 | ListView.OnItemClickListener { 117 | @Override 118 | public void onItemClick(AdapterView parent, View view, int position, 119 | long id) { 120 | selectItem(position); 121 | } 122 | } 123 | 124 | /** 125 | * 切换Fragment 126 | */ 127 | 128 | public void switchFragment(Fragment newFragment, int position) { 129 | FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); 130 | Bundle args = new Bundle(); 131 | args.putInt(AppConstants.POSITION, position); 132 | newFragment.setArguments(args); 133 | fragmentTransaction.replace(R.id.content_frame, newFragment).commit(); 134 | } 135 | 136 | 137 | /** 138 | * 跳转页面 139 | * 140 | * @param position 141 | */ 142 | private void selectItem(int position) { 143 | switchFragment(new MainFragment(), position); 144 | 145 | // update selected item and title, then close the drawer 146 | mDrawerList.setItemChecked(position, true); 147 | // setTitle(mPlanetTitles[position]); 148 | main_title.setText(mPlanetTitles[position]); 149 | // mDrawerLayout.closeDrawer(mDrawerList); 150 | mDragLayout.close(); 151 | } 152 | 153 | 154 | } 155 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/juzimi/MainFragment.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.juzimi; 2 | 3 | import android.os.Bundle; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | 8 | import com.wuxiaolong.pullloadmorerecyclerview.PullLoadMoreRecyclerView; 9 | import com.wuxiaolong.wewin.model.MainModel; 10 | import com.wuxiaolong.wewin.retrofit.RetrofitCallback; 11 | import com.wuxiaolong.wewin.ui.BaseFragment; 12 | import com.wuxiaolong.wewin.utils.AppConstants; 13 | import com.xiaomolongstudio.wewin.R; 14 | 15 | import org.jsoup.Jsoup; 16 | import org.jsoup.nodes.Document; 17 | import org.jsoup.nodes.Element; 18 | import org.jsoup.select.Elements; 19 | 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | import butterknife.BindView; 24 | import okhttp3.ResponseBody; 25 | import retrofit2.Call; 26 | 27 | import static com.xiaomolongstudio.wewin.R.id.pullLoadMoreRecyclerView; 28 | 29 | /** 30 | * 美图美句 31 | */ 32 | public class MainFragment extends BaseFragment { 33 | private RecyclerViewAdapter mRecyclerViewAdapter = null; 34 | private int mPage = 1; 35 | private int position = 0; 36 | private String url = "http://www.juzimi.com/meitumeiju?page="; 37 | private boolean hasTitle = true; 38 | @BindView(pullLoadMoreRecyclerView) 39 | PullLoadMoreRecyclerView mPullLoadMoreRecyclerView; 40 | 41 | public void onCreate(Bundle savedInstanceState) { 42 | super.onCreate(savedInstanceState); 43 | if (getArguments() != null) { 44 | position = getArguments().getInt(AppConstants.POSITION); 45 | url = getArguments().getString("url"); 46 | if (position == 0) { 47 | hasTitle = true; 48 | } else { 49 | hasTitle = false; 50 | } 51 | } 52 | } 53 | 54 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 55 | Bundle savedInstanceState) { 56 | return inflater.inflate(R.layout.main_fragment, container, false); 57 | } 58 | 59 | @Override 60 | public void onViewCreated(View view, Bundle savedInstanceState) { 61 | super.onViewCreated(view, savedInstanceState); 62 | 63 | mPullLoadMoreRecyclerView.setStaggeredGridLayout(2);//参数为列数 64 | mPullLoadMoreRecyclerView.setRefreshing(true); 65 | mRecyclerViewAdapter = new RecyclerViewAdapter(getActivity(), hasTitle); 66 | mPullLoadMoreRecyclerView.setAdapter(mRecyclerViewAdapter); 67 | mPullLoadMoreRecyclerView.setOnPullLoadMoreListener(new PullLoadMoreRecyclerView.PullLoadMoreListener() { 68 | @Override 69 | public void onRefresh() { 70 | mPage = 1; 71 | loadData(); 72 | } 73 | 74 | @Override 75 | public void onLoadMore() { 76 | mPage = mPage + 1; 77 | loadData(); 78 | 79 | } 80 | }); 81 | loadData(); 82 | } 83 | 84 | 85 | private void loadData() { 86 | Call call; 87 | if (position == 0) { 88 | call = apiStores.loadMainData(mPage); 89 | } else if (position == 1) { 90 | call = apiStores.loadMainData("shouxiemeiju", mPage); 91 | } else { 92 | call = apiStores.loadMainData("jingdianduibai", mPage); 93 | } 94 | call.enqueue(new RetrofitCallback() { 95 | @Override 96 | public void onSuccess(ResponseBody responseBody) { 97 | try { 98 | String doc = new String(responseBody.bytes(), "UTF-8"); 99 | Document mDocument = Jsoup.parse(doc); 100 | List titleData = null; 101 | if (hasTitle) { 102 | titleData = new ArrayList<>(); 103 | Elements es = mDocument.getElementsByClass("xlistju"); 104 | for (Element e : es) { 105 | titleData.add(e.text()); 106 | } 107 | } 108 | List hrefData = new ArrayList<>(); 109 | Elements es1 = mDocument.getElementsByClass("chromeimg"); 110 | for (Element e : es1) { 111 | hrefData.add(e.attr("src")); 112 | } 113 | List mainList = new ArrayList<>(); 114 | for (int i = 0; i < hrefData.size(); i++) { 115 | MainModel mainModel = new MainModel(); 116 | if (hasTitle) { 117 | mainModel.setTitle(titleData.get(i)); 118 | } 119 | mainModel.setIamgeUrl(hrefData.get(i)); 120 | mainList.add(mainModel); 121 | } 122 | if (mPage == 1) { 123 | mRecyclerViewAdapter.getmMainList().clear(); 124 | } 125 | mRecyclerViewAdapter.getmMainList().addAll(mainList); 126 | mRecyclerViewAdapter.notifyDataSetChanged(); 127 | 128 | } catch (Exception e) { 129 | e.printStackTrace(); 130 | } 131 | } 132 | 133 | @Override 134 | public void onFailure(int code, String msg) { 135 | toastShow(msg); 136 | } 137 | 138 | @Override 139 | public void onThrowable(Throwable t) { 140 | toastShow(t.getMessage()); 141 | } 142 | 143 | @Override 144 | public void onFinish() { 145 | mPullLoadMoreRecyclerView.setPullLoadMoreCompleted(); 146 | } 147 | }); 148 | addCalls(call); 149 | } 150 | 151 | 152 | } 153 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/tngougirl/TngouGirlFragment.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.tngougirl; 2 | 3 | 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.support.annotation.Nullable; 7 | import android.support.v4.app.ActivityCompat; 8 | import android.support.v4.app.ActivityOptionsCompat; 9 | import android.support.v7.widget.RecyclerView; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | import android.widget.ImageView; 14 | import android.widget.TextView; 15 | 16 | import com.wuxiaolong.pullloadmorerecyclerview.PullLoadMoreRecyclerView; 17 | import com.wuxiaolong.wewin.model.TngouGirlModel; 18 | import com.wuxiaolong.wewin.retrofit.RetrofitCallback; 19 | import com.wuxiaolong.wewin.ui.BaseFragment; 20 | import com.wuxiaolong.wewin.utils.AppConstants; 21 | import com.wuxiaolong.wewin.utils.ImageLoader; 22 | import com.xiaomolongstudio.wewin.R; 23 | 24 | import java.util.ArrayList; 25 | import java.util.List; 26 | import java.util.Random; 27 | 28 | import butterknife.BindView; 29 | import butterknife.ButterKnife; 30 | import retrofit2.Call; 31 | 32 | public class TngouGirlFragment extends BaseFragment { 33 | 34 | private DataAdapter dataAdapter; 35 | @BindView(R.id.pullLoadMoreRecyclerView) 36 | PullLoadMoreRecyclerView pullLoadMoreRecyclerView; 37 | private int page = 1; 38 | private int rows = 20; 39 | 40 | @Override 41 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 42 | Bundle savedInstanceState) { 43 | // Inflate the layout for this fragment 44 | return inflater.inflate(R.layout.fragment_tngou_girl, container, false); 45 | } 46 | 47 | @Override 48 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 49 | super.onViewCreated(view, savedInstanceState); 50 | ButterKnife.bind(this, view); 51 | initView(); 52 | page = new Random().nextInt(45); 53 | loadTngouGirl(); 54 | } 55 | 56 | private void initView() { 57 | pullLoadMoreRecyclerView.setStaggeredGridLayout(2);//参数为列数 58 | pullLoadMoreRecyclerView.setRefreshing(true); 59 | dataAdapter = new DataAdapter(); 60 | pullLoadMoreRecyclerView.setAdapter(dataAdapter); 61 | pullLoadMoreRecyclerView.setOnPullLoadMoreListener(new PullLoadMoreRecyclerView.PullLoadMoreListener() { 62 | @Override 63 | public void onRefresh() { 64 | page = 1; 65 | loadTngouGirl(); 66 | } 67 | 68 | @Override 69 | public void onLoadMore() { 70 | page = new Random().nextInt(45); 71 | loadTngouGirl(); 72 | } 73 | }); 74 | } 75 | 76 | private void loadTngouGirl() { 77 | Call call = apiStores.loadTngouGirl(page + 1, rows); 78 | call.enqueue(new RetrofitCallback() { 79 | @Override 80 | public void onSuccess(TngouGirlModel model) { 81 | if (model.isStatus()) { 82 | if (page == 1) { 83 | dataAdapter.clear(); 84 | } 85 | dataAdapter.addAll(model.getTngou()); 86 | } 87 | 88 | } 89 | 90 | @Override 91 | public void onFailure(int code, String msg) { 92 | toastShow(msg); 93 | } 94 | 95 | @Override 96 | public void onThrowable(Throwable t) { 97 | toastShow(t.getMessage()); 98 | } 99 | 100 | @Override 101 | public void onFinish() { 102 | pullLoadMoreRecyclerView.setPullLoadMoreCompleted(); 103 | } 104 | }); 105 | addCalls(call); 106 | } 107 | 108 | public class DataAdapter extends RecyclerView.Adapter { 109 | 110 | private List dataList = new ArrayList<>(); 111 | 112 | 113 | public void addAll(List dataList) { 114 | this.dataList.addAll(dataList); 115 | notifyDataSetChanged(); 116 | } 117 | 118 | public void clear() { 119 | this.dataList.clear(); 120 | } 121 | 122 | @Override 123 | public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 124 | View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.tngou_girl_item, parent, false); 125 | return new ViewHolder(v); 126 | } 127 | 128 | @Override 129 | public void onBindViewHolder(ViewHolder holder, int position) { 130 | TngouGirlModel.TngouEntity tngouEntity = dataList.get(position); 131 | holder.title.setText(tngouEntity.getTitle()); 132 | ImageLoader.load(mActivity, AppConstants.API_SERVER_IMAGE_URL + tngouEntity.getImg(), holder.imageView); 133 | } 134 | 135 | @Override 136 | public int getItemCount() { 137 | return dataList.size(); 138 | } 139 | 140 | public class ViewHolder extends RecyclerView.ViewHolder { 141 | @BindView(R.id.imgView) 142 | ImageView imageView; 143 | @BindView(R.id.title) 144 | TextView title; 145 | 146 | public ViewHolder(final View itemView) { 147 | super(itemView); 148 | ButterKnife.bind(this, itemView); 149 | itemView.setOnClickListener(new View.OnClickListener() { 150 | @Override 151 | public void onClick(View v) { 152 | TngouGirlModel.TngouEntity tngouEntity = dataList.get(getLayoutPosition()); 153 | Intent intent = new Intent(mActivity, TngouGirlDetailActivity.class); 154 | intent.putExtra(AppConstants.ID, tngouEntity.getId()); 155 | ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(mActivity, itemView, tngouEntity.getImg()); 156 | ActivityCompat.startActivity(mActivity, intent, options.toBundle()); 157 | } 158 | }); 159 | } 160 | } 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/tngounews/TngouNewsFragment.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.tngounews; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.annotation.Nullable; 6 | import android.support.v7.widget.RecyclerView; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | import android.widget.ImageView; 11 | import android.widget.TextView; 12 | 13 | import com.wuxiaolong.pullloadmorerecyclerview.PullLoadMoreRecyclerView; 14 | import com.wuxiaolong.wewin.model.TngouNewsModel; 15 | import com.wuxiaolong.wewin.retrofit.RetrofitCallback; 16 | import com.wuxiaolong.wewin.ui.BaseFragment; 17 | import com.wuxiaolong.wewin.utils.AppConstants; 18 | import com.wuxiaolong.wewin.utils.ImageLoader; 19 | import com.xiaomolongstudio.wewin.R; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | import butterknife.BindView; 25 | import butterknife.ButterKnife; 26 | import retrofit2.Call; 27 | 28 | public class TngouNewsFragment extends BaseFragment { 29 | DataAdapter dataAdapter; 30 | @BindView(R.id.pullLoadMoreRecyclerView) 31 | PullLoadMoreRecyclerView pullLoadMoreRecyclerView; 32 | private int page = 1; 33 | int rows = 20; 34 | 35 | @Override 36 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 37 | Bundle savedInstanceState) { 38 | // Inflate the layout for this fragment 39 | return inflater.inflate(R.layout.fragment_tngou_news, container, false); 40 | } 41 | 42 | @Override 43 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 44 | super.onViewCreated(view, savedInstanceState); 45 | ButterKnife.bind(this, view); 46 | initView(); 47 | loadData(); 48 | } 49 | 50 | private void initView() { 51 | pullLoadMoreRecyclerView.setLinearLayout(); 52 | pullLoadMoreRecyclerView.setRefreshing(true); 53 | dataAdapter = new DataAdapter(); 54 | pullLoadMoreRecyclerView.setAdapter(dataAdapter); 55 | pullLoadMoreRecyclerView.setOnPullLoadMoreListener(new PullLoadMoreRecyclerView.PullLoadMoreListener() { 56 | @Override 57 | public void onRefresh() { 58 | page = 1; 59 | loadData(); 60 | } 61 | 62 | @Override 63 | public void onLoadMore() { 64 | page++; 65 | loadData(); 66 | } 67 | }); 68 | } 69 | 70 | private void loadData() { 71 | Call call = apiStores.loadTngouNews(page, rows); 72 | call.enqueue(new RetrofitCallback() { 73 | @Override 74 | public void onSuccess(TngouNewsModel model) { 75 | if (model.isStatus()) { 76 | if (page == 1) { 77 | dataAdapter.clear(); 78 | } 79 | dataAdapter.addAll(model.getTngou()); 80 | if (model.getTngou().size() < rows) { 81 | pullLoadMoreRecyclerView.setHasMore(false); 82 | } else { 83 | pullLoadMoreRecyclerView.setHasMore(true); 84 | } 85 | } 86 | 87 | } 88 | 89 | @Override 90 | public void onFailure(int code, String msg) { 91 | toastShow(msg); 92 | } 93 | 94 | @Override 95 | public void onThrowable(Throwable t) { 96 | toastShow(t.getMessage()); 97 | } 98 | 99 | @Override 100 | public void onFinish() { 101 | pullLoadMoreRecyclerView.setPullLoadMoreCompleted(); 102 | } 103 | }); 104 | addCalls(call); 105 | } 106 | 107 | public class DataAdapter extends RecyclerView.Adapter { 108 | 109 | 110 | private List dataList = new ArrayList<>(); 111 | 112 | 113 | public void addAll(List dataList) { 114 | this.dataList.addAll(dataList); 115 | notifyDataSetChanged(); 116 | } 117 | 118 | public void clear() { 119 | this.dataList.clear(); 120 | } 121 | 122 | @Override 123 | public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 124 | View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.tngou_new_item, parent, false); 125 | return new ViewHolder(v); 126 | } 127 | 128 | @Override 129 | public void onBindViewHolder(ViewHolder holder, int position) { 130 | TngouNewsModel.TngouBean tngouEntity = dataList.get(position); 131 | holder.title.setText(tngouEntity.getTitle()); 132 | holder.fromname.setText(tngouEntity.getFromname()); 133 | holder.description.setText(tngouEntity.getDescription()); 134 | ImageLoader.load(mActivity, AppConstants.API_SERVER_IMAGE_URL + tngouEntity.getImg(), holder.imageView); 135 | } 136 | 137 | @Override 138 | public int getItemCount() { 139 | return dataList.size(); 140 | } 141 | 142 | public class ViewHolder extends RecyclerView.ViewHolder { 143 | @BindView(R.id.imageView) 144 | ImageView imageView; 145 | @BindView(R.id.title) 146 | TextView title; 147 | @BindView(R.id.fromname) 148 | TextView fromname; 149 | @BindView(R.id.description) 150 | TextView description; 151 | 152 | public ViewHolder(final View itemView) { 153 | super(itemView); 154 | ButterKnife.bind(this, itemView); 155 | itemView.setOnClickListener(new View.OnClickListener() { 156 | @Override 157 | public void onClick(View v) { 158 | TngouNewsModel.TngouBean tngouEntity = dataList.get(getLayoutPosition()); 159 | Intent intent = new Intent(mActivity, TngouNewsDetailActivity.class); 160 | intent.putExtra(AppConstants.ID, tngouEntity.getId()); 161 | mActivity.startActivity(intent); 162 | } 163 | }); 164 | } 165 | } 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /app/src/main/res/layout/works_show.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 32 | 33 | 40 | 41 | 47 | 48 | 54 | 55 | 62 | 63 | 64 | 71 | 72 | 81 | 82 | 83 | 84 | 88 | 89 | 96 | 97 | 104 | 105 | 111 | 112 | 118 | 119 | 126 | 127 | 128 | 135 | 136 | 145 | 146 | 147 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /app/src/main/java/com/wuxiaolong/wewin/ui/myblog/MyBlogFragment.java: -------------------------------------------------------------------------------- 1 | package com.wuxiaolong.wewin.ui.myblog; 2 | 3 | 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.support.annotation.Nullable; 7 | import android.support.v7.widget.RecyclerView; 8 | import android.text.Html; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.widget.TextView; 13 | 14 | import com.wuxiaolong.androidutils.library.LogUtil; 15 | import com.wuxiaolong.pullloadmorerecyclerview.PullLoadMoreRecyclerView; 16 | import com.wuxiaolong.wewin.retrofit.RetrofitCallback; 17 | import com.wuxiaolong.wewin.ui.BaseFragment; 18 | import com.wuxiaolong.wewin.ui.WebViewActivity; 19 | import com.wuxiaolong.wewin.utils.AppConstants; 20 | import com.xiaomolongstudio.wewin.R; 21 | 22 | import org.jsoup.Jsoup; 23 | import org.jsoup.nodes.Document; 24 | import org.jsoup.nodes.Element; 25 | import org.jsoup.select.Elements; 26 | 27 | import java.util.ArrayList; 28 | import java.util.List; 29 | 30 | import butterknife.BindView; 31 | import butterknife.ButterKnife; 32 | import okhttp3.ResponseBody; 33 | import retrofit2.Call; 34 | 35 | public class MyBlogFragment extends BaseFragment { 36 | 37 | private DataAdapter dataAdapter; 38 | @BindView(R.id.pullLoadMoreRecyclerView) 39 | PullLoadMoreRecyclerView pullLoadMoreRecyclerView; 40 | private int page = 1; 41 | 42 | @Override 43 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 44 | Bundle savedInstanceState) { 45 | // Inflate the layout for this fragment 46 | View view = inflater.inflate(R.layout.fragment_my_blog, container, false); 47 | 48 | ButterKnife.bind(this, view); 49 | return view; 50 | } 51 | 52 | @Override 53 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 54 | super.onViewCreated(view, savedInstanceState); 55 | ButterKnife.bind(this, view); 56 | initView(); 57 | loadMyBlog(); 58 | } 59 | 60 | private void initView() { 61 | pullLoadMoreRecyclerView.setRefreshing(true); 62 | pullLoadMoreRecyclerView.setLinearLayout(); 63 | dataAdapter = new DataAdapter(); 64 | pullLoadMoreRecyclerView.setAdapter(dataAdapter); 65 | pullLoadMoreRecyclerView.setOnPullLoadMoreListener(new PullLoadMoreRecyclerView.PullLoadMoreListener() { 66 | @Override 67 | public void onRefresh() { 68 | page = 1; 69 | loadMyBlog(); 70 | } 71 | 72 | @Override 73 | public void onLoadMore() { 74 | page++; 75 | loadMyBlog(); 76 | } 77 | }); 78 | 79 | 80 | } 81 | 82 | private void loadMyBlog() { 83 | Call call; 84 | if (page == 1) { 85 | call = apiStores.loadMyBlog(); 86 | } else { 87 | call = apiStores.loadMyBlog(page); 88 | } 89 | call.enqueue(new RetrofitCallback() { 90 | @Override 91 | public void onSuccess(ResponseBody responseBody) { 92 | try { 93 | Document document = Jsoup.parse(new String(responseBody.bytes(), "UTF-8")); 94 | List titleElementList = new ArrayList<>(); 95 | Elements titleElements = document.getElementsByClass("post-title-link"); 96 | for (Element element : titleElements) { 97 | titleElementList.add(element); 98 | //LogUtil.d("text=" + element.text()); 99 | //LogUtil.d("href=" + element.attr("href")); 100 | } 101 | List timeElementList = new ArrayList<>(); 102 | Elements timeElements = document.getElementsByClass("post-time"); 103 | for (Element element : timeElements) { 104 | //LogUtil.d("time=" + element.getElementsByTag("time").text()); 105 | timeElementList.add(element); 106 | } 107 | //Elements categoryElements = document.getElementsByClass("post-category"); 108 | //for (Element element : categoryElements) { 109 | // LogUtil.d("category=" + element.getElementsByTag("a").text()); 110 | //} 111 | List bodyElementList = new ArrayList<>(); 112 | Elements bodyElements = document.getElementsByClass("post-body"); 113 | for (Element element : bodyElements) { 114 | LogUtil.d("body=" + element.html()); 115 | bodyElementList.add(element); 116 | } 117 | if (page == 1) { 118 | dataAdapter.clear(); 119 | } 120 | dataAdapter.addAll(titleElementList, timeElementList, bodyElementList); 121 | if (titleElementList.size() < 8) { 122 | //因为我的博客一页8条数据,当小于8时,说明没有下一页了 123 | pullLoadMoreRecyclerView.setHasMore(false); 124 | } else { 125 | pullLoadMoreRecyclerView.setHasMore(true); 126 | } 127 | 128 | } catch (Exception e) { 129 | e.printStackTrace(); 130 | } 131 | 132 | } 133 | 134 | @Override 135 | public void onFailure(int code, String msg) { 136 | toastShow(msg); 137 | } 138 | 139 | @Override 140 | public void onThrowable(Throwable t) { 141 | toastShow(t.getMessage()); 142 | } 143 | 144 | @Override 145 | public void onFinish() { 146 | pullLoadMoreRecyclerView.setPullLoadMoreCompleted(); 147 | } 148 | }); 149 | addCalls(call); 150 | } 151 | 152 | 153 | public class DataAdapter extends RecyclerView.Adapter { 154 | 155 | private List titleElementList = new ArrayList<>(); 156 | private List timeElementList = new ArrayList<>(); 157 | private List bodyElementList = new ArrayList<>(); 158 | 159 | 160 | public void addAll(List titleElementList, List timeElementList, List bodyElementList) { 161 | this.titleElementList.addAll(titleElementList); 162 | this.timeElementList.addAll(timeElementList); 163 | this.bodyElementList.addAll(bodyElementList); 164 | notifyDataSetChanged(); 165 | } 166 | 167 | public void clear() { 168 | this.titleElementList.clear(); 169 | this.timeElementList.clear(); 170 | this.bodyElementList.clear(); 171 | } 172 | 173 | @Override 174 | public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 175 | View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.my_blog_item, parent, false); 176 | return new ViewHolder(v); 177 | } 178 | 179 | @Override 180 | public void onBindViewHolder(ViewHolder holder, int position) { 181 | Element titleElement = titleElementList.get(position); 182 | holder.title.setText(titleElement.text()); 183 | Element timeElement = timeElementList.get(position); 184 | holder.time.setText(timeElement.getElementsByTag("time").text()); 185 | Element bodyElement = bodyElementList.get(position); 186 | holder.body.setText(Html.fromHtml(bodyElement.html())); 187 | } 188 | 189 | @Override 190 | public int getItemCount() { 191 | return titleElementList.size(); 192 | } 193 | 194 | public class ViewHolder extends RecyclerView.ViewHolder { 195 | @BindView(R.id.title) 196 | TextView title; 197 | @BindView(R.id.time) 198 | TextView time; 199 | @BindView(R.id.body) 200 | TextView body; 201 | 202 | public ViewHolder(View itemView) { 203 | super(itemView); 204 | ButterKnife.bind(this, itemView); 205 | itemView.setOnClickListener(new View.OnClickListener() { 206 | @Override 207 | public void onClick(View v) { 208 | Element titleElement = titleElementList.get(getLayoutPosition()); 209 | startActivity(new Intent(mActivity, WebViewActivity.class) 210 | .putExtra(AppConstants.WEBVIEW_TITLE, titleElement.text()) 211 | .putExtra(AppConstants.WEBVIEW_URL, AppConstants.MY_Blog_URL + titleElement.attr("href"))); 212 | LogUtil.d("uuu=" + AppConstants.MY_Blog_URL + titleElement.attr("href")); 213 | } 214 | }); 215 | } 216 | } 217 | } 218 | } 219 | --------------------------------------------------------------------------------