├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── runConfigurations.xml ├── compiler.xml ├── modules.xml ├── gradle.xml └── misc.xml ├── app ├── .gitignore ├── Captures │ ├── gen01.png │ ├── gen02.png │ ├── gen03.png │ ├── gen04.png │ ├── gen05.png │ └── installPlugin.png ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── item.xml │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── qfeng │ │ │ └── thirdusage │ │ │ ├── MainActivity.java │ │ │ └── MyAdapter.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── qfeng │ │ │ └── thirdusage │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── qfeng │ │ └── thirdusage │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── README.md ├── demo01 ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_event_bus_demo.xml │ │ │ │ └── demo_rx.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── qfeng │ │ │ │ └── demo01 │ │ │ │ ├── HandleEvent.java │ │ │ │ ├── EventBusDemo.java │ │ │ │ ├── MainActivity.java │ │ │ │ └── RxAndroidDemo.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── qfeng │ │ │ └── demo01 │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── qfeng │ │ └── demo01 │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── README.md ├── demo02 ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── qfeng │ │ │ │ └── demo02 │ │ │ │ ├── MyApp.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── qfeng │ │ │ └── demo02 │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── qfeng │ │ └── demo02 │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── README.md ├── demo03 ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── activity_main.xml │ │ │ │ └── activity_retrofit_demo.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── qfeng │ │ │ │ └── demo03 │ │ │ │ ├── APIWithRx.java │ │ │ │ ├── API.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── RetrofitDemo.java │ │ │ │ └── Data.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── qfeng │ │ │ └── demo03 │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── qfeng │ │ └── demo03 │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── README.md └── build.gradle ├── demo04 ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_mvptest.xml │ │ │ │ └── activity_mvvmtest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── qfeng │ │ │ │ └── demo04 │ │ │ │ ├── mvp │ │ │ │ ├── presenter │ │ │ │ │ ├── ITestPresenter.java │ │ │ │ │ └── TestPresenter.java │ │ │ │ ├── ui │ │ │ │ │ ├── IView.java │ │ │ │ │ └── MVPTestActivity.java │ │ │ │ └── model │ │ │ │ │ └── Entity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── base │ │ │ │ ├── BaseActivity.java │ │ │ │ ├── BaseFragment.java │ │ │ │ └── TBaseAdapter.java │ │ │ │ ├── mvvm │ │ │ │ ├── HandleEvent.java │ │ │ │ ├── model │ │ │ │ │ └── User.java │ │ │ │ └── vm │ │ │ │ │ └── MVVMTest.java │ │ │ │ ├── Demo.java │ │ │ │ └── BaseActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── qfeng │ │ │ └── demo04 │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── qfeng │ │ └── demo04 │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── README.md ├── hehe.jpg ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── README.md ├── gradlew.bat └── gradlew /.idea/.name: -------------------------------------------------------------------------------- 1 | ThirdUsage -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /demo01/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /demo02/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /demo03/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /demo04/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /hehe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/hehe.jpg -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':demo01', ':demo02', ':demo03', ':demo04' 2 | -------------------------------------------------------------------------------- /app/Captures/gen01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/Captures/gen01.png -------------------------------------------------------------------------------- /app/Captures/gen02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/Captures/gen02.png -------------------------------------------------------------------------------- /app/Captures/gen03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/Captures/gen03.png -------------------------------------------------------------------------------- /app/Captures/gen04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/Captures/gen04.png -------------------------------------------------------------------------------- /app/Captures/gen05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/Captures/gen05.png -------------------------------------------------------------------------------- /app/Captures/installPlugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/Captures/installPlugin.png -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /demo01/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Demo01 3 | 4 | -------------------------------------------------------------------------------- /demo02/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Demo02 3 | 4 | -------------------------------------------------------------------------------- /demo03/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Demo03 3 | 4 | -------------------------------------------------------------------------------- /demo04/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Demo04 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.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/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo01/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo01/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo01/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo01/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo01/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo01/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo02/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo02/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo02/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo02/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo02/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo02/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo03/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo03/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo03/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo03/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo03/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo03/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo04/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo04/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo04/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo04/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo04/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo04/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo01/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo01/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo01/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo01/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo02/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo02/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo02/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo02/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo03/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo03/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo03/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo03/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo04/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo04/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo04/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/innershows/ThirdUsage/HEAD/demo04/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ThirdUsage 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /demo01/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /demo02/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /demo03/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /demo04/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /demo01/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /demo02/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /demo03/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /demo04/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 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.10-all.zip 7 | -------------------------------------------------------------------------------- /demo04/src/main/java/com/qfeng/demo04/mvp/presenter/ITestPresenter.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04.mvp.presenter; 2 | 3 | /** 4 | * Created by innershows on 16/8/9. 5 | * 6 | * @author innershows 7 | * @date 16/8/9 8 | * @e_mail innershow@gmail.com 9 | */ 10 | public interface ITestPresenter { 11 | void startDownload(String url); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /demo01/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /demo02/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /demo03/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /demo04/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /demo01/src/test/java/com/qfeng/demo01/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo01; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /demo02/src/test/java/com/qfeng/demo02/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo02; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /demo03/src/test/java/com/qfeng/demo03/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo03; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /demo04/src/test/java/com/qfeng/demo04/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/test/java/com/qfeng/thirdusage/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.thirdusage; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /demo04/src/main/java/com/qfeng/demo04/mvp/ui/IView.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04.mvp.ui; 2 | 3 | /** 4 | * Created by innershows on 16/8/9. 5 | * 模拟一个网络访问,然后可以时时更新进度 6 | * 7 | * @author innershows 8 | * @date 16/8/9 9 | * @e_mail innershow@gmail.com 10 | */ 11 | public interface IView { 12 | 13 | void startLoading(); 14 | 15 | void loading(int progress); 16 | 17 | void loadFinished(String msg); 18 | } 19 | -------------------------------------------------------------------------------- /demo04/src/main/java/com/qfeng/demo04/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | 6 | public class MainActivity extends AppCompatActivity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | setContentView(R.layout.activity_main); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo01/src/androidTest/java/com/qfeng/demo01/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo01; 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 | } -------------------------------------------------------------------------------- /demo02/src/androidTest/java/com/qfeng/demo02/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo02; 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 | } -------------------------------------------------------------------------------- /demo03/src/androidTest/java/com/qfeng/demo03/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo03; 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 | } -------------------------------------------------------------------------------- /demo04/src/androidTest/java/com/qfeng/demo04/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04; 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/androidTest/java/com/qfeng/thirdusage/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.thirdusage; 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 | } -------------------------------------------------------------------------------- /demo01/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo02/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo03/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo04/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo03/src/main/java/com/qfeng/demo03/APIWithRx.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo03; 2 | 3 | import retrofit2.http.GET; 4 | import retrofit2.http.Query; 5 | import rx.Observable; 6 | 7 | /** 8 | * Created by innershows on 16/8/9. 9 | * 10 | * @author innershows 11 | * @date 16/8/9 12 | * @e_mail innershow@gmail.com 13 | */ 14 | public interface APIWithRx { 15 | @GET("getArticleListImprove") 16 | Observable getNews(@Query("cid_rel") int cid_rel);//查询的参数 17 | } 18 | -------------------------------------------------------------------------------- /demo02/src/main/java/com/qfeng/demo02/MyApp.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo02; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.drawee.backends.pipeline.Fresco; 6 | 7 | /** 8 | * Created by innershows on 16/8/9. 9 | * 10 | * @author innershows 11 | * @date 16/8/9 12 | * @e_mail innershow@gmail.com 13 | */ 14 | public class MyApp extends Application { 15 | @Override 16 | public void onCreate() { 17 | super.onCreate(); 18 | //初始化 19 | Fresco.initialize(this); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 16 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /demo02/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /demo04/src/main/java/com/qfeng/demo04/base/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04.base; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | /** 7 | * Created by innershows on 16/6/25. 8 | */ 9 | public abstract class BaseActivity extends AppCompatActivity { 10 | @Override 11 | public final void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | 14 | setContentView(getLayoutId()); 15 | initView(); 16 | setListener(); 17 | } 18 | 19 | 20 | public abstract int getLayoutId(); 21 | 22 | protected abstract void initView(); 23 | 24 | protected abstract void setListener(); 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /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 /Users/innershows/Downloads/android-sdk-macosx/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/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /demo01/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 /Users/innershows/Downloads/android-sdk-macosx/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 | -------------------------------------------------------------------------------- /demo02/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 /Users/innershows/Downloads/android-sdk-macosx/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 | -------------------------------------------------------------------------------- /demo03/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 /Users/innershows/Downloads/android-sdk-macosx/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 | -------------------------------------------------------------------------------- /demo04/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 /Users/innershows/Downloads/android-sdk-macosx/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 | -------------------------------------------------------------------------------- /demo04/src/main/java/com/qfeng/demo04/mvvm/HandleEvent.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04.mvvm; 2 | 3 | import android.view.View; 4 | import android.widget.Toast; 5 | 6 | import com.qfeng.demo04.mvvm.model.User; 7 | 8 | /** 9 | * Created by innershows on 16/8/9. 10 | * 11 | * @author innershows 12 | * @date 16/8/9 13 | * @e_mail innershow@gmail.com 14 | */ 15 | public class HandleEvent { 16 | public void handleClick(View v) { 17 | Toast.makeText(v.getContext(), "呵呵哒", Toast.LENGTH_SHORT).show(); 18 | //System.out.println("====>"+user.getName()); 19 | } 20 | 21 | public void handleClick01(User user) { 22 | //Toast.makeText(v.getContext(), "呵呵哒", Toast.LENGTH_SHORT).show(); 23 | System.out.println("====>"+user.getName()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /demo04/src/main/java/com/qfeng/demo04/mvp/model/Entity.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04.mvp.model; 2 | 3 | /** 4 | * Created by innershows on 16/8/9. 5 | * 6 | * @author innershows 7 | * @date 16/8/9 8 | * @e_mail innershow@gmail.com 9 | */ 10 | public class Entity { 11 | private String name; 12 | private String msg; 13 | 14 | public Entity(String name, String msg) { 15 | this.name = name; 16 | this.msg = msg; 17 | } 18 | 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | public void setName(String name) { 24 | this.name = name; 25 | } 26 | 27 | public String getMsg() { 28 | return msg; 29 | } 30 | 31 | public void setMsg(String msg) { 32 | this.msg = msg; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /demo04/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | -------------------------------------------------------------------------------- /demo03/src/main/java/com/qfeng/demo03/API.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo03; 2 | 3 | import retrofit2.Call; 4 | import retrofit2.http.GET; 5 | import retrofit2.http.Query; 6 | 7 | /** 8 | * Created by innershows on 16/8/9. 9 | * 10 | * @author innershows 11 | * @date 16/8/9 12 | * @e_mail innershow@gmail.com 13 | */ 14 | public interface API { 15 | //http://lol.data.shiwan.com/getArticleListImprove?cid_rel=207 16 | //如果请求这个接口,分为: 域名、路径、参数。 restful 设计良好的api,采用的是路径里面包含参数的方式。 17 | //很显然,这个接口并不是,但是并不影响使用 18 | 19 | 20 | // @GET 21 | // Call getBaidu(); 22 | 23 | 24 | //http://lol.data.shiwan.com/getArticleListImprove?cid_rel=207 25 | //这里是get请求 26 | @GET("getArticleListImprove") 27 | //路径 28 | Call getNews(@Query("cid_rel") int cid_rel);//查询的参数 29 | } 30 | -------------------------------------------------------------------------------- /demo04/src/main/java/com/qfeng/demo04/mvvm/model/User.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04.mvvm.model; 2 | 3 | /** 4 | * Created by innershows on 16/8/9. 5 | * 类似一个JavaBean 格式 6 | * 7 | * @author innershows 8 | * @date 16/8/9 9 | * @e_mail innershow@gmail.com 10 | */ 11 | public class User { 12 | private String name; 13 | private String age; 14 | 15 | public User(String name, String age) { 16 | this.name = name; 17 | this.age = age; 18 | } 19 | 20 | public String getName() { 21 | return name; 22 | } 23 | 24 | public void setName(String name) { 25 | this.name = name; 26 | } 27 | 28 | public String getAge() { 29 | return age; 30 | } 31 | 32 | public void setAge(String age) { 33 | this.age = age; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /demo01/src/main/java/com/qfeng/demo01/HandleEvent.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo01; 2 | 3 | import android.content.Context; 4 | import android.widget.Toast; 5 | 6 | import org.greenrobot.eventbus.Subscribe; 7 | import org.greenrobot.eventbus.ThreadMode; 8 | 9 | /** 10 | * Created by innershows on 16/8/8. 11 | * 12 | * @author innershows 13 | * @date 16/8/8 14 | * @e_mail innershow@gmail.com 15 | */ 16 | public class HandleEvent { 17 | private final String msg; 18 | private final Context ctx; 19 | 20 | public HandleEvent(String msg, Context ctx) { 21 | this.msg = msg; 22 | this.ctx = ctx; 23 | } 24 | 25 | @Subscribe(threadMode = ThreadMode.MAIN) 26 | public void handle(String event) { 27 | Toast.makeText(ctx, event, Toast.LENGTH_SHORT).show(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /demo04/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "24.0.0" 6 | 7 | 8 | dataBinding { 9 | enabled = true 10 | } 11 | 12 | defaultConfig { 13 | applicationId "com.qfeng.demo04" 14 | minSdkVersion 14 15 | targetSdkVersion 24 16 | versionCode 1 17 | versionName "1.0" 18 | } 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | } 26 | 27 | dependencies { 28 | compile fileTree(dir: 'libs', include: ['*.jar']) 29 | testCompile 'junit:junit:4.12' 30 | compile 'com.android.support:appcompat-v7:24.0.0-alpha2' 31 | } 32 | -------------------------------------------------------------------------------- /demo04/src/main/java/com/qfeng/demo04/Demo.java: -------------------------------------------------------------------------------- 1 | package com.qfeng.demo04; 2 | 3 | import android.content.Intent; 4 | import android.widget.TextView; 5 | 6 | /** 7 | * Created by innershows on 16/8/9. 8 | * 9 | * @author innershows 10 | * @date 16/8/9 11 | * @e_mail innershow@gmail.com 12 | */ 13 | public class Demo extends BaseActivity { 14 | private TextView tv; 15 | 16 | @Override 17 | protected int getLayoutId() { 18 | return android.R.layout.simple_list_item_1; 19 | } 20 | 21 | @Override 22 | protected void initView(Intent intent) { 23 | tv = (TextView) findViewById(android.R.id.text1); 24 | } 25 | 26 | @Override 27 | protected void processOperation() { 28 | 29 | } 30 | 31 | @Override 32 | protected void recyleResource() { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /demo01/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 |