|
@@ -16,9 +16,9 @@ import com.kdanmobile.kmpdfkit.annotation.stamp.view.KMPDFStampTextView
|
|
import com.kdanmobile.reader.R
|
|
import com.kdanmobile.reader.R
|
|
import com.kdanmobile.reader.screen.data.StampAttribute
|
|
import com.kdanmobile.reader.screen.data.StampAttribute
|
|
import com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
|
|
import com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
|
|
-import kotlinx.android.synthetic.main.view_viewer_edit_item_stamp_custom.view.*
|
|
|
|
-import kotlinx.android.synthetic.main.view_viewer_edit_item_stamp_standard.view.*
|
|
|
|
-import kotlinx.android.synthetic.main.view_viewer_edit_tab_stamp.view.*
|
|
|
|
|
|
+import kotlinx.android.synthetic.main.view_media_box_item_stamp_custom.view.*
|
|
|
|
+import kotlinx.android.synthetic.main.view_media_box_item_stamp_standard.view.*
|
|
|
|
+import kotlinx.android.synthetic.main.view_media_box_tab_stamp.view.*
|
|
import java.text.SimpleDateFormat
|
|
import java.text.SimpleDateFormat
|
|
import java.util.*
|
|
import java.util.*
|
|
|
|
|
|
@@ -46,7 +46,7 @@ class StampTabView : ConstraintLayout {
|
|
}
|
|
}
|
|
|
|
|
|
private fun initView() {
|
|
private fun initView() {
|
|
- LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab_stamp, this)
|
|
|
|
|
|
+ LayoutInflater.from(context).inflate(R.layout.view_media_box_tab_stamp, this)
|
|
|
|
|
|
viewPager.adapter = StampViewPagerAdapter(arrayListOf(resources.getString(R.string.mediaBox_stamp_tabCustom), resources.getString(R.string.mediaBox_stamp_tabStandard)))
|
|
viewPager.adapter = StampViewPagerAdapter(arrayListOf(resources.getString(R.string.mediaBox_stamp_tabCustom), resources.getString(R.string.mediaBox_stamp_tabStandard)))
|
|
tabLayout.setupWithViewPager(viewPager)
|
|
tabLayout.setupWithViewPager(viewPager)
|
|
@@ -92,7 +92,7 @@ class StampTabView : ConstraintLayout {
|
|
override fun instantiateItem(container: ViewGroup, position: Int): Any {
|
|
override fun instantiateItem(container: ViewGroup, position: Int): Any {
|
|
val view = when (position) {
|
|
val view = when (position) {
|
|
0 -> {
|
|
0 -> {
|
|
- val customStampView = layoutInflater.inflate(R.layout.view_viewer_edit_item_stamp_custom, container, false)
|
|
|
|
|
|
+ val customStampView = layoutInflater.inflate(R.layout.view_media_box_item_stamp_custom, container, false)
|
|
|
|
|
|
val date = Date()
|
|
val date = Date()
|
|
customStampView.cb_date.text = SimpleDateFormat("yyyy/MM/dd").format(date)
|
|
customStampView.cb_date.text = SimpleDateFormat("yyyy/MM/dd").format(date)
|
|
@@ -111,7 +111,7 @@ class StampTabView : ConstraintLayout {
|
|
customStampView
|
|
customStampView
|
|
}
|
|
}
|
|
else -> {
|
|
else -> {
|
|
- val standardStampView = layoutInflater.inflate(R.layout.view_viewer_edit_item_stamp_standard, container, false)
|
|
|
|
|
|
+ val standardStampView = layoutInflater.inflate(R.layout.view_media_box_item_stamp_standard, container, false)
|
|
val recyclerView = standardStampView.recyclerView_shapeStandard
|
|
val recyclerView = standardStampView.recyclerView_shapeStandard
|
|
recyclerView.layoutManager = GridLayoutManager(context, 3)
|
|
recyclerView.layoutManager = GridLayoutManager(context, 3)
|
|
val adapter = StandardStampAdapter(context, STANDARD_STAMP_RES.values())
|
|
val adapter = StandardStampAdapter(context, STANDARD_STAMP_RES.values())
|