?) : Interceptor {
16 |
17 | @Throws(IOException::class)
18 | override fun intercept(chain: Interceptor.Chain): Response {
19 | val builder = chain.request()
20 | .newBuilder()
21 | if (headers != null && headers.size > 0) {
22 | val keys = headers.keys
23 | for (headerKey in keys) {
24 | builder.addHeader(headerKey, headers[headerKey]!!).build()
25 | }
26 | }
27 | //请求信息
28 | return chain.proceed(builder.build())
29 | }
30 | }
--------------------------------------------------------------------------------
/general_network/src/main/java/com/link/general_network/interceptor/logging/I.java:
--------------------------------------------------------------------------------
1 | package com.link.general_network.interceptor.logging;
2 |
3 |
4 | import java.util.logging.Level;
5 |
6 | import okhttp3.internal.platform.Platform;
7 |
8 | /**
9 | * @author ihsan on 10/02/2017.
10 | */
11 | class I {
12 |
13 | protected I() {
14 | throw new UnsupportedOperationException();
15 | }
16 |
17 | static void log(int type, String tag, String msg) {
18 | java.util.logging.Logger logger = java.util.logging.Logger.getLogger(tag);
19 | switch (type) {
20 | case Platform.INFO:
21 | logger.log(Level.INFO, msg);
22 | break;
23 | default:
24 | logger.log(Level.WARNING, msg);
25 | break;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/general_network/src/main/java/com/link/general_network/interceptor/logging/Level.java:
--------------------------------------------------------------------------------
1 | package com.link.general_network.interceptor.logging;
2 |
3 | /**
4 | * @author ihsan on 21/02/2017.
5 | */
6 |
7 | public enum Level {
8 | /**
9 | * No logs.
10 | */
11 | NONE,
12 | /**
13 | * Example:
14 | *
{@code
15 | * - URL
16 | * - Method
17 | * - Headers
18 | * - Body
19 | * }
20 | */
21 | BASIC,
22 | /**
23 | * Example:
24 | *
{@code
25 | * - URL
26 | * - Method
27 | * - Headers
28 | * }
29 | */
30 | HEADERS,
31 | /**
32 | * Example:
33 | *
{@code
34 | * - URL
35 | * - Method
36 | * - Body
37 | * }
38 | */
39 | BODY
40 | }
41 |
--------------------------------------------------------------------------------
/general_network/src/main/java/com/link/general_network/interceptor/logging/Logger.java:
--------------------------------------------------------------------------------
1 | package com.link.general_network.interceptor.logging;
2 |
3 | import okhttp3.internal.platform.Platform;
4 |
5 | /**
6 | * @author ihsan on 11/07/2017.
7 | */
8 | @SuppressWarnings({"WeakerAccess", "unused"})
9 | public interface Logger {
10 | void log(int level, String tag, String msg);
11 |
12 | Logger DEFAULT = new Logger() {
13 | @Override
14 | public void log(int level, String tag, String message) {
15 | Platform.get().log(level, message, null);
16 | }
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/general_network/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | general_network
3 |
4 |
--------------------------------------------------------------------------------
/general_picture/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/general_picture/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply from: '../maven_push.gradle'
3 |
4 | android {
5 |
6 | compileSdkVersion build_versions.compile_sdk
7 |
8 | defaultConfig libDefaultConfig
9 |
10 | compileOptions {
11 | targetCompatibility JavaVersion.VERSION_1_8
12 | sourceCompatibility JavaVersion.VERSION_1_8
13 | }
14 |
15 | }
16 |
17 | dependencies {
18 | implementation fileTree(dir: 'libs', include: ['*.jar'])
19 | implementation deps.androidx.appcompat
20 | //图片加载框架
21 | implementation deps.glide.runtime
22 | annotationProcessor deps.glide.compiler
23 |
24 | testImplementation 'junit:junit:4.12'
25 | }
26 |
--------------------------------------------------------------------------------
/general_picture/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/general_picture/consumer-rules.pro
--------------------------------------------------------------------------------
/general_picture/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536m
2 |
3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/
4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/
5 | NAME=public
6 | PASSWORD=123456@qq.com
7 | VERSION=1.0.1
8 | POM_ARTIFACT_ID=picture
9 | GROUP=com.link
--------------------------------------------------------------------------------
/general_picture/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/general_picture/src/androidTest/java/com/link/general_picture/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.link.general_picture;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.link.general_picture.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/general_picture/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/general_picture/src/main/java/com/link/general_picture/ILoaderStrategy.java:
--------------------------------------------------------------------------------
1 | package com.link.general_picture;
2 |
3 | public interface ILoaderStrategy {
4 |
5 | /**
6 | * 加载图片
7 | * @param builder
8 | */
9 | void loadImage(ImageLoadBuilder builder);
10 |
11 | /**
12 | * 清理内存缓存
13 | */
14 | void clearMemoryCache();
15 |
16 | /**
17 | * 清理磁盘缓存
18 | */
19 | void clearDiskCache();
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/general_picture/src/main/java/com/link/general_picture/ImageLoader.java:
--------------------------------------------------------------------------------
1 | package com.link.general_picture;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | * @author WJ
7 | * @date 2019-08-27
8 | *
9 | * 描述:图片加载框架,单例封装
10 | */
11 | public class ImageLoader {
12 |
13 | private static class Inner {
14 | private static ImageLoader sInstance = new ImageLoader();
15 | }
16 |
17 | private ImageLoader() {
18 |
19 | }
20 |
21 | public static ImageLoader getInstance() {
22 | return Inner.sInstance;
23 | }
24 |
25 | public ImageLoadBuilder.Builder with(Context context){
26 | return new ImageLoadBuilder.Builder(context);
27 | }
28 |
29 |
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/general_picture/src/main/java/com/link/general_picture/glide/CustomGlideModule.java:
--------------------------------------------------------------------------------
1 | package com.link.general_picture.glide;
2 |
3 | import com.bumptech.glide.module.AppGlideModule;
4 |
5 | public class CustomGlideModule extends AppGlideModule {
6 | }
7 |
--------------------------------------------------------------------------------
/general_picture/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | general_picture
3 |
4 |
--------------------------------------------------------------------------------
/general_picture/src/test/java/com/link/general_picture/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.link.general_picture;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/general_statelayout/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/general_statelayout/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 | apply plugin: 'kotlin-kapt'
5 | apply from: '../maven_push.gradle'
6 |
7 | android {
8 |
9 | compileSdkVersion build_versions.compile_sdk
10 |
11 | defaultConfig libDefaultConfig
12 |
13 | compileOptions {
14 | targetCompatibility JavaVersion.VERSION_1_8
15 | sourceCompatibility JavaVersion.VERSION_1_8
16 | }
17 |
18 | }
19 |
20 | dependencies {
21 | implementation fileTree(dir: 'libs', include: ['*.jar'])
22 | implementation deps.androidx.appcompat
23 | testImplementation 'junit:junit:4.12'
24 | }
25 |
--------------------------------------------------------------------------------
/general_statelayout/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536m
2 |
3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/
4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/
5 | NAME=public
6 | PASSWORD=123456@qq.com
7 | VERSION=1.0.0
8 | POM_ARTIFACT_ID=statelayout
9 | GROUP=com.link
--------------------------------------------------------------------------------
/general_statelayout/src/androidTest/java/com/link/general_statelayout/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.link.general_statelayout;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.InstrumentationRegistry;
6 | import androidx.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getTargetContext();
24 |
25 | assertEquals("com.link.general_statelayout.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/general_statelayout/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/general_statelayout/src/main/java/com/link/general_statelayout/AbsViewStubLayout.kt:
--------------------------------------------------------------------------------
1 | package com.link.general_statelayout
2 |
3 | import android.content.Context
4 | import android.view.View
5 | import android.view.ViewStub
6 | import androidx.annotation.LayoutRes
7 |
8 | abstract class AbsViewStubLayout {
9 |
10 | /**
11 | * ViewStub用来加载网络异常,空数据等页面
12 | */
13 | private var mLayoutVs: ViewStub? = null
14 | /**
15 | * View用来加载正常视图页面
16 | */
17 | private var mContentView: View? = null
18 |
19 | fun initLayout(context: Context, @LayoutRes layoutResId: Int) {
20 | mLayoutVs = ViewStub(context)
21 | mLayoutVs!!.layoutResource = layoutResId
22 | }
23 |
24 | fun getLayoutVs(): ViewStub? {
25 | return mLayoutVs
26 | }
27 |
28 | fun setView(contentView: View) {
29 | mContentView = contentView
30 | }
31 |
32 | /**
33 | * 设置数据
34 | * @param objects 数据
35 | */
36 | abstract fun setData(vararg objects: Any)
37 |
38 | }
--------------------------------------------------------------------------------
/general_statelayout/src/main/java/com/link/general_statelayout/ILayoutState.kt:
--------------------------------------------------------------------------------
1 | package com.link.general_statelayout
2 |
3 | interface ILayoutState {
4 |
5 | fun isLoading():Boolean
6 |
7 | fun showLoading()
8 |
9 | fun showNetworkError()
10 |
11 | fun showEmptyData(iconImage: Int, textTip: String)
12 |
13 | fun showContent()
14 |
15 | fun showError(iconImage: Int, textTip: String)
16 |
17 | }
--------------------------------------------------------------------------------
/general_statelayout/src/main/java/com/link/general_statelayout/listener/OnNetworkListener.kt:
--------------------------------------------------------------------------------
1 | package com.link.general_statelayout.listener
2 |
3 | interface OnNetworkListener {
4 | fun onNetwork()
5 | }
--------------------------------------------------------------------------------
/general_statelayout/src/main/java/com/link/general_statelayout/listener/OnRetryListener.kt:
--------------------------------------------------------------------------------
1 | package com.link.general_statelayout.listener
2 |
3 | interface OnRetryListener {
4 | fun onRetry()
5 | }
--------------------------------------------------------------------------------
/general_statelayout/src/main/java/com/link/general_statelayout/listener/OnShowOrHideListener.kt:
--------------------------------------------------------------------------------
1 | package com.link.general_statelayout.listener
2 |
3 | import android.view.View
4 |
5 | interface OnShowOrHideListener {
6 | fun onViewShow(view: View, id: Int)
7 |
8 | fun onViewHide(view: View, id: Int)
9 | }
--------------------------------------------------------------------------------
/general_statelayout/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | general_statelayout
3 |
4 |
--------------------------------------------------------------------------------
/general_statelayout/src/test/java/com/link/general_statelayout/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.link.general_statelayout;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Apr 29 15:46:13 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/libraryarchitecture/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/libraryarchitecture/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 | apply plugin: 'kotlin-kapt'
5 |
6 | android {
7 | compileSdkVersion build_versions.compile_sdk
8 |
9 | defaultConfig libDefaultConfig
10 |
11 | compileOptions {
12 | targetCompatibility JavaVersion.VERSION_1_8
13 | sourceCompatibility JavaVersion.VERSION_1_8
14 | }
15 |
16 | }
17 |
18 | dependencies {
19 | api fileTree(dir: 'libs', include: ['*.jar'])
20 | api project(":librarybase")
21 | testImplementation 'junit:junit:4.12'
22 | }
23 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/androidTest/java/com/link/librarymodule/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.link.librarymodule.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/BaseApplication.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule
2 |
3 | import android.app.Application
4 |
5 | /**
6 | * @author WJ
7 | * @date 2019-08-02
8 | *
9 | * 描述:框架提供application基础类
10 | */
11 | abstract class BaseApplication : Application(),IBaseApplication {
12 |
13 | }
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/IBaseApplication.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule
2 |
3 | import android.app.Application
4 |
5 | interface IBaseApplication {
6 |
7 | /**
8 | * Application 初始化
9 | */
10 | fun initModuleApp(application: Application)
11 |
12 | /**
13 | * 所有 Application 初始化后的自定义操作
14 | */
15 | fun initModuleData(application: Application)
16 | }
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/base/mvvm/model/BaseRepository.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.base.mvvm.model
2 | /**
3 | * @author WJ
4 | * @date 2019-08-02
5 | *
6 | * 描述:数据仓库的基类,当前业务比较少
7 | */
8 | open class BaseRepository {
9 |
10 | }
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/base/mvvm/view/IBaseView.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.base.mvvm.view
2 |
3 | interface IBaseView {
4 |
5 | /**
6 | * 接收上一个页面传入的数据
7 | */
8 | fun initParam()
9 |
10 | /**
11 | * 请求网络接口
12 | */
13 | fun loadData();
14 |
15 | /**
16 | *
17 | */
18 | fun initViewObservable()
19 |
20 |
21 |
22 | }
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/DelayInitDispatcher.java:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.launchstarter;
2 |
3 | import android.os.Looper;
4 | import android.os.MessageQueue;
5 | import com.link.librarymodule.launchstarter.task.DispatchRunnable;
6 | import com.link.librarymodule.launchstarter.task.Task;
7 | import java.util.LinkedList;
8 | import java.util.Queue;
9 | /**
10 | * @author WJ
11 | * @date 2019-08-16
12 | *
13 | * 描述:延迟初始化调度器
14 | */
15 | public class DelayInitDispatcher {
16 |
17 | private Queue mDelayTasks = new LinkedList<>();
18 |
19 | private MessageQueue.IdleHandler mIdleHandler = () -> {
20 | if(mDelayTasks.size()>0){
21 | Task task = mDelayTasks.poll();
22 | new DispatchRunnable(task).run();
23 | }
24 | return !mDelayTasks.isEmpty();
25 | };
26 |
27 | public DelayInitDispatcher addTask(Task task){
28 | mDelayTasks.add(task);
29 | return this;
30 | }
31 |
32 | public void start(){
33 | Looper.myQueue().addIdleHandler(mIdleHandler);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/stat/TaskStatBean.java:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.launchstarter.stat;
2 |
3 | class TaskStatBean {
4 |
5 | private String situation;
6 | private int count;
7 |
8 | public String getSituation() {
9 | return situation;
10 | }
11 |
12 | public void setSituation(String situation) {
13 | this.situation = situation;
14 | }
15 |
16 | public int getCount() {
17 | return count;
18 | }
19 |
20 | public void setCount(int count) {
21 | this.count = count;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/task/MainTask.java:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.launchstarter.task;
2 |
3 | public abstract class MainTask extends Task {
4 |
5 | @Override
6 | public boolean runOnMainThread() {
7 | return true;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/task/TaskCallBack.java:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.launchstarter.task;
2 |
3 | public interface TaskCallBack {
4 |
5 | void call();
6 | }
7 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/utils/DispatcherLog.java:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.launchstarter.utils;
2 |
3 | import android.util.Log;
4 |
5 | public class DispatcherLog {
6 |
7 | private static boolean sDebug = true;
8 |
9 | public static void i(String msg) {
10 | if (!sDebug) {
11 | return;
12 | }
13 | Log.i("task",msg);
14 | }
15 |
16 | public static boolean isDebug() {
17 | return sDebug;
18 | }
19 |
20 | public static void setDebug(boolean debug) {
21 | sDebug = debug;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/utils/SimpleTextWatcher.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.utils
2 |
3 | import android.text.Editable
4 | import android.text.TextWatcher
5 |
6 | open class SimpleTextWatcher : TextWatcher {
7 |
8 | override fun afterTextChanged(s: Editable?) {
9 |
10 | }
11 |
12 | override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
13 |
14 | }
15 |
16 | override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
17 | }
18 | }
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/widgets/navgation/CustomRadioButton.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.widgets.navgation
2 |
3 | import android.content.Context
4 | import android.graphics.Canvas
5 | import android.util.AttributeSet
6 | import android.view.Gravity
7 | import android.widget.RadioButton
8 |
9 | class CustomRadioButton @JvmOverloads constructor(context: Context, attributeSet: AttributeSet? = null) : RadioButton(context, attributeSet) {
10 |
11 |
12 | init {
13 |
14 | }
15 |
16 | override fun onDraw(canvas: Canvas?) {
17 | super.onDraw(canvas)
18 | val drawables = compoundDrawables
19 | val drawable = drawables[0]
20 | val gravity = gravity
21 | var left = 0
22 | if (gravity == Gravity.CENTER) {
23 | left = ((width - drawable.intrinsicWidth - paint.measureText(text.toString())) / 2).toInt()
24 | }
25 | drawable.setBounds(left, 0, left + drawable.intrinsicWidth, drawable.intrinsicHeight)
26 |
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/java/com/link/librarymodule/widgets/recyclerview/ItemDecoration.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule.widgets.recyclerview
2 |
3 | import android.content.res.Resources
4 | import android.graphics.Rect
5 | import android.view.View
6 | import androidx.recyclerview.widget.RecyclerView
7 |
8 | class ItemDecoration constructor(val left: Int, val top: Int, val right: Int, val bottom: Int) : RecyclerView.ItemDecoration() {
9 |
10 | fun dip(value: Int): Int = (value * Resources.getSystem().displayMetrics.density).toInt()
11 |
12 | override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
13 | outRect.set(dip(left), dip(top), dip(right), dip(bottom))
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/anim/news_bottom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/anim/news_bottom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/anim/slide_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/anim/slide_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/anim/slide_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/anim/slide_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_arrow_back_black.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_arrow_back_white.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_arrow_right_white.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_cross.xml:
--------------------------------------------------------------------------------
1 |
3 |
5 |
6 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_eye_open.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_lock.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_login_out.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_message_white.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_people.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_search.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/ic_settings_white.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/selector_classification_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/selector_find_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/selector_home_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/selector_mine_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/selector_shopping_cart_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_circle_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_10dp_orange_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_10dp_white_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_15dp_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_green_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_grey.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_grey_dark_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_grey_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_main_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_white_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_5dp_grey.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_5dp_grey_dark_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_5dp_grey_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_corner_5dp_main_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/drawable/shape_stroke_half_right_corner_15dp_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/layout/activity_container.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/layout/common_recycleview.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/layout/common_recycleview_refresh.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/layout/layout_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/layout/layout_news_flipper.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
20 |
21 |
25 |
26 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/layout/layout_state_base.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/mipmap-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/libraryarchitecture/src/main/res/mipmap-xhdpi/logo.png
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/mipmap-xxhdpi/icon_news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/libraryarchitecture/src/main/res/mipmap-xxhdpi/icon_news.png
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/mipmap-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/libraryarchitecture/src/main/res/mipmap-xxhdpi/logo.png
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/mipmap-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/libraryarchitecture/src/main/res/mipmap-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/values-v23/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ff6464
4 | #ffffff
5 | #ff6464
6 |
7 |
8 | #D3D3D3
9 | #F3F3F3
10 | #51CB7B
11 | #00FFFFFF
12 | #45000000
13 | #f5f5f5
14 | #d4d4d4
15 | #636363
16 |
17 |
18 | #000000
19 | #8a8a8a
20 | #333333
21 | #F76602
22 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 饭fan
3 |
4 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
17 |
18 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/libraryarchitecture/src/test/java/com/link/librarymodule/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.link.librarymodule;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/librarybase/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/librarybase/libs/dom4j-2.1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/librarybase/libs/dom4j-2.1.1.jar
--------------------------------------------------------------------------------
/librarybase/src/androidTest/java/com/link/librarybase/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.link.librarybase;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.link.librarybase.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/librarybase/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/librarybase/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LibraryBase
3 |
4 |
--------------------------------------------------------------------------------
/librarybase/src/test/java/com/link/librarybase/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.link.librarybase;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/librarycomponent/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/librarycomponent/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 | android {
5 |
6 | compileSdkVersion build_versions.compile_sdk
7 |
8 | defaultConfig libDefaultConfig
9 |
10 | compileOptions {
11 | targetCompatibility JavaVersion.VERSION_1_8
12 | sourceCompatibility JavaVersion.VERSION_1_8
13 | }
14 |
15 | }
16 |
17 | dependencies {
18 | api fileTree(dir: 'libs', include: ['*.jar'])
19 | api project(":libraryarchitecture")
20 | testImplementation 'junit:junit:4.12'
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/librarycomponent/src/androidTest/java/com/link/librarycomponent/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.link.librarycomponet.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/librarycomponent/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/AppConfig.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent
2 |
3 | open class AppConfig {
4 |
5 | companion object {
6 |
7 | val MAIN_MODULE = "com.link.component_main.MainApplication"
8 | val LOGIN_MODULE = "com.link.component_login.LoginApplication"
9 | val SPLASH_MODULE = "com.link.component_splash.SplashApplication"
10 | val USER_MODULE = "com.link.component_user.UserApplication"
11 |
12 | @JvmStatic
13 | val moduleApps = arrayOf(LOGIN_MODULE, SPLASH_MODULE,
14 | USER_MODULE, MAIN_MODULE)
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/entity/base/BaseEntity.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.entity.base
2 |
3 | data class BaseEntity(val resultcode: String, val reason: String,
4 | val error_code: Int, var result: T) {
5 |
6 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/entity/user/UserEntity.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.entity.user
2 |
3 | import cn.bmob.v3.BmobInstallation
4 | import cn.bmob.v3.BmobUser
5 | import cn.bmob.v3.datatype.BmobFile
6 |
7 |
8 | class UserEntity : BmobUser() {
9 |
10 |
11 | var pwd: String? = null
12 |
13 |
14 | var avatar: BmobFile? = null
15 |
16 |
17 | var introduction: String? = null
18 |
19 |
20 | var displayName: String? = null
21 |
22 |
23 | var device: BmobInstallation? = null
24 |
25 | //用户使用的设备
26 | class Installation : BmobInstallation() {
27 | var deviceOS: String? = null
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/router/RouterConstant.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.router
2 |
3 | class RouterConstant {
4 |
5 | companion object {
6 | //登录模块
7 | const val LOGIN = "/component_login/login"
8 | //入口
9 | const val APP = "/app/enter"
10 | //菜单
11 | const val MENU = "/component_menu/menu"
12 | //检索
13 | const val SEARCH = "/component_search/search"
14 | const val SEARCH_DETAIL = "/component_search/search_detail"
15 | //更新的service
16 | const val UPDATE_SERVICE = "/component_update/update_service"
17 | //商城
18 | const val SHOPPING="/component_shopping/shopping"
19 | //商城的service
20 | const val SHOPPING_SERVICE="/component_shopping/shopping_service"
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/router/SchemaFilterActivity.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.router
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import com.alibaba.android.arouter.launcher.ARouter
6 |
7 | /**
8 | * @author WJ
9 | * @date 2019-05-30
10 | *
11 | * 描述:监听Schame事件的activity
12 | */
13 | class SchemaFilterActivity : AppCompatActivity() {
14 |
15 | override fun onCreate(savedInstanceState: Bundle?) {
16 | super.onCreate(savedInstanceState)
17 | val uri = intent.data
18 | ARouter.getInstance()
19 | .build(uri)
20 | .navigation()
21 | finish()
22 | }
23 |
24 |
25 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/router/StartRouter.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.router
2 |
3 | import android.os.Bundle
4 | import com.alibaba.android.arouter.launcher.ARouter
5 |
6 | class StartRouter {
7 |
8 | companion object {
9 |
10 | @JvmStatic
11 | fun navigation(url: String) {
12 | ARouter.getInstance()
13 | .build(url)
14 | .navigation()
15 | }
16 |
17 | @JvmStatic
18 | fun navigation(url: String, bundle: Bundle) {
19 | ARouter.getInstance()
20 | .build(url)
21 | .with(bundle)
22 | .navigation()
23 | }
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/service/login/EmptyLoginService.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.service.login
2 |
3 | class EmptyLoginService : ILoginService {
4 | override fun isLogin(): Boolean {
5 | return false
6 | }
7 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/service/login/ILoginService.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.service.login
2 |
3 | interface ILoginService {
4 | fun isLogin():Boolean
5 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/service/main/EmptyMainService.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.service.main
2 |
3 | import android.os.Bundle
4 | import androidx.fragment.app.Fragment
5 |
6 | class EmptyMainService : IMainService {
7 |
8 | override fun newCatalogFragment(bundle: Bundle?): Fragment? {
9 | return null
10 | }
11 |
12 | override fun newFindFragment(bundle: Bundle?): Fragment? {
13 | return null
14 | }
15 |
16 | override fun newMainFragment(bundle: Bundle?): Fragment? {
17 | return null
18 | }
19 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/service/main/IMainService.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.service.main
2 |
3 | import android.os.Bundle
4 | import androidx.fragment.app.Fragment
5 |
6 | interface IMainService {
7 |
8 | fun newMainFragment(bundle: Bundle?):Fragment?
9 | fun newCatalogFragment(bundle: Bundle?):Fragment?
10 | fun newFindFragment(bundle: Bundle?):Fragment?
11 |
12 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/service/shopping/IShoppingService.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.service.shopping
2 |
3 | import com.alibaba.android.arouter.facade.template.IProvider
4 |
5 | interface IShoppingService:IProvider {
6 |
7 | fun startShoppingService()
8 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/service/update/IUpdateService.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.service.update
2 |
3 | import com.alibaba.android.arouter.facade.template.IProvider
4 |
5 | interface IUpdateService:IProvider {
6 |
7 | fun startUpdateService()
8 |
9 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/service/user/EmptyUserService.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.service.user
2 |
3 | import android.os.Bundle
4 | import androidx.fragment.app.Fragment
5 |
6 | class EmptyUserService :IUserService{
7 |
8 |
9 | override fun newUserFragment(bundle: Bundle?): Fragment? {
10 | return null
11 | }
12 |
13 |
14 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/java/com/link/librarycomponent/service/user/IUserService.kt:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent.service.user
2 |
3 | import android.os.Bundle
4 | import androidx.fragment.app.Fragment
5 |
6 | interface IUserService {
7 |
8 | fun newUserFragment(bundle: Bundle?):Fragment?
9 |
10 | }
--------------------------------------------------------------------------------
/librarycomponent/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LibraryComponet
3 |
4 |
--------------------------------------------------------------------------------
/librarycomponent/src/test/java/com/link/librarycomponent/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.link.librarycomponent;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | //include ':view_flip', ':general_statelayout', ':general_daemon','view_common',':general_network',':general_picture'
2 | include ':librarybase'
3 | include ':libraryarchitecture', ':librarycomponent'
4 |
5 | include ':component_login'
6 | include ':component_main'
7 | include ':component_search'
8 | include ':component_user'
9 | include ':component_menu'
10 | include ':component_update'
11 | include ':component_pay',':component_shopping'
12 | include ':app'
13 |
--------------------------------------------------------------------------------
/view_common/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/view_common/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 | apply plugin: 'kotlin-kapt'
5 | apply from: '../maven_push.gradle'
6 |
7 | android {
8 |
9 | compileSdkVersion build_versions.compile_sdk
10 |
11 | defaultConfig libDefaultConfig
12 |
13 | compileOptions {
14 | targetCompatibility JavaVersion.VERSION_1_8
15 | sourceCompatibility JavaVersion.VERSION_1_8
16 | }
17 |
18 | }
19 |
20 | dependencies {
21 | implementation fileTree(dir: 'libs', include: ['*.jar'])
22 | implementation deps.androidx.appcompat
23 | testImplementation 'junit:junit:4.12'
24 | }
25 |
--------------------------------------------------------------------------------
/view_common/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536m
2 |
3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/
4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/
5 | NAME=public
6 | PASSWORD=123456@qq.com
7 | VERSION=1.0.0
8 | POM_ARTIFACT_ID=viewCommon
9 | GROUP=com.link
--------------------------------------------------------------------------------
/view_common/src/androidTest/java/com/link/view_common/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.link.view_common;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.InstrumentationRegistry;
6 | import androidx.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getTargetContext();
24 |
25 | assertEquals("com.link.view_common.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/view_common/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/view_common/src/main/java/com/link/view_common/like/LikeViewAnimation.kt:
--------------------------------------------------------------------------------
1 | package com.link.view_common.like
2 |
3 | import android.widget.PopupWindow
4 |
5 | class LikeViewAnimation : PopupWindow() {
6 |
7 |
8 |
9 | }
--------------------------------------------------------------------------------
/view_common/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/view_common/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | View_Common
3 |
4 |
--------------------------------------------------------------------------------
/view_common/src/test/java/com/link/view_common/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.link.view_common;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/view_flip/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/view_flip/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 | apply plugin: 'kotlin-kapt'
5 | apply from: '../maven_push.gradle'
6 |
7 | android {
8 |
9 | compileSdkVersion build_versions.compile_sdk
10 |
11 | defaultConfig libDefaultConfig
12 |
13 | compileOptions {
14 | targetCompatibility JavaVersion.VERSION_1_8
15 | sourceCompatibility JavaVersion.VERSION_1_8
16 | }
17 |
18 | }
19 |
20 | dependencies {
21 | implementation fileTree(dir: 'libs', include: ['*.jar'])
22 | implementation deps.androidx.appcompat
23 | testImplementation 'junit:junit:4.12'
24 | }
25 |
--------------------------------------------------------------------------------
/view_flip/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536m
2 |
3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/
4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/
5 | NAME=public
6 | PASSWORD=123456@qq.com
7 | VERSION=1.0.0
8 | POM_ARTIFACT_ID=filpView
9 | GROUP=com.link
--------------------------------------------------------------------------------
/view_flip/src/androidTest/java/com/link/libraryflipview/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.link.libraryflipview;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.InstrumentationRegistry;
6 | import androidx.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getTargetContext();
24 |
25 | assertEquals("com.link.libraryflipview.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/view_flip/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/view_flip/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/view_flip/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LibraryFlipView
3 |
4 |
--------------------------------------------------------------------------------
/view_flip/src/test/java/com/link/libraryflipview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.link.libraryflipview;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------