Skip to content

Commit 6601cf9

Browse files
committed
update kotlin version and android libs
1 parent 1aa5ae2 commit 6601cf9

File tree

14 files changed

+5189
-82
lines changed

14 files changed

+5189
-82
lines changed
597 Bytes
Binary file not shown.

.idea/codeStyles/Project.xml

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 4 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ android {
1515
storePassword 'ktmp123456'
1616
}
1717
}
18-
compileSdkVersion 26
18+
compileSdkVersion rootProject.ext.android.compileSdkVersion
1919
defaultConfig {
2020
applicationId "com.hazz.kotlinmvp"
2121
minSdkVersion rootProject.ext.android.minSdkVersion
2222
targetSdkVersion rootProject.ext.android.targetSdkVersion
23-
versionCode 5
24-
versionName "1.2.2"
23+
versionCode rootProject.ext.android.versionCode
24+
versionName rootProject.ext.android.versionName
2525
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2626
javaCompileOptions {
2727
annotationProcessorOptions {
@@ -70,17 +70,19 @@ android {
7070
}
7171

7272

73-
7473
dexOptions {
7574
jumboMode true
7675
}
7776
}
7877

78+
kapt {
79+
generateStubs = true
80+
}
7981

8082
dependencies {
8183
implementation fileTree(include: ['*.jar'], dir: 'libs')
8284
testImplementation 'junit:junit:4.12'
83-
androidTestImplementation 'com.android.support.test:runner:1.0.1'
85+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
8486
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1') {
8587
exclude group: 'com.android.support', module: 'support-annotations'
8688
}
@@ -94,13 +96,12 @@ dependencies {
9496
// APT dependencies(Kotlin内置的注解处理器)
9597
kapt rootProject.ext.annotationProcessorLibs
9698

97-
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
9899
// 底部菜单
99100
implementation('com.flyco.tablayout:FlycoTabLayout_Lib:2.1.0@aar') {
100101
exclude group: 'com.android.support', module: 'support-v4'
101102
}
102103
//kotlin 支持库
103-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
104+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
104105
//GlideOkHttp
105106
implementation(rootProject.ext.glideOkhttp) {
106107
exclude group: 'glide-parent'
@@ -109,7 +110,7 @@ dependencies {
109110
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.3'
110111
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.0.3'
111112
//Banner
112-
implementation 'cn.bingoogolapple:bga-banner:2.1.8@aar'
113+
implementation 'cn.bingoogolapple:bga-banner:2.2.4@aar'
113114
// 视屏播放器
114115
implementation 'com.shuyu:GSYVideoPlayer:2.1.1'
115116
//Logger

app/src/main/java/com/hazz/kotlinmvp/MyApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MyApplication : Application(){
4141
override fun onCreate() {
4242
super.onCreate()
4343
context = applicationContext
44-
refWatcher = setupLeakCanary()
44+
// refWatcher = setupLeakCanary()
4545
initConfig()
4646
DisplayManager.init(this)
4747
registerActivityLifecycleCallbacks(mActivityLifecycleCallbacks)

app/src/main/java/com/hazz/kotlinmvp/mvp/model/CategoryDetailModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CategoryDetailModel {
1414
/**
1515
* 获取分类下的 List 数据
1616
*/
17-
fun getCategoryDetailList(id: Long): Observable<HomeBean.Issue> {
17+
fun getCategoryDetailList(id: Long): Observable<HomeBean.Issue> {
1818
return RetrofitManager.service.getCategoryDetailList(id)
1919
.compose(SchedulerUtils.ioToMain())
2020
}

app/src/main/java/com/hazz/kotlinmvp/ui/activity/WatchHistoryActivity.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ class WatchHistoryActivity : BaseActivity() {
4444
mRecyclerView.layoutManager = LinearLayoutManager(this)
4545
mRecyclerView.adapter = mAdapter
4646

47-
if(itemListData.size>1){
47+
if (itemListData.size > 0) {
4848
multipleStatusView.showContent()
49-
}else{
49+
} else {
5050
multipleStatusView.showEmpty()
5151
}
5252

5353
//状态栏透明和间距处理
5454
StatusBarUtil.darkMode(this)
5555
StatusBarUtil.setPaddingSmart(this, toolbar)
56-
StatusBarUtil.setPaddingSmart(this,mRecyclerView)
56+
StatusBarUtil.setPaddingSmart(this, mRecyclerView)
5757

5858
}
5959

@@ -64,9 +64,9 @@ class WatchHistoryActivity : BaseActivity() {
6464
/**
6565
* 查询观看的历史记录
6666
*/
67-
private fun queryWatchHistory():ArrayList<HomeBean.Issue.Item> {
67+
private fun queryWatchHistory(): ArrayList<HomeBean.Issue.Item> {
6868
val watchList = ArrayList<HomeBean.Issue.Item>()
69-
val hisAll = WatchHistoryUtils.getAll(Constants.FILE_WATCH_HISTORY_NAME,MyApplication.context) as Map<*, *>
69+
val hisAll = WatchHistoryUtils.getAll(Constants.FILE_WATCH_HISTORY_NAME, MyApplication.context) as Map<*, *>
7070
//将key排序升序
7171
val keys = hisAll.keys.toTypedArray()
7272
Arrays.sort(keys)
@@ -75,7 +75,7 @@ class WatchHistoryActivity : BaseActivity() {
7575
val hisLength = if (keyLength > HISTORY_MAX) HISTORY_MAX else keyLength
7676
// 反序列化和遍历 添加观看的历史记录
7777
(1..hisLength).mapTo(watchList) {
78-
WatchHistoryUtils.getObject(Constants.FILE_WATCH_HISTORY_NAME,MyApplication.context,
78+
WatchHistoryUtils.getObject(Constants.FILE_WATCH_HISTORY_NAME, MyApplication.context,
7979
keys[keyLength - it] as String) as HomeBean.Issue.Item
8080
}
8181

app/src/main/java/com/hazz/kotlinmvp/utils/WatchHistoryUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class WatchHistoryUtils {
277277
return editor.commit()
278278
}
279279
val baos = ByteArrayOutputStream()
280-
var oos: ObjectOutputStream? = null
280+
var oos: ObjectOutputStream?
281281
try {
282282
oos = ObjectOutputStream(baos)
283283
oos.writeObject(`object`)

app/src/main/res/layout/item_home_banner.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
android:layout_width="match_parent"
1111
android:layout_height="230dp"
1212
android:scaleType="fitXY"
13-
app:banner_indicatorGravity="bottom|right"
13+
app:banner_indicatorGravity="bottom|center_horizontal"
1414
app:banner_placeholderDrawable="@drawable/placeholder_banner"
15-
app:banner_tipTextSize="@dimen/textSize_titleSmall"
15+
app:banner_pointAutoPlayInterval="3000"
1616
app:banner_tipTextColor="@color/color_title_bg"
17-
app:banner_transitionEffect="alpha"/>
17+
app:banner_tipTextSize="@dimen/textSize_titleSmall"
18+
app:banner_transitionEffect="alpha" />
1819

1920
</LinearLayout>

0 commit comments

Comments
 (0)