(R.id.cb_setting)
46 | when (entity.itemMultiPosition) {
47 | 0 -> tagCheckBox.isChecked = holder.getContext().opTagBoolean()
48 | 1 -> tagCheckBox.isChecked = holder.getContext().opUriWebBoolean()
49 | 2 -> tagCheckBox.isChecked = holder.getContext().opaTagBoolean()
50 | 3 -> tagCheckBox.isChecked = holder.getContext().opaUriWebBoolean()
51 | 4 -> tagCheckBox.isChecked = holder.getContext().blogTagBoolean()
52 | }
53 | holder.itemView.setOnClickListener {
54 | it.settingItemClick(entity.itemMultiPosition, tagCheckBox.isChecked)
55 | tagCheckBox.isChecked = !tagCheckBox.isChecked
56 | }
57 | }
58 | }
59 | }
60 | }
61 |
62 | override fun onOptionsItemSelected(item: MenuItem): Boolean {
63 | if (item.itemId == android.R.id.home) {
64 | finish()
65 | }
66 | return super.onOptionsItemSelected(item)
67 | }
68 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/base/BaseActivity.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.base
2 |
3 | import android.os.Bundle
4 | import android.text.TextUtils
5 | import android.view.MenuItem
6 | import android.view.View
7 | import androidx.appcompat.app.AppCompatActivity
8 | import com.android.status.layout.OnEmptyClick
9 | import com.android.status.layout.OnErrorClick
10 | import com.android.status.layout.addSuccessView
11 | import com.codekk.databinding.ActivityBaseBinding
12 |
13 | /**
14 | * by y on 2017/5/16
15 | */
16 | abstract class BaseActivity>(val layout: Int) : AppCompatActivity() {
17 |
18 | protected val bundle: Bundle? by lazy { intent.extras }
19 |
20 | protected val mPresenter by lazy { initPresenter() }
21 |
22 | protected val baseViewBind: ActivityBaseBinding by lazy { ActivityBaseBinding.inflate(layoutInflater) }
23 |
24 | override fun onCreate(savedInstanceState: Bundle?) {
25 | super.onCreate(savedInstanceState)
26 | setContentView(baseViewBind.root)
27 | if (layout != View.NO_ID) {
28 | baseViewBind.statusLayout.addSuccessView(layout)
29 | } else {
30 | viewBindCreate(savedInstanceState)
31 | }
32 | baseViewBind.statusLayout
33 | .OnEmptyClick { clickNetWork() }
34 | .OnErrorClick { clickNetWork() }
35 | bundle?.let { initBundle(it) }
36 | initCreate(savedInstanceState)
37 | if (!TextUtils.equals(javaClass.simpleName, "MainActivity")) {
38 | supportActionBar?.setDisplayHomeAsUpEnabled(true)
39 | }
40 | }
41 |
42 | protected abstract fun initPresenter(): P
43 |
44 | protected abstract fun initCreate(savedInstanceState: Bundle?)
45 |
46 | protected open fun initBundle(bundle: Bundle) {
47 | }
48 |
49 | protected open fun viewBindCreate(savedInstanceState: Bundle?) {
50 | }
51 |
52 | protected open fun clickNetWork() {}
53 |
54 | override fun onOptionsItemSelected(item: MenuItem): Boolean {
55 | if (item.itemId == android.R.id.home) {
56 | finish()
57 | }
58 | return super.onOptionsItemSelected(item)
59 | }
60 |
61 | override fun onDestroy() {
62 | super.onDestroy()
63 | mPresenter.onDestroy()
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/base/BaseFragment.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.base
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import androidx.fragment.app.Fragment
8 | import com.android.status.layout.*
9 | import com.codekk.R
10 | import com.codekk.ext.success
11 | import io.reactivex.network.RxBus
12 | import io.reactivex.network.RxBusCallBack
13 |
14 | /**
15 | * by y on 2017/5/16
16 | */
17 | abstract class BaseFragment
>(val layout: Int) : Fragment(), RxBusCallBack {
18 |
19 | protected lateinit var mStatusView: StatusLayout
20 | protected val mPresenter by lazy { initPresenter() }
21 | protected var page: Int = 0
22 |
23 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
24 | if (!::mStatusView.isInitialized) {
25 | mStatusView = StatusLayout(inflater.context)
26 | mStatusView.addEmptyView(R.layout.layout_status_empty)
27 | mStatusView.addErrorView(R.layout.layout_status_error)
28 | if (layout != View.NO_ID) {
29 | mStatusView.addSuccessView(layout)
30 | } else {
31 | viewBindCreate(savedInstanceState)
32 | }
33 | mStatusView.success()
34 | mStatusView
35 | .OnEmptyClick { clickNetWork() }
36 | .OnErrorClick { clickNetWork() }
37 | }
38 | RxBus.instance.register(javaClass.simpleName, this)
39 | return mStatusView
40 | }
41 |
42 | override fun onActivityCreated(savedInstanceState: Bundle?) {
43 | super.onActivityCreated(savedInstanceState)
44 | initActivityCreated()
45 | }
46 |
47 | protected open fun viewBindCreate(savedInstanceState: Bundle?) {
48 | }
49 |
50 | protected abstract fun initActivityCreated()
51 |
52 | protected abstract fun initPresenter(): P
53 |
54 | protected open fun clickNetWork() {}
55 |
56 | override fun busOfType(): Class {
57 | return Any::class.java
58 | }
59 |
60 | override fun onDestroyView() {
61 | super.onDestroyView()
62 | RxBus.instance.unregister(javaClass.simpleName)
63 | mPresenter.onDestroy()
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/base/BaseListView.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.base
2 |
3 | interface BaseListView : BaseView {
4 | fun noMore()
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/base/BasePresenterImpl.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.base
2 |
3 | import io.reactivex.network.RxNetWorkListener
4 |
5 | /**
6 | * by y on 2017/5/16
7 | */
8 | abstract class BasePresenterImpl, M>(var view: V?) : RxNetWorkListener {
9 |
10 | override fun onNetWorkStart() {
11 | view?.showProgress()
12 | }
13 |
14 | override fun onNetWorkError(e: Throwable) {
15 | view?.hideProgress()
16 | view?.netWorkError(e)
17 | }
18 |
19 | override fun onNetWorkComplete() {
20 | view?.hideProgress()
21 | }
22 |
23 | override fun onNetWorkSuccess(data: M) {
24 | view?.netWorkSuccess(data)
25 | }
26 |
27 | open fun onDestroy() {
28 | if (view != null)
29 | view = null
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/base/BaseView.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.base
2 |
3 | /**
4 | * by y on 2017/5/16
5 | */
6 | interface BaseView {
7 |
8 | fun showProgress()
9 |
10 | fun hideProgress()
11 |
12 | fun netWorkSuccess(entity: T)
13 |
14 | fun netWorkError(throwable: Throwable)
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/base/BaseViewBindActivity.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.base
2 |
3 | import android.os.Bundle
4 | import android.view.View
5 | import androidx.viewbinding.ViewBinding
6 |
7 | abstract class BaseViewBindActivity> : BaseActivity(View.NO_ID) {
8 |
9 | protected val viewBind by lazy { initViewBind() }
10 |
11 | override fun viewBindCreate(savedInstanceState: Bundle?) {
12 | baseViewBind.statusLayout.addView(viewBind.root)
13 | }
14 |
15 | protected abstract fun initViewBind(): BIND
16 |
17 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/base/BaseViewBindFragment.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.base
2 |
3 | import android.os.Bundle
4 | import android.view.View
5 | import androidx.viewbinding.ViewBinding
6 | import com.android.status.layout.addSuccessView
7 |
8 | abstract class BaseViewBindFragment> : BaseFragment(View.NO_ID) {
9 |
10 | protected val viewBind by lazy { initViewBind() }
11 |
12 | override fun viewBindCreate(savedInstanceState: Bundle?) {
13 | super.viewBindCreate(savedInstanceState)
14 | mStatusView.addSuccessView(viewBind.root)
15 | }
16 |
17 | protected abstract fun initViewBind(): BIND
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/base/ViewBindActivity.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.base
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import androidx.viewbinding.ViewBinding
6 |
7 | abstract class ViewBindActivity : AppCompatActivity() {
8 |
9 | protected val viewBind by lazy { initViewBind() }
10 |
11 | override fun onCreate(savedInstanceState: Bundle?) {
12 | super.onCreate(savedInstanceState)
13 | setContentView(viewBind.root)
14 | }
15 |
16 | protected abstract fun initViewBind(): BIND
17 |
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/fragment/BlogListFragment.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.fragment
2 |
3 | import android.view.View
4 | import androidx.recyclerview.widget.LinearLayoutManager
5 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
6 | import com.codekk.Constant
7 | import com.codekk.R
8 | import com.codekk.databinding.LayoutListBinding
9 | import com.codekk.ext.*
10 | import com.codekk.mvp.presenter.impl.BlogListPresenterImpl
11 | import com.codekk.mvp.view.BlogListView
12 | import com.codekk.ui.activity.OpSearchActivity
13 | import com.codekk.ui.activity.ReadmeActivity
14 | import com.codekk.ui.base.BaseViewBindFragment
15 | import com.codekk.ui.widget.LoadMoreRecyclerView
16 | import com.google.android.flexbox.FlexboxLayout
17 | import com.xadapter.*
18 | import com.xadapter.adapter.XAdapter
19 | import com.xadapter.holder.XViewHolder
20 | import org.jetbrains.anko.support.v4.startActivity
21 |
22 | /**
23 | * by y on 2017/5/19
24 | */
25 | class BlogListFragment : BaseViewBindFragment(), SwipeRefreshLayout.OnRefreshListener, BlogListView, LoadMoreRecyclerView.LoadMoreListener {
26 |
27 | private val mAdapter by lazy { XAdapter() }
28 |
29 | override fun initViewBind(): LayoutListBinding {
30 | return LayoutListBinding.inflate(layoutInflater)
31 | }
32 |
33 | override fun initPresenter(): BlogListPresenterImpl {
34 | return BlogListPresenterImpl(this)
35 | }
36 |
37 | override fun initActivityCreated() {
38 | viewBind.recyclerView.setHasFixedSize(true)
39 | viewBind.recyclerView.layoutManager = LinearLayoutManager(activity)
40 | viewBind.recyclerView.setLoadingListener(this) //一页显示,不用分页
41 |
42 | viewBind.recyclerView.adapter = mAdapter
43 | .setItemLayoutId(R.layout.item_blog_list)
44 | .setOnItemClickListener { _, _, info ->
45 | startActivity(
46 | ReadmeActivity.KEY to arrayOf(info.id, info.authorName),
47 | ReadmeActivity.TYPE to Constant.TYPE_BLOG
48 | )
49 | }
50 | .setOnBind { holder, _, entity ->
51 | onXBind(holder, entity)
52 | }
53 |
54 | viewBind.refreshLayout.setOnRefreshListener(this)
55 | viewBind.refreshLayout.post { this.onRefresh() }
56 | }
57 |
58 | override fun clickNetWork() {
59 | super.clickNetWork()
60 | if (!viewBind.refreshLayout.isRefreshing) {
61 | onRefresh()
62 | }
63 | }
64 |
65 | override fun onRefresh() {
66 | page = 1
67 | mStatusView.success()
68 | mPresenter.netWorkRequest(page)
69 | }
70 |
71 | override fun onLoadMore() {
72 | if (viewBind.refreshLayout.isRefreshing) {
73 | return
74 | }
75 | mPresenter.netWorkRequest(page)
76 | }
77 |
78 | override fun showProgress() {
79 | viewBind.refreshLayout.isRefreshing = true
80 | }
81 |
82 | override fun hideProgress() {
83 | viewBind.refreshLayout.isRefreshing = false
84 | }
85 |
86 | override fun netWorkSuccess(entity: BlogListModel) {
87 | if (page == 1) {
88 | mAdapter.removeAll()
89 | }
90 | page += 1
91 | mAdapter.addAll(entity.blogList)
92 | }
93 |
94 | override fun netWorkError(throwable: Throwable) {
95 | if (page == 1) {
96 | mStatusView.error()
97 | mAdapter.removeAll()
98 | } else {
99 | mStatusView.snackBar(R.string.net_error)
100 | }
101 | }
102 |
103 | override fun noMore() {
104 | if (page == 1) {
105 | mStatusView.empty()
106 | mAdapter.removeAll()
107 | } else {
108 | mStatusView.snackBar(R.string.data_empty)
109 | }
110 | }
111 |
112 | private fun onXBind(holder: XViewHolder, summaryArrayBean: BlogListBean) {
113 | holder.setText(R.id.tv_blog_title, summaryArrayBean.title)
114 | holder.setText(R.id.tv_blog_summary, summaryArrayBean.summary)
115 | val flexboxLayout = holder.findById(R.id.fl_box)
116 | if (holder.getContext().blogTagBoolean()) {
117 | flexboxLayout.visibility = View.VISIBLE
118 | flexboxLayout.tags(summaryArrayBean.tagList) {
119 | startActivity(OpSearchActivity.TEXT_KEY to it)
120 | }
121 | } else {
122 | flexboxLayout.visibility = View.GONE
123 | }
124 | }
125 |
126 | override fun onBusNext(entity: Any) {
127 | mAdapter.notifyDataSetChanged()
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/fragment/JobListFragment.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.fragment
2 |
3 | import android.text.TextUtils
4 | import androidx.recyclerview.widget.LinearLayoutManager
5 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
6 | import com.codekk.Constant
7 | import com.codekk.R
8 | import com.codekk.databinding.LayoutListBinding
9 | import com.codekk.ext.*
10 | import com.codekk.mvp.presenter.impl.JobListPresenterImpl
11 | import com.codekk.mvp.view.JobListView
12 | import com.codekk.ui.activity.ReadmeActivity
13 | import com.codekk.ui.base.BaseViewBindFragment
14 | import com.codekk.ui.widget.LoadMoreRecyclerView
15 | import com.xadapter.*
16 | import com.xadapter.adapter.XAdapter
17 | import com.xadapter.holder.XViewHolder
18 | import org.jetbrains.anko.support.v4.startActivity
19 |
20 | /**
21 | * by y on 2017/5/18.
22 | */
23 | class JobListFragment : BaseViewBindFragment(), SwipeRefreshLayout.OnRefreshListener, JobListView, LoadMoreRecyclerView.LoadMoreListener {
24 |
25 | private val mAdapter by lazy { XAdapter() }
26 |
27 | override fun initViewBind(): LayoutListBinding {
28 | return LayoutListBinding.inflate(layoutInflater)
29 | }
30 |
31 | override fun initPresenter(): JobListPresenterImpl {
32 | return JobListPresenterImpl(this)
33 | }
34 |
35 | override fun initActivityCreated() {
36 | viewBind.recyclerView.setHasFixedSize(true)
37 | viewBind.recyclerView.layoutManager = LinearLayoutManager(activity)
38 | viewBind.recyclerView.setLoadingListener(this)
39 |
40 | viewBind.recyclerView.adapter = mAdapter
41 | .setItemLayoutId(R.layout.item_job_list)
42 | .setOnItemClickListener { _, _, info ->
43 | startActivity(
44 | ReadmeActivity.KEY to arrayOf(info.id, info.authorName),
45 | ReadmeActivity.TYPE to Constant.TYPE_JOB
46 | )
47 | }
48 | .setOnBind { holder, _, entity -> onXBind(holder, entity) }
49 |
50 | viewBind.refreshLayout.setOnRefreshListener(this)
51 | viewBind.refreshLayout.post { this.onRefresh() }
52 | }
53 |
54 | override fun clickNetWork() {
55 | super.clickNetWork()
56 | if (!viewBind.refreshLayout.isRefreshing) {
57 | onRefresh()
58 | }
59 | }
60 |
61 | override fun onRefresh() {
62 | mStatusView.success()
63 | page = 1
64 | mPresenter.netWorkRequest(page)
65 | }
66 |
67 | override fun onLoadMore() {
68 | if (viewBind.refreshLayout.isRefreshing) {
69 | return
70 | }
71 | mPresenter.netWorkRequest(page)
72 | }
73 |
74 | override fun showProgress() {
75 | viewBind.refreshLayout.isRefreshing = true
76 | }
77 |
78 | override fun hideProgress() {
79 | viewBind.refreshLayout.isRefreshing = false
80 | }
81 |
82 | override fun netWorkSuccess(entity: JobListModel) {
83 | if (page == 1) {
84 | mAdapter.removeAll()
85 | }
86 | page += 1
87 | mAdapter.addAll(entity.jobList)
88 | }
89 |
90 | override fun netWorkError(throwable: Throwable) {
91 | if (page == 1) {
92 | mStatusView.error()
93 | mAdapter.removeAll()
94 | } else {
95 | mStatusView.snackBar(R.string.net_error)
96 | }
97 | }
98 |
99 | override fun noMore() {
100 | if (page == 1) {
101 | mStatusView.empty()
102 | mAdapter.removeAll()
103 | } else {
104 | mStatusView.snackBar(R.string.data_empty)
105 | }
106 | }
107 |
108 | private fun onXBind(holder: XViewHolder, summaryArrayBean: JobListBean) {
109 | holder.setText(R.id.tv_job_title, TextUtils.concat(summaryArrayBean.authorName))
110 | holder.setText(R.id.tv_job_address, TextUtils.concat("地点:", summaryArrayBean.authorCity))
111 | holder.setText(R.id.tv_job_expiredTime, TextUtils.concat("截止时间:", summaryArrayBean.expiredTime))
112 | holder.setText(R.id.tv_job_summary, TextUtils.concat(summaryArrayBean.summary))
113 | }
114 |
115 | override fun onBusNext(entity: Any) {
116 | mAdapter.notifyDataSetChanged()
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/fragment/OpListFragment.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.fragment
2 |
3 | import android.text.TextUtils
4 | import android.text.util.Linkify
5 | import android.view.Menu
6 | import android.view.MenuInflater
7 | import android.view.MenuItem
8 | import android.view.View
9 | import androidx.appcompat.widget.AppCompatTextView
10 | import androidx.core.os.bundleOf
11 | import androidx.core.text.parseAsHtml
12 | import androidx.recyclerview.widget.LinearLayoutManager
13 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
14 | import com.codekk.Constant
15 | import com.codekk.R
16 | import com.codekk.databinding.LayoutListBinding
17 | import com.codekk.ext.*
18 | import com.codekk.mvp.presenter.impl.OpPresenterImpl
19 | import com.codekk.mvp.view.OpListView
20 | import com.codekk.ui.activity.OpSearchActivity
21 | import com.codekk.ui.activity.ReadmeActivity
22 | import com.codekk.ui.base.BaseViewBindFragment
23 | import com.codekk.ui.widget.LoadMoreRecyclerView
24 | import com.google.android.flexbox.FlexboxLayout
25 | import com.xadapter.*
26 | import com.xadapter.adapter.XAdapter
27 | import com.xadapter.holder.XViewHolder
28 | import org.jetbrains.anko.support.v4.startActivity
29 |
30 | /**
31 | * by y on 2017/5/16
32 | */
33 | class OpListFragment : BaseViewBindFragment(), SwipeRefreshLayout.OnRefreshListener, OpListView, LoadMoreRecyclerView.LoadMoreListener {
34 |
35 | companion object {
36 | fun get(text: String): OpListFragment {
37 | return OpListFragment().apply {
38 | arguments = bundleOf(
39 | OpSearchActivity.TEXT_KEY to text
40 | )
41 | }
42 | }
43 | }
44 |
45 | private val mAdapter by lazy { XAdapter() }
46 | private val searchText by lazy { arguments?.getString(OpSearchActivity.TEXT_KEY, "").orEmpty() }
47 |
48 | override fun initViewBind(): LayoutListBinding {
49 | return LayoutListBinding.inflate(layoutInflater)
50 | }
51 |
52 | override fun initPresenter(): OpPresenterImpl = OpPresenterImpl(this)
53 |
54 | override fun initActivityCreated() {
55 | setHasOptionsMenu(true)
56 | viewBind.recyclerView.setHasFixedSize(true)
57 | viewBind.recyclerView.layoutManager = LinearLayoutManager(activity)
58 | viewBind.recyclerView.setLoadingListener(this)
59 |
60 | viewBind.recyclerView.adapter = mAdapter
61 | .setItemLayoutId(R.layout.item_op_list)
62 | .setOnItemClickListener { _, _, info ->
63 | startActivity(ReadmeActivity.KEY to arrayOf(info.id, info.projectName, info.projectUrl), ReadmeActivity.TYPE to Constant.TYPE_OP)
64 | }
65 | .setOnBind { holder, _, entity -> onXBind(holder, entity) }
66 |
67 | viewBind.refreshLayout.setOnRefreshListener(this)
68 | viewBind.refreshLayout.post { this.onRefresh() }
69 | activity?.findViewById(R.id.toolbar)?.setOnClickListener { viewBind.recyclerView.smoothScrollToPosition(0) }
70 | }
71 |
72 | override fun clickNetWork() {
73 | super.clickNetWork()
74 | if (!viewBind.refreshLayout.isRefreshing) {
75 | onRefresh()
76 | }
77 | }
78 |
79 | override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
80 | if (searchText.isEmpty()) {
81 | inflater.inflate(R.menu.search_menu, menu)
82 | }
83 | super.onCreateOptionsMenu(menu, inflater)
84 | }
85 |
86 | override fun onOptionsItemSelected(item: MenuItem): Boolean {
87 | activity?.let {
88 | return when (item.itemId) {
89 | R.id.open_search -> {
90 | it.openSearch(R.string.search_op_hint) { s -> startActivity(OpSearchActivity.TEXT_KEY to s) }
91 | return true
92 | }
93 | else -> super.onOptionsItemSelected(item)
94 | }
95 | } ?: return super.onOptionsItemSelected(item)
96 | }
97 |
98 | override fun onRefresh() {
99 | mStatusView.success()
100 | page = 1
101 | if (searchText.isEmpty()) {
102 | mPresenter.netWorkRequestList(page)
103 | } else {
104 | mPresenter.netWorkRequestSearch(searchText, page)
105 | }
106 | }
107 |
108 | override fun onLoadMore() {
109 | if (viewBind.refreshLayout.isRefreshing) {
110 | return
111 | }
112 | if (searchText.isEmpty()) {
113 | mPresenter.netWorkRequestList(page)
114 | } else {
115 | mPresenter.netWorkRequestSearch(searchText, page)
116 | }
117 | }
118 |
119 | override fun showProgress() {
120 | viewBind.refreshLayout.isRefreshing = true
121 | }
122 |
123 | override fun hideProgress() {
124 | viewBind.refreshLayout.isRefreshing = false
125 | }
126 |
127 | override fun netWorkSuccess(entity: OpListModel) {
128 | if (page == 1) {
129 | mAdapter.removeAll()
130 | }
131 | page += 1
132 | mAdapter.addAll(entity.opList)
133 | }
134 |
135 |
136 | override fun netWorkError(throwable: Throwable) {
137 | if (page == 1) {
138 | mStatusView.error()
139 | mAdapter.removeAll()
140 | } else {
141 | mStatusView.snackBar(R.string.net_error)
142 | }
143 | }
144 |
145 | override fun noMore() {
146 | if (page == 1) {
147 | mStatusView.empty()
148 | mAdapter.removeAll()
149 | } else {
150 | mStatusView.snackBar(R.string.data_empty)
151 | }
152 | }
153 |
154 | private fun onXBind(holder: XViewHolder, projectArrayBean: OpListBean) {
155 | holder.setText(R.id.tv_author_name, TextUtils.concat("添加者:", projectArrayBean.authorName))
156 | holder.setText(R.id.tv_author_url, TextUtils.concat("个人主页:", projectArrayBean.authorUrl))
157 | holder.setText(R.id.tv_project_name, TextUtils.concat("项目名称:", projectArrayBean.projectName))
158 |
159 | val projectUrl = holder.findById(R.id.tv_project_url)
160 | projectUrl.autoLinkMask = if (holder.getContext().opUriWebBoolean()) Linkify.WEB_URLS else 0
161 | projectUrl.text = projectArrayBean.projectUrl
162 |
163 | val textView = holder.findById(R.id.tv_desc)
164 | val descEmpty = TextUtils.isEmpty(projectArrayBean.desc)
165 | textView.visibility = if (descEmpty) View.GONE else View.VISIBLE
166 | textView.text = if (descEmpty) "" else projectArrayBean.desc.parseAsHtml()
167 | val tagLayout = holder.findById(R.id.fl_box)
168 | if (holder.getContext().opTagBoolean()) {
169 | tagLayout.visibility = View.VISIBLE
170 | tagLayout.tags(projectArrayBean.tags()) { startActivity(OpSearchActivity.TEXT_KEY to it) }
171 | } else {
172 | tagLayout.visibility = View.GONE
173 | }
174 | }
175 |
176 | override fun onBusNext(entity: Any) {
177 | mAdapter.notifyDataSetChanged()
178 | }
179 |
180 | }
181 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/fragment/OpaListFragment.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.fragment
2 |
3 | import android.text.TextUtils
4 | import android.text.util.Linkify
5 | import android.view.Menu
6 | import android.view.MenuInflater
7 | import android.view.MenuItem
8 | import android.view.View
9 | import androidx.appcompat.widget.AppCompatTextView
10 | import androidx.recyclerview.widget.LinearLayoutManager
11 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
12 | import com.codekk.Constant
13 | import com.codekk.R
14 | import com.codekk.databinding.LayoutListBinding
15 | import com.codekk.ext.*
16 | import com.codekk.mvp.presenter.impl.OpaPresenterImpl
17 | import com.codekk.mvp.view.OpaListView
18 | import com.codekk.ui.activity.OpSearchActivity
19 | import com.codekk.ui.activity.ReadmeActivity
20 | import com.codekk.ui.base.BaseViewBindFragment
21 | import com.codekk.ui.widget.LoadMoreRecyclerView
22 | import com.google.android.flexbox.FlexboxLayout
23 | import com.xadapter.*
24 | import com.xadapter.adapter.XAdapter
25 | import com.xadapter.holder.XViewHolder
26 | import org.jetbrains.anko.support.v4.startActivity
27 |
28 | /**
29 | * by y on 2017/5/18
30 | */
31 | class OpaListFragment : BaseViewBindFragment(), OpaListView, SwipeRefreshLayout.OnRefreshListener, LoadMoreRecyclerView.LoadMoreListener {
32 |
33 | private val mAdapter by lazy { XAdapter() }
34 |
35 | override fun initViewBind(): LayoutListBinding {
36 | return LayoutListBinding.inflate(layoutInflater)
37 | }
38 |
39 | override fun initPresenter(): OpaPresenterImpl {
40 | return OpaPresenterImpl(this)
41 | }
42 |
43 | override fun initActivityCreated() {
44 | setHasOptionsMenu(true)
45 | viewBind.recyclerView.setHasFixedSize(true)
46 | viewBind.recyclerView.layoutManager = LinearLayoutManager(activity)
47 | viewBind.recyclerView.setLoadingListener(this) // 太少了,注掉上拉加载
48 | viewBind.recyclerView.adapter = mAdapter
49 | .setItemLayoutId(R.layout.item_opa_list)
50 | .setOnItemClickListener { _, _, info ->
51 | startActivity(
52 | ReadmeActivity.KEY to arrayOf(info.id, info.projectName, info.projectUrl),
53 | ReadmeActivity.TYPE to Constant.TYPE_OPA
54 | )
55 | }
56 | .setOnBind { holder, position, entity -> onXBind(holder, entity) }
57 |
58 | viewBind.refreshLayout.setOnRefreshListener(this)
59 | viewBind.refreshLayout.post { this.onRefresh() }
60 | }
61 |
62 | override fun clickNetWork() {
63 | super.clickNetWork()
64 | if (!viewBind.refreshLayout.isRefreshing) {
65 | onRefresh()
66 | }
67 | }
68 |
69 | override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
70 | inflater.inflate(R.menu.search_menu, menu)
71 | super.onCreateOptionsMenu(menu, inflater)
72 | }
73 |
74 | override fun onOptionsItemSelected(item: MenuItem): Boolean {
75 | activity?.let {
76 | return when (item.itemId) {
77 | R.id.open_search -> {
78 | it.openSearch(R.string.search_opa_hint) { s -> startActivity(OpSearchActivity.TEXT_KEY to s) }
79 | return true
80 | }
81 | else -> super.onOptionsItemSelected(item)
82 | }
83 | } ?: return super.onOptionsItemSelected(item)
84 | }
85 |
86 | override fun onRefresh() {
87 | mStatusView.success()
88 | page = 1
89 | mPresenter.netWorkRequestList(page)
90 | }
91 |
92 | override fun onLoadMore() {
93 | if (viewBind.refreshLayout.isRefreshing) {
94 | return
95 | }
96 | mPresenter.netWorkRequestList(page)
97 | }
98 |
99 | override fun showProgress() {
100 | viewBind.refreshLayout.isRefreshing = true
101 | }
102 |
103 | override fun hideProgress() {
104 | viewBind.refreshLayout.isRefreshing = false
105 | }
106 |
107 | override fun netWorkSuccess(entity: OpaListModel) {
108 | if (page == 1) {
109 | mAdapter.removeAll()
110 | }
111 | page += 1
112 | mAdapter.addAll(entity.opaList)
113 | }
114 |
115 | override fun netWorkError(throwable: Throwable) {
116 | if (page == 1) {
117 | mStatusView.error()
118 | mAdapter.removeAll()
119 | } else {
120 | mStatusView.snackBar(R.string.net_error)
121 | }
122 | }
123 |
124 | override fun noMore() {
125 | if (page == 1) {
126 | mStatusView.empty()
127 | mAdapter.removeAll()
128 | } else {
129 | mStatusView.snackBar(R.string.data_empty)
130 | }
131 | }
132 |
133 | private fun onXBind(holder: XViewHolder, summaryArrayBean: OpaListBean) {
134 | holder.setText(R.id.tv_project_name, TextUtils.concat("项目名称:", summaryArrayBean.title))
135 | holder.setText(R.id.tv_summary, summaryArrayBean.summary)
136 |
137 | val projectUrl = holder.findById(R.id.tv_project_url)
138 | projectUrl.autoLinkMask = if (holder.getContext().opaUriWebBoolean()) Linkify.WEB_URLS else 0
139 | projectUrl.visibility = if (TextUtils.isEmpty(summaryArrayBean.projectUrl)) View.GONE else View.VISIBLE
140 | projectUrl.text = summaryArrayBean.projectUrl
141 | val flexboxLayout = holder.findById(R.id.fl_box)
142 | if (holder.getContext().opaTagBoolean()) {
143 | flexboxLayout.visibility = View.VISIBLE
144 | flexboxLayout.tags(summaryArrayBean.tagList) {
145 | startActivity(OpSearchActivity.TEXT_KEY to it)
146 | }
147 | } else {
148 | flexboxLayout.visibility = View.GONE
149 | }
150 | }
151 |
152 | override fun onBusNext(entity: Any) {
153 | mAdapter.notifyDataSetChanged()
154 | }
155 |
156 | }
157 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/fragment/RecommendListFragment.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.fragment
2 |
3 | import android.text.TextUtils
4 | import android.view.Menu
5 | import android.view.MenuInflater
6 | import android.view.MenuItem
7 | import android.view.View
8 | import androidx.appcompat.widget.AppCompatTextView
9 | import androidx.core.text.parseAsHtml
10 | import androidx.recyclerview.widget.LinearLayoutManager
11 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
12 | import com.codekk.Constant
13 | import com.codekk.R
14 | import com.codekk.databinding.LayoutListBinding
15 | import com.codekk.ext.*
16 | import com.codekk.mvp.presenter.impl.RecommendPresenterImpl
17 | import com.codekk.mvp.view.RecommendListView
18 | import com.codekk.ui.activity.ReadmeActivity
19 | import com.codekk.ui.activity.RecommendSearchActivity
20 | import com.codekk.ui.base.BaseViewBindFragment
21 | import com.codekk.ui.widget.LoadMoreRecyclerView
22 | import com.xadapter.*
23 | import com.xadapter.adapter.XAdapter
24 | import com.xadapter.holder.XViewHolder
25 | import org.jetbrains.anko.support.v4.startActivity
26 |
27 | /**
28 | * by y on 2017/5/18
29 | */
30 | class RecommendListFragment : BaseViewBindFragment(), RecommendListView, SwipeRefreshLayout.OnRefreshListener, LoadMoreRecyclerView.LoadMoreListener {
31 |
32 | private val mAdapter by lazy { XAdapter() }
33 |
34 | override fun initViewBind(): LayoutListBinding {
35 | return LayoutListBinding.inflate(layoutInflater)
36 | }
37 |
38 | override fun initPresenter(): RecommendPresenterImpl {
39 | return RecommendPresenterImpl(this)
40 | }
41 |
42 | override fun initActivityCreated() {
43 | setHasOptionsMenu(true)
44 | viewBind.recyclerView.setHasFixedSize(true)
45 | viewBind.recyclerView.layoutManager = LinearLayoutManager(activity)
46 | viewBind.recyclerView.setLoadingListener(this)
47 | viewBind.recyclerView.adapter = mAdapter
48 | .setItemLayoutId(R.layout.item_recommend_list)
49 | .setOnItemClickListener { _, _, info ->
50 | startActivity(
51 | ReadmeActivity.TYPE to arrayOf("0", info.title, info.url),
52 | ReadmeActivity.KEY to Constant.TYPE_RECOMMEND
53 | )
54 | }
55 | .setOnBind { holder, position, entity -> onXBind(holder, entity) }
56 |
57 | viewBind.refreshLayout.setOnRefreshListener(this)
58 | viewBind.refreshLayout.post { this.onRefresh() }
59 |
60 | }
61 |
62 | override fun clickNetWork() {
63 | super.clickNetWork()
64 | if (!viewBind.refreshLayout.isRefreshing) {
65 | onRefresh()
66 | }
67 | }
68 |
69 | override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
70 | inflater.inflate(R.menu.search_menu, menu)
71 | super.onCreateOptionsMenu(menu, inflater)
72 | }
73 |
74 | override fun onOptionsItemSelected(item: MenuItem): Boolean {
75 | activity?.let {
76 | return when (item.itemId) {
77 | R.id.open_search -> {
78 | it.openSearch(R.string.search_recommend_hint) { s ->
79 | startActivity(
80 | RecommendSearchActivity.TEXT_KEY to s
81 | )
82 | }
83 | return true
84 | }
85 | else -> super.onOptionsItemSelected(item)
86 | }
87 | } ?: return super.onOptionsItemSelected(item)
88 | }
89 |
90 | override fun onRefresh() {
91 | mStatusView.success()
92 | page = 1
93 | mPresenter.netWorkRequestList(page)
94 | }
95 |
96 | override fun onLoadMore() {
97 | if (viewBind.refreshLayout.isRefreshing) {
98 | return
99 | }
100 | mPresenter.netWorkRequestList(page)
101 | }
102 |
103 | override fun showProgress() {
104 | viewBind.refreshLayout.isRefreshing = true
105 | }
106 |
107 | override fun hideProgress() {
108 | viewBind.refreshLayout.isRefreshing = false
109 | }
110 |
111 | override fun netWorkSuccess(entity: RecommendListModel) {
112 | if (page == 1) {
113 | mAdapter.removeAll()
114 | }
115 | page += 1
116 | mAdapter.addAll(entity.recommendList)
117 | }
118 |
119 | override fun netWorkError(throwable: Throwable) {
120 | if (page == 1) {
121 | mStatusView.error()
122 | mAdapter.removeAll()
123 | } else {
124 | mStatusView.snackBar(R.string.net_error)
125 | }
126 | }
127 |
128 | override fun noMore() {
129 | if (page == 1) {
130 | mStatusView.empty()
131 | mAdapter.removeAll()
132 | } else {
133 | mStatusView.snackBar(R.string.data_empty)
134 | }
135 | }
136 |
137 |
138 | private fun onXBind(holder: XViewHolder, recommendArrayBean: RecommendListBean) {
139 | if (!TextUtils.isEmpty(recommendArrayBean.title)) {
140 | holder.setText(R.id.tv_recommend_title, recommendArrayBean.title)
141 | }
142 | val descView = holder.findById(R.id.tv_recommend_desc)
143 | descView.visibility = if (TextUtils.isEmpty(recommendArrayBean.desc)) View.GONE else View.VISIBLE
144 | if (!TextUtils.isEmpty(recommendArrayBean.desc)) {
145 | descView.text = recommendArrayBean.desc.parseAsHtml()
146 | }
147 | }
148 |
149 | override fun onBusNext(entity: Any) {
150 |
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/widget/FlowText.kt:
--------------------------------------------------------------------------------
1 | package com.codekk.ui.widget
2 |
3 | import android.content.Context
4 | import android.util.AttributeSet
5 | import android.view.Gravity
6 | import android.view.ViewGroup
7 | import androidx.appcompat.widget.AppCompatTextView
8 | import androidx.core.content.ContextCompat
9 | import com.codekk.R
10 | import com.google.android.flexbox.FlexboxLayout
11 |
12 |
13 | /**
14 | * by y on 2017/5/18
15 | */
16 | class FlowText @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : AppCompatTextView(context, attrs, defStyleAttr) {
17 | init {
18 | setPadding(18, 10, 18, 10)
19 | val params = FlexboxLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)
20 | params.leftMargin = 10
21 | params.bottomMargin = 10
22 | gravity = Gravity.CENTER
23 | textSize = 10f
24 | setTextColor(ContextCompat.getColor(context, R.color.colorWhite))
25 | layoutParams = params
26 | setBackgroundResource(R.drawable.shape_tag)
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/widget/LoadMoreRecyclerView.kt:
--------------------------------------------------------------------------------
1 | @file:Suppress("ClassName")
2 |
3 | package com.codekk.ui.widget
4 |
5 | import android.content.Context
6 | import android.util.AttributeSet
7 |
8 | import androidx.recyclerview.widget.GridLayoutManager
9 | import androidx.recyclerview.widget.LinearLayoutManager
10 | import androidx.recyclerview.widget.RecyclerView
11 | import androidx.recyclerview.widget.StaggeredGridLayoutManager
12 |
13 | /**
14 | * by y on 2017/5/16
15 | */
16 | class LoadMoreRecyclerView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : RecyclerView(context, attrs, defStyleAttr) {
17 |
18 | private var layoutManagerType: LAYOUT_MANAGER_TYPE? = null
19 | private var lastPositions: IntArray? = null
20 | private var lastVisibleItemPosition: Int = 0
21 | private var loadingListener: LoadMoreListener? = null
22 |
23 | fun setLoadingListener(loadingListener: LoadMoreListener) {
24 | this.loadingListener = loadingListener
25 | }
26 |
27 | override fun onScrolled(dx: Int, dy: Int) {
28 | super.onScrolled(dx, dy)
29 | val layoutManager = layoutManager
30 | if (layoutManagerType == null) {
31 | layoutManagerType = when (layoutManager) {
32 | is GridLayoutManager -> LAYOUT_MANAGER_TYPE.GRID
33 | is LinearLayoutManager -> LAYOUT_MANAGER_TYPE.LINEAR
34 | is StaggeredGridLayoutManager -> LAYOUT_MANAGER_TYPE.STAGGERED_GRID
35 | else -> throw RuntimeException(
36 | "Unsupported LayoutManager used. Valid ones are LinearLayoutManager, GridLayoutManager and StaggeredGridLayoutManager")
37 | }
38 | }
39 | when (layoutManagerType) {
40 | LAYOUT_MANAGER_TYPE.LINEAR -> lastVisibleItemPosition = (layoutManager as LinearLayoutManager).findLastVisibleItemPosition()
41 | LAYOUT_MANAGER_TYPE.GRID -> lastVisibleItemPosition = (layoutManager as GridLayoutManager).findLastVisibleItemPosition()
42 | LAYOUT_MANAGER_TYPE.STAGGERED_GRID -> {
43 | val staggeredGridLayoutManager = layoutManager as StaggeredGridLayoutManager
44 | if (lastPositions == null) {
45 | lastPositions = IntArray(staggeredGridLayoutManager.spanCount)
46 | }
47 | staggeredGridLayoutManager.findLastVisibleItemPositions(lastPositions)
48 | lastPositions?.let {
49 | lastVisibleItemPosition = findMax(it)
50 | }
51 | }
52 | }
53 | }
54 |
55 | override fun onScrollStateChanged(state: Int) {
56 | super.onScrollStateChanged(state)
57 | val layoutManager = layoutManager
58 | val visibleItemCount = layoutManager?.childCount ?: -1
59 | val totalItemCount = layoutManager?.itemCount ?: -1
60 | if (visibleItemCount > 0 && state == SCROLL_STATE_IDLE && lastVisibleItemPosition == totalItemCount - 1) {
61 | loadingListener?.onLoadMore()
62 | }
63 | }
64 |
65 | private fun findMax(lastPositions: IntArray): Int {
66 | var max = lastPositions[0]
67 | for (value in lastPositions) {
68 | if (value > max) {
69 | max = value
70 | }
71 | }
72 | return max
73 | }
74 |
75 | private enum class LAYOUT_MANAGER_TYPE {
76 | LINEAR,
77 | GRID,
78 | STAGGERED_GRID
79 | }
80 |
81 | interface LoadMoreListener {
82 | fun onLoadMore()
83 | }
84 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/codekk/ui/widget/SimpleMarkdownView.kt:
--------------------------------------------------------------------------------
1 | @file:Suppress("DEPRECATION")
2 |
3 | package com.codekk.ui.widget
4 |
5 | import android.content.Context
6 | import android.util.AttributeSet
7 | import android.view.View
8 | import android.webkit.WebChromeClient
9 | import android.webkit.WebView
10 | import android.widget.ProgressBar
11 | import com.mukesh.MarkdownView
12 |
13 | /**
14 | * by y on 2017/5/17
15 | */
16 | class SimpleMarkdownView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : MarkdownView(context, attrs, defStyleAttr) {
17 |
18 | private val progressbar: ProgressBar = ProgressBar(context, null, android.R.attr.progressBarStyleHorizontal)
19 | var isLoading = false
20 | private set
21 |
22 | init {
23 | progressbar.layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, 26, 0, 0)
24 | addView(progressbar)
25 | webChromeClient = object : WebChromeClient() {
26 | override fun onProgressChanged(view: WebView, newProgress: Int) {
27 | super.onProgressChanged(view, newProgress)
28 | newProgressBar(newProgress)
29 | }
30 | }
31 | }
32 |
33 | private fun newProgressBar(newProgress: Int) {
34 | if (newProgress == 100) {
35 | progressbar.visibility = View.GONE
36 | isLoading = true
37 | } else {
38 | if (progressbar.visibility == View.GONE) {
39 | progressbar.visibility = View.VISIBLE
40 | }
41 | isLoading = false
42 | progressbar.progress = newProgress
43 | }
44 | }
45 |
46 | override fun onScrollChanged(l: Int, t: Int, oldl: Int, oldt: Int) {
47 | val lp = progressbar.layoutParams as LayoutParams
48 | lp.x = l
49 | lp.y = t
50 | progressbar.layoutParams = lp
51 | super.onScrollChanged(l, t, oldl, oldt)
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_status_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/app/src/main/res/drawable-xxhdpi/ic_status_empty.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_status_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/app/src/main/res/drawable-xxhdpi/ic_status_error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_autorenew.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_blog.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_browser.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_check_box.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_check_box_outline.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_common.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_job.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_notes.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_op.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_opa.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_recommend.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_search.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/select_setting_box.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_tag.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_base.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
16 |
17 |
22 |
23 |
33 |
34 |
35 |
36 |
37 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_readme.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/drawer_header_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_blog_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_job_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
20 |
21 |
27 |
28 |
36 |
37 |
38 |
39 |
40 |
46 |
47 |
48 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_op_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
21 |
22 |
28 |
29 |
34 |
35 |
42 |
43 |
48 |
49 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_opa_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
20 |
21 |
28 |
29 |
34 |
35 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_recommend_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
21 |
22 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
21 |
22 |
28 |
29 |
34 |
35 |
42 |
43 |
48 |
49 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_setting_title.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_status_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_status_error.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/drawerlayout_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/readme_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/search_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/setting_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/navigation/main_navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
13 |
18 |
19 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 | #fff
8 | #000
9 | #6633CC
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 6dp
4 | 5dp
5 | 10dp
6 | 10dp
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | CodeKK
3 |
4 | 开源项目
5 | 源码解析
6 | 职位内推
7 | 博客文章
8 | 个人笔记(暂未开放)
9 | 今日推荐
10 | 公共功能(暂未开放)
11 | 设置
12 |
13 | Browser
14 | Refresh
15 |
16 | search
17 | 请输入关键词
18 | search title,tags,author,keywords…
19 | author name
20 | author name
21 |
22 | 网络连接失败,点击重试
23 | loading…
24 | 没有数据了
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.4.20'
3 | repositories {
4 | maven { url 'https://maven.aliyun.com/repository/google' }
5 | maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
6 | maven { url 'https://maven.aliyun.com/repository/public/' }
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.1'
10 | classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12 | }
13 | }
14 | allprojects {
15 | repositories {
16 | maven { url 'https://maven.aliyun.com/repository/google' }
17 | maven { url 'https://maven.aliyun.com/repository/public/' }
18 | maven { url "https://jitpack.io" }
19 | }
20 | }
21 | ext {
22 | applicationId = 'com.codekk'
23 | compileSdkVersion = 29
24 | minSdkVersion = 19
25 | targetSdkVersion = 29
26 | versionCode = 1
27 | versionName = '1.0'
28 |
29 | appcompatVersion = '1.1.0'
30 | materialVersion = '1.0.0'
31 | ktxVersion = '1.1.0'
32 | ankoVersion = '0.10.8'
33 | logVersion = '3.5.0'
34 | legacysupportv4Version = '1.0.0'
35 | constranintlayoutVersion = '1.1.3'
36 | navigationVersion = '2.1.0'
37 | lifecycleExtensionsVersion = '2.1.0'
38 |
39 | rxNetWorkVersion = '0.2.0'
40 | rxandroidVersion = '2.1.1'
41 | retrofitVersion = '2.6.2'
42 | flexboxVersion = '1.1.1'
43 | materialDialogVersion = '3.1.1'
44 | markdownViewVersion = '1.0.8'
45 |
46 | xAdapterVersion = '0.0.9.8.4'
47 | statusVersion = 'beta09'
48 | }
49 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 | android.useAndroidX=true
19 | android.enableJetifier=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Dec 02 13:31:29 CST 2020
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-6.5-bin.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/screenshots/blog_image.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/screenshots/blog_image.gif
--------------------------------------------------------------------------------
/screenshots/codekk_image.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/screenshots/codekk_image.gif
--------------------------------------------------------------------------------
/screenshots/job_image.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/screenshots/job_image.gif
--------------------------------------------------------------------------------
/screenshots/op_image.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/screenshots/op_image.gif
--------------------------------------------------------------------------------
/screenshots/opa_image.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7449/codeKK-Android/5077997f52328fc3f491f64ad92d9dd28eda4ce7/screenshots/opa_image.gif
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------