Commit c861e374 authored by wanglei's avatar wanglei

...

parent 325b8d4a
......@@ -25,10 +25,14 @@ class PdfSelectActivity : BaseActivity<ActivityPdfSelectBinding>(), DocumentView
ActivityPdfSelectBinding.inflate(layoutInflater)
}
@SuppressLint("SetTextI18n")
override fun initView() {
doWhat = intent.extras?.getString("doWhat", "") ?: ""
documentPresenter = DocumentPresenter(this, this, DocumentBean.TYPE_PDF, lifecycleScope)
if (doWhat == DO_SPLIT_PDF) {
binding.tvBtnNext.visibility = View.GONE
binding.tvSelectTip.text = "Select a project"
}
initAdapter()
documentPresenter.initData()
}
......@@ -50,7 +54,11 @@ class PdfSelectActivity : BaseActivity<ActivityPdfSelectBinding>(), DocumentView
private fun initAdapter() {
adapter = DocumentAdapter()
adapter.itemClick = {
if (doWhat == DO_SPLIT_PDF) {
startActivity(Intent(this, PdfSplitActivity::class.java).apply {
putExtra("path", it.path)
})
}
}
adapter.selectAction = {
if (it == 0) {
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/bg_00b8de_10" android:state_enabled="false" />
<item android:drawable="@drawable/bg_7fdcee_10" android:state_enabled="true" />
</selector>
\ No newline at end of file
......@@ -72,7 +72,7 @@
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:layout_marginBottom="35dp"
android:background="@drawable/bg_selector_split"
android:background="@drawable/bg_selector_btn"
android:enabled="false"
android:gravity="center"
android:text="Split"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment