forked from GraceJoJo/Designer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
开眼App模块构建:分类列表及详情接口调试、多个BaseUrl的场景处理、分类列表完成
- Loading branch information
Showing
49 changed files
with
856 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
package com.jojo.design.module_core.ui.home | ||
|
||
import android.os.Bundle | ||
import com.alibaba.android.arouter.launcher.ARouter | ||
import com.jojo.design.common_base.config.arouter.ARouterConfig | ||
import com.jojo.design.common_base.config.arouter.ARouterConstants | ||
import com.jojo.design.common_base.dagger.mvp.BaseContract | ||
import com.jojo.design.common_base.dagger.mvp.BaseFragment | ||
import com.jojo.design.common_ui.view.MultipleStatusView | ||
import com.jojo.design.module_core.R | ||
import com.will.weiyuekotlin.component.ApplicationComponent | ||
import kotlinx.android.synthetic.main.fra_discorvery.* | ||
|
||
/** | ||
* author : JOJO | ||
* e-mail : [email protected] | ||
* date : 2018/12/7 11:34 AM | ||
* desc : 我的(shoping) | ||
* desc : 发现 | ||
*/ | ||
class DiscoveryFragment : BaseFragment<BaseContract.BasePresenter, BaseContract.BaseModel>() { | ||
private var mTitle: String? = null | ||
|
@@ -46,6 +50,9 @@ class DiscoveryFragment : BaseFragment<BaseContract.BasePresenter, BaseContract. | |
} | ||
|
||
override fun startFragmentEvents() { | ||
|
||
tv.setOnClickListener { | ||
ARouter.getInstance().build(ARouterConfig.ACT_Category) | ||
.navigation() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<data> | ||
<include | ||
android:id="@+id/title" | ||
layout="@layout/common_title"></include> | ||
|
||
<variable | ||
name="user" | ||
type="com.jojo.design.common_base.bean.ErrorBean"></variable> | ||
</data> | ||
<TextView | ||
android:id="@+id/tv" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="发现" | ||
android:textColor="@color/color_212121" | ||
android:textSize="30sp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/title" /> | ||
|
||
<android.support.constraint.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<include | ||
android:id="@+id/title" | ||
layout="@layout/common_title"></include> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="发现" | ||
app:layout_constraintTop_toBottomOf="@+id/title" /> | ||
|
||
</android.support.constraint.ConstraintLayout> | ||
</layout> | ||
</android.support.constraint.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
if (Boolean.valueOf(rootProject.ext.isBuildModule)) { | ||
apply plugin: 'com.android.application' | ||
} else { | ||
apply plugin: 'com.android.library' | ||
} | ||
apply plugin: 'kotlin-android' | ||
//kotlin扩展插件,无需findViewbyId | ||
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: 'kotlin-kapt' | ||
//ARouter | ||
kapt { | ||
arguments { | ||
arg("moduleName", project.getName()) | ||
} | ||
generateStubs = true | ||
} | ||
android { | ||
compileSdkVersion rootProject.ext.android["compileSdkVersion"] | ||
buildToolsVersion rootProject.ext.android["buildToolsVersion"] | ||
defaultConfig { | ||
minSdkVersion rootProject.ext.android["minSdkVersion"] | ||
targetSdkVersion rootProject.ext.android["targetSdkVersion"] | ||
versionCode rootProject.ext.android["versionCode"] | ||
versionName rootProject.ext.android["versionName"] | ||
testInstrumentationRunner rootProject.ext.dependencies["androidJUnitRunner"] | ||
//MultiDex分包方法 | ||
multiDexEnabled true | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
//支持DataBinding | ||
dataBinding { | ||
enabled = true | ||
} | ||
|
||
//java插件引入了一个概念叫做SourceSets,通过修改SourceSets中的属性,可以指定哪些源文件 | ||
//( 或文件夹下的源文件 ) 要被编译 , 哪些源文件要被排除 。 | ||
sourceSets { | ||
main { | ||
if (Boolean.valueOf(rootProject.ext.isBuildModule)) { | ||
manifest.srcFile 'src/main/module/AndroidManifest.xml' | ||
} else { | ||
manifest.srcFile 'src/main/AndroidManifest.xml' | ||
java { | ||
//排除java/debug文件夹下的所有文件 | ||
exclude '*module' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation project(":common-base") | ||
implementation project(":common-ui") | ||
//ARouter | ||
kapt rootProject.ext.dependencies["arouter-compiler"] | ||
//解决Kotlin和DataBinding冲突 | ||
kapt "com.android.databinding:compiler:$android_version" | ||
//butterknife-compiler | ||
kapt rootProject.ext.dependencies["butterknife-compiler"] | ||
kapt rootProject.ext.dependencies["dagger-compiler"] | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Oops, something went wrong.