Skip to content

Commit c9a3d7d

Browse files
author
hegj
committed
1.修复bug体系-广场中的列表数据没有显示作者
2.修复部分tab,标题,文本数据显示了网页标签bug 3.修改体系中tab位置起始位左侧显示
1 parent 0bbde05 commit c9a3d7d

File tree

21 files changed

+84
-58
lines changed

21 files changed

+84
-58
lines changed

app/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,9 @@ dependencies {
104104
testImplementation rootProject.ext.dependencies["canary-release"]
105105
//kotlin
106106
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
107-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"
107+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.1"
108108
//项目用到的库大部分封装在里面 具体在 config.gradle
109109
implementation rootProject.ext.customLibs
110-
111-
implementation 'cn.simonlee.widget:swipeback:1.0.15'
112110
}
113111
repositories {
114112
mavenCentral()

app/src/main/java/me/hegj/wandroid/app/AppLifecyclesImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class AppLifecyclesImpl : AppLifecycles {
101101
val strategy = UserStrategy(context)
102102
strategy.isUploadProcess = processName == null || processName == packageName
103103
// 初始化Bugly
104-
Bugly.init(context, "5a5f6366fc", BuildConfig.DEBUG)
104+
Bugly.init(context, "xxxx", BuildConfig.DEBUG)
105105

106106
CaocConfig.Builder.create()
107107
.backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT) //default: CaocConfig.BACKGROUND_MODE_SHOW_CUSTOM

app/src/main/java/me/hegj/wandroid/app/utils/ShowUtils.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import android.view.Window
1111
import android.view.inputmethod.InputMethodManager
1212
import android.widget.Toast
1313
import com.afollestad.materialdialogs.MaterialDialog
14-
import com.afollestad.materialdialogs.WhichButton
15-
import com.afollestad.materialdialogs.actions.getActionButton
1614
import me.hegj.wandroid.R
1715

1816
object ShowUtils {
@@ -28,7 +26,7 @@ object ShowUtils {
2826
setCanceledOnTouchOutside(false)
2927
setProgressStyle(ProgressDialog.STYLE_SPINNER)
3028
setMessage("请求网络中...")
31-
val d = ClipDrawable(ColorDrawable(SettingUtil.getColor(context)), Gravity.LEFT, ClipDrawable.HORIZONTAL)
29+
val d = ClipDrawable(ColorDrawable(SettingUtil.getColor(context)), Gravity.START, ClipDrawable.HORIZONTAL)
3230
setProgressDrawable(d)
3331
show()
3432
}
@@ -109,9 +107,7 @@ object ShowUtils {
109107
* 隐藏toast
110108
*/
111109
fun hide() {
112-
toast?.let {
113-
it.cancel()
114-
}
110+
toast?.cancel()
115111
}
116112

117113

app/src/main/java/me/hegj/wandroid/mvp/model/entity/AriticleResponse.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ data class AriticleResponse(
2424
var publishTime: Long,
2525
var superChapterId: Int,
2626
var superChapterName: String,
27+
var shareUser: String,
2728
var tags: List<TagsResponse>,
2829
var title: String,
2930
var type: Int,

app/src/main/java/me/hegj/wandroid/mvp/presenter/main/home/HomePresenter.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import javax.inject.Inject
2121
import me.hegj.wandroid.mvp.contract.main.home.HomeContract
2222
import me.hegj.wandroid.mvp.model.entity.*
2323
import me.hegj.wandroid.mvp.ui.activity.web.WebviewActivity
24+
import me.hegj.wandroid.mvp.ui.adapter.AriticleAdapter
2425
import me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber
2526
import me.jessyan.rxerrorhandler.handler.RetryWithDelay
2627

@@ -51,6 +52,9 @@ constructor(model: HomeContract.Model, rootView: HomeContract.View) :
5152
@Inject
5253
lateinit var mAppManager: AppManager
5354

55+
@Inject
56+
lateinit var adapter: AriticleAdapter
57+
5458
/**
5559
* 获取首页banner数据
5660
*/

app/src/main/java/me/hegj/wandroid/mvp/ui/activity/main/home/search/SearchActivity.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package me.hegj.wandroid.mvp.ui.activity.main.home.search
22

33
import android.content.Intent
44
import android.os.Bundle
5+
import android.text.Html
56
import android.view.LayoutInflater
67
import android.view.Menu
78
import android.view.View
@@ -175,7 +176,7 @@ class SearchActivity : BaseActivity<SearchPresenter>(), SearchContract.View {
175176
override fun getView(parent: FlowLayout?, position: Int, hotSearchBean: SearchResponse?): View {
176177
return LayoutInflater.from(parent?.context).inflate(R.layout.flow_layout, search_flowlayout, false)
177178
.apply {
178-
flow_tag.text = hotSearchBean?.name
179+
flow_tag.text = Html.fromHtml(hotSearchBean?.name)
179180
flow_tag.setTextColor(ColorUtil.randomColor())
180181
}
181182
}

app/src/main/java/me/hegj/wandroid/mvp/ui/activity/main/project/ProjectFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package me.hegj.wandroid.mvp.ui.activity.main.project
33
import android.content.Context
44
import android.graphics.Color
55
import android.os.Bundle
6+
import android.text.Html
67
import android.view.LayoutInflater
78
import android.view.View
89
import android.view.ViewGroup
@@ -93,7 +94,7 @@ class ProjectFragment : BaseFragment<ProjectPresenter>(), ProjectContract.View {
9394

9495
override fun getTitleView(context: Context, index: Int): IPagerTitleView {
9596
return ScaleTransitionPagerTitleView(context).apply {
96-
text = mDataList[index].name
97+
text = Html.fromHtml(mDataList[index].name)
9798
textSize = 17f
9899
normalColor = Color.WHITE
99100
selectedColor = Color.WHITE

app/src/main/java/me/hegj/wandroid/mvp/ui/activity/main/publicNumber/PublicFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package me.hegj.wandroid.mvp.ui.activity.main.publicNumber
33
import android.content.Context
44
import android.graphics.Color
55
import android.os.Bundle
6+
import android.text.Html
67
import android.view.LayoutInflater
78
import android.view.View
89
import android.view.ViewGroup
@@ -91,7 +92,7 @@ class PublicFragment : BaseFragment<PublicPresenter>(), PublicContract.View {
9192

9293
override fun getTitleView(context: Context, index: Int): IPagerTitleView {
9394
return ScaleTransitionPagerTitleView(context).apply {
94-
text = mDataList[index].name
95+
text = Html.fromHtml(mDataList[index].name)
9596
textSize = 17f
9697
normalColor = Color.WHITE
9798
selectedColor = Color.WHITE

app/src/main/java/me/hegj/wandroid/mvp/ui/activity/main/tree/treeinfo/TreeInfoActivity.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import android.annotation.SuppressLint
44
import android.content.Context
55
import android.graphics.Color
66
import android.os.Bundle
7+
import android.text.Html
78
import android.view.animation.AccelerateInterpolator
89
import android.view.animation.DecelerateInterpolator
910
import com.jess.arms.di.component.AppComponent
1011
import com.jess.arms.mvp.IPresenter
1112
import kotlinx.android.synthetic.main.include_toolbar.*
12-
import kotlinx.android.synthetic.main.include_viewpager.*
13+
import kotlinx.android.synthetic.main.include_viewpagerleft.*
1314
import me.hegj.wandroid.R
1415
import me.hegj.wandroid.app.utils.SettingUtil
1516
import me.hegj.wandroid.app.weight.ScaleTransitionPagerTitleView
@@ -72,7 +73,7 @@ class TreeInfoActivity : BaseActivity<IPresenter>() {
7273

7374
override fun getTitleView(context: Context, index: Int): IPagerTitleView {
7475
return ScaleTransitionPagerTitleView(context).apply {
75-
text = systemResponse.children[index].name
76+
text = Html.fromHtml(systemResponse.children[index].name)
7677
textSize = 17f
7778
normalColor = Color.WHITE
7879
selectedColor = Color.WHITE

app/src/main/java/me/hegj/wandroid/mvp/ui/activity/main/tree/treeinfo/TreeinfoFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class TreeinfoFragment : BaseFragment<TreeinfoPresenter>(), TreeinfoContract.Vie
100100
}
101101

102102
//初始化adapter
103-
adapter = AriticleAdapter(arrayListOf()).apply {
103+
adapter = AriticleAdapter(arrayListOf(),true).apply {
104104
if (SettingUtil.getListMode(_mActivity) != 0) {
105105
openLoadAnimation(SettingUtil.getListMode(_mActivity))
106106
} else {

0 commit comments

Comments
 (0)