() {
13 |
14 | abstract fun onResponse(t: T)
15 |
16 | abstract fun onFailure(msg: String)
17 | }
--------------------------------------------------------------------------------
/PermissionManage/app/src/main/res/layout/activity_contact.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/PermissionManage/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/FileStorageOperations/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MVPStudy/app/src/main/res/drawable/ic_statistics.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/dimens_sw/app/src/test/java/github/why168/adaptation/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package github.why168.adaptation
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/MVPStudy/app/src/main/res/drawable/ic_statistics_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/PermissionManage/app/src/main/java/com/github/why168/permissionmanage/ContactActivity.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.permissionmanage;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class ContactActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_contact);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/dimens_sw/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/layout/item_detail.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/test/java/com/github/why168/kotlinlearn/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.github.why168.kotlinlearn
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/menu/menu_tabbed.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/MVPStudy/app/src/main/res/drawable/ic_check_circle_24dp.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/menu/menu_scrolling.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/PermissionManage/permissiongen/src/main/java/kr/co/namee/permissiongen/AllowPermissions.java:
--------------------------------------------------------------------------------
1 | package kr.co.namee.permissiongen;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * Created by namee on 2015. 11. 17..
10 | */
11 | @Target(ElementType.TYPE)
12 | @Retention(RetentionPolicy.RUNTIME )
13 | public @interface AllowPermissions {
14 | String[] value();
15 | }
16 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/drawable-v21/ic_menu_slideshow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/AndroidTestingStudy/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
7 | 24dp
8 | 12dp
9 | 56dp
10 | 16dp
11 |
12 |
--------------------------------------------------------------------------------
/FileStorageOperations/app/src/test/java/io/github/why168/filestorageoperations/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package io.github.why168.filestorageoperations
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/drawable-v21/ic_menu_gallery.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/AndroidTestingStudy/app/src/test/java/com/github/why168/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.github.why168;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/InterView/app/src/main/res/layout-v17/my_daydream.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/InterView/app/src/test/java/com/github/why168/interview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.interview;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/MVPStudy/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/VolleyStudy/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/drawable-v21/ic_menu_manage.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/CustomTabs/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/DataBinding/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/MVPStudy/app/src/main/res/drawable/ic_verified_user_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/drawable/ic_notifications_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/SwipeBack/app/src/main/java/github/why168/swipeback/base/SwipeBackApplication.java:
--------------------------------------------------------------------------------
1 | package github.why168.swipeback.base;
2 |
3 | import android.app.Application;
4 |
5 | import github.why168.swipeback.SwipeBackManager;
6 |
7 | /**
8 | * BaseApplication
9 | *
10 | * @author Edwin.Wu
11 | * @version 2017/2/7 17:26
12 | * @since JDK1.8
13 | */
14 | public class SwipeBackApplication extends Application {
15 | @Override
16 | public void onCreate() {
17 | super.onCreate();
18 | SwipeBackManager.getInstance().init(this);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/OkHttpStudy/app/src/test/java/com/github/why168/okhttpstudy/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.okhttpstudy;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/BaseView/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 |
36 | # Keystore files
37 | *.jks
--------------------------------------------------------------------------------
/CustomTabs/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 |
36 | # Keystore files
37 | *.jks
--------------------------------------------------------------------------------
/DataBinding/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 |
36 | # Keystore files
37 | *.jks
--------------------------------------------------------------------------------
/MVPStudy/app/src/main/res/drawable/ic_statistics_100dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/SwipeBack/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 |
36 | # Keystore files
37 | *.jks
--------------------------------------------------------------------------------
/CollapseView/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 |
36 | # Keystore files
37 | *.jks
--------------------------------------------------------------------------------
/Notification/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 |
36 | # Keystore files
37 | *.jks
--------------------------------------------------------------------------------
/BaseView/app/src/main/java/com/github/why168/baseview/widget/RowDescriptor.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.baseview.widget;
2 |
3 | /**
4 | * RowDescriptor
5 | *
6 | * @author Edwin.Wu
7 | * @version 2016/5/27 22:46
8 | * @since JDK1.8
9 | */
10 | public class RowDescriptor extends BaseRowDescriptor {
11 | public int iconResId;
12 | public String label;
13 |
14 | public RowDescriptor(int iconResId, String label, RowActionEnum action) {
15 | this.iconResId = iconResId;
16 | this.label = label;
17 | this.action = action;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/MultiChannelBuild/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 |
36 | # Keystore files
37 | *.jks
--------------------------------------------------------------------------------
/PermissionManage/permissiongen/src/main/java/kr/co/namee/permissiongen/PermissionFail.java:
--------------------------------------------------------------------------------
1 | package kr.co.namee.permissiongen;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * Created by namee on 2015. 11. 18..
10 | * Register a method invoked when permission requests are denied.
11 | */
12 | @Target(ElementType.METHOD)
13 | @Retention(RetentionPolicy.RUNTIME)
14 | public @interface PermissionFail {
15 | int requestCode();
16 | }
17 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/dimens_sw/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 |
36 | # Keystore files
37 | *.jks
38 | dimen_res/
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/drawable/ic_sync_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/PermissionManage/permissiongen/src/main/java/kr/co/namee/permissiongen/PermissionSuccess.java:
--------------------------------------------------------------------------------
1 | package kr.co.namee.permissiongen;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * Created by namee on 2015. 11. 17..
10 | * Register a method invoked when permission requests are succeeded.
11 | */
12 | @Retention(RetentionPolicy.RUNTIME)
13 | @Target(ElementType.METHOD)
14 | public @interface PermissionSuccess {
15 | int requestCode();
16 | }
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin
13 | gen
14 | out
15 |
16 | # Gradle files
17 | .gradle
18 | build
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio Navigation editor temp files
30 | .navigation
31 |
32 | # Android Studio captures folder
33 | captures
34 |
35 | # Intellij
36 | *.iml
37 | .idea
38 |
--------------------------------------------------------------------------------
/Notification/app/src/main/java/com/github/why168/notification/ResultActivity.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.notification;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | /**
7 | * 点击跳转到这里
8 | *
9 | * @author Edwin.Wu
10 | * @version 2017/3/31 18:37
11 | * @since JDK1.8
12 | */
13 | public class ResultActivity extends AppCompatActivity {
14 |
15 | @Override
16 | protected void onCreate(Bundle savedInstanceState) {
17 | super.onCreate(savedInstanceState);
18 | setContentView(R.layout.activity_result);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/DataBinding/app/src/main/res/layout/fragment_example.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/EditTextTagLayout/app/src/main/res/values/plurals.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - %d rating
5 | - %d ratings
6 |
7 |
8 | - %s Participant
9 | - %s Participants
10 |
11 |
12 | - %d more word
13 | - %d more words
14 |
15 |
--------------------------------------------------------------------------------
/EditTextTagLayout/app/src/main/res/layout/view_shadow_text_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/BaseView/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/CustomTabs/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/InterView/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/OkHttpStudy/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/SwipeBack/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/VolleyStudy/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/CollapseView/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/CollapseView/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/Notification/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.0.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/MultiChannelBuild/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.0.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp
3 |
4 | 16dp
5 | 16dp
6 | 8dp
7 | 176dp
8 | 180dp
9 | 16dp
10 | 8dp
11 | 200dp
12 |
13 |
--------------------------------------------------------------------------------
/dimens_sw/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 屏幕适配
3 | Settings
4 |
5 | First Fragment
6 | Second Fragment
7 | Next
8 | Previous
9 |
10 | Hello first fragment
11 | Hello second fragment. Arg: %1$s
12 |
13 |
--------------------------------------------------------------------------------
/EditTextTagLayout/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
--------------------------------------------------------------------------------
/HandlerCourse/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio captures folder
30 | captures/
31 |
32 | # Intellij
33 | *.iml
34 | .idea
35 | <<<<<<< Updated upstream
36 | =======
37 |
38 | # Keystore files
39 | *.jks
40 | >>>>>>> Stashed changes
41 |
--------------------------------------------------------------------------------
/InterView/app/src/main/res/layout/activity_life.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/layout/content_basic.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/VolleyStudy/app/src/main/res/layout/activity_t1.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/InterView/app/src/main/res/layout/activity_task.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
--------------------------------------------------------------------------------
/MultiChannelBuild/app/src/main/res/layout/item_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/OkHttpStudy/okhttp3/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | minSdkVersion 16
8 | targetSdkVersion 25
9 | versionCode 1
10 | versionName "1.0"
11 | }
12 | buildTypes {
13 | release {
14 | minifyEnabled false
15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
16 | }
17 | }
18 | }
19 |
20 | dependencies {
21 | compile fileTree(include: ['*.jar'], dir: 'libs')
22 | compile 'com.squareup.okio:okio:1.11.0'
23 | }
24 |
--------------------------------------------------------------------------------
/CollapseView/app/src/main/res/layout/expand_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/DataBinding/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | google()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.0.1'
10 |
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | jcenter()
19 | google()
20 | }
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
26 |
--------------------------------------------------------------------------------
/HandlerCourse/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | google()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.0.1'
10 |
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | jcenter()
19 | google()
20 | }
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
26 |
--------------------------------------------------------------------------------
/PermissionManage/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.0.1'
10 |
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | google()
19 | jcenter()
20 | }
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
26 |
--------------------------------------------------------------------------------
/CollapseView/app/src/main/res/layout/expand_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 | - @android:drawable/ic_menu_camera
3 | - @android:drawable/ic_menu_gallery
4 | - @android:drawable/ic_menu_slideshow
5 | - @android:drawable/ic_menu_manage
6 | - @android:drawable/ic_menu_share
7 | - @android:drawable/ic_menu_send
8 |
9 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/drawable-v21/ic_menu_camera.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/layout/content_navigation_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/PermissionManage/permissiongen/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 27
5 | buildToolsVersion "27.0.3"
6 |
7 | defaultConfig {
8 | minSdkVersion 14
9 | targetSdkVersion 27
10 | versionCode 1
11 | versionName "1.0"
12 |
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:27.0.2'
25 | }
26 |
--------------------------------------------------------------------------------
/CollapseView/app/src/main/res/layout/expand_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/InterView/app/src/main/java/com/github/why168/interview/broadcast/MyReceiver3.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.interview.broadcast;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 |
7 | /**
8 | * 动态注册
9 | *
10 | * @author Edwin.Wu
11 | * @version 2017/5/10 00:45
12 | * @since JDK1.8
13 | */
14 | public class MyReceiver3 extends BroadcastReceiver {
15 |
16 | public MyReceiver3() {
17 | System.out.println("MyReceiver3 动态注册成功");
18 | }
19 |
20 | @Override
21 | public void onReceive(Context context, Intent intent) {
22 | System.out.println("MyReceiver3 收到消息...");
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/KotlinLearning/README.md:
--------------------------------------------------------------------------------
1 | ## 12.KotlinLearning
2 |
3 | ### 介绍
4 |
5 | 1. 2017Google I/O讲到将Kotlin作为Android的第一开发语言,基于Java6
6 | 1. 100%兼容Java语言,支持混编
7 | 2. 代码的大幅度精简
8 | 3. 函数式编程,各种语法糖
9 | 4. 避免空指针异常出现
10 | 5. 切换到Kotlin无需成本
11 | 6. 由知名公司JetBrains为它提供强大的商业支持
12 | 7. 编译到APK包里面有大约有6000个方法
13 |
14 |
15 | #### Scala、Groovy、Clojure 、Kotlin 分别解决了 Java 的什么痛点?
16 |
17 | 1. Scala:想解决Java表达能力不足的问题
18 | 2. Groovy:想解决Java语33法过于冗长的问题
19 | 3. Clojure:想解决Java没有函数式编程的问题
20 | 4. Kotlin:想解决Java
21 |
22 |
23 | ### 参考资料
24 | * https://github.com/why168/JavaProjects/tree/master/Kotlinlang
25 |
26 | ### 效果图
27 |
28 | ### 示例代码
29 |
30 |
31 | ```gradle
32 |
33 | ```
34 |
35 | ```java
36 |
37 | ```
38 |
--------------------------------------------------------------------------------
/CustomTabs/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | applicationId "github.why168.customtabs"
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | compile project(':shared')
24 | }
25 |
--------------------------------------------------------------------------------
/BaseView/app/src/main/java/com/github/why168/baseview/widget/RowProfileDescriptor.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.baseview.widget;
2 |
3 | /**
4 | * RowProfileDescriptor
5 | *
6 | * @author Edwin.Wu
7 | * @version 2016/5/28 21:12
8 | * @since JDK1.8
9 | */
10 | public class RowProfileDescriptor extends BaseRowDescriptor {
11 | public String imgUrl;
12 | public String label;
13 | public String detailLabel;
14 |
15 | public RowProfileDescriptor(String imgUrl, String detailLabel, String label, RowActionEnum action) {
16 | this.detailLabel = detailLabel;
17 | this.imgUrl = imgUrl;
18 | this.label = label;
19 | this.action = action;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/MVPStudy/app/src/main/res/drawable/ic_assignment_turned_in_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/MultiChannelBuild/app/src/main/java/com/github/why168/multichannelbuild/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.multichannelbuild;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | /**
7 | * 多渠道打包
8 | *
9 | * 命令:
10 | * 1.gradle assembleRelease 打包
11 | * 2.jarsigner -verify -verbose -certs xx.apk 检测apk的签名信息
12 | *
13 | * @author Edwin.Wu
14 | * @version 2017/1/17 18:31
15 | * @since JDK1.8
16 | */
17 | public class MainActivity extends AppCompatActivity {
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_main);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Notification/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion '26.0.2'
6 | defaultConfig {
7 | applicationId "com.github.why168.notification"
8 | minSdkVersion 11
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | compile 'com.android.support:appcompat-v7:25.1.0'
24 | }
25 |
--------------------------------------------------------------------------------
/InterView/app/src/main/java/com/github/why168/interview/broadcast/MyReceiver2.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.interview.broadcast;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.os.Bundle;
7 |
8 | import com.github.why168.interview.constant.Constants;
9 |
10 | public class MyReceiver2 extends BroadcastReceiver {
11 |
12 | @Override
13 | public void onReceive(Context context, Intent intent) {
14 | Bundle resultExtras = getResultExtras(true);
15 | String broadcast_data = resultExtras.getString(Constants.BROADCAST_DATA);
16 | System.out.println("MyReceiver2 接受到消息, 收到: " + broadcast_data);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/KotlinLearning/app/src/main/res/menu/navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
--------------------------------------------------------------------------------
/BaseView/app/src/main/java/com/github/why168/baseview/widget/GroupDescriptor.java:
--------------------------------------------------------------------------------
1 | package com.github.why168.baseview.widget;
2 |
3 | import java.util.ArrayList;
4 |
5 | /**
6 | * GroupDescriptor
7 | *
8 | * @author Edwin.Wu
9 | * @version 2016/5/27 23:54
10 | * @since JDK1.8
11 | */
12 | public class GroupDescriptor {
13 | public String title;
14 | public ArrayList descriptors;
15 |
16 | public GroupDescriptor(ArrayList descriptors) {
17 | this.descriptors = descriptors;
18 | }
19 |
20 | public GroupDescriptor(String title, ArrayList descriptors) {
21 | this.title = title;
22 | this.descriptors = descriptors;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/SwipeBack/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Android\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 |
--------------------------------------------------------------------------------