File tree Expand file tree Collapse file tree
java/ge/rogavactive/multipleselectionview Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ android {
1010 defaultConfig {
1111 minSdk 21
1212 targetSdk 32
13- versionCode 6
14- versionName " 1.0.5 "
13+ versionCode 7
14+ versionName " 1.0.6 "
1515
1616 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
1717 consumerProguardFiles " consumer-rules.pro"
Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ class MultipleSelectionView<I> @JvmOverloads constructor(
6161
6262 mAdapter = defaultAdapter
6363 }
64+ setOnClickListener {
65+ mModal.show()
66+ }
6467 }
6568
6669 /* *
@@ -85,26 +88,4 @@ class MultipleSelectionView<I> @JvmOverloads constructor(
8588 mAdapter = newAdapter
8689 }
8790
88- override fun dispatchTouchEvent (event : MotionEvent ? ): Boolean {
89- if (event?.action == MotionEvent .ACTION_DOWN ) {
90- listener?.onClick(this )
91- mModal.show()
92- }
93- return super .dispatchTouchEvent(event)
94- }
95-
96- override fun dispatchKeyEvent (event : KeyEvent ): Boolean {
97- if (event.action == KeyEvent .ACTION_DOWN &&
98- (event.keyCode == KeyEvent .KEYCODE_DPAD_CENTER || event.keyCode == KeyEvent .KEYCODE_ENTER )
99- ) {
100- listener?.onClick(this )
101- mModal.show()
102- }
103- return super .dispatchKeyEvent(event)
104- }
105-
106- override fun setOnClickListener (listener : OnClickListener ? ) {
107- this .listener = listener
108- }
109-
11091}
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<FrameLayout xmlns : android =" http://schemas.android.com/apk/res/android"
33 android : layout_width =" match_parent"
4- android : layout_height =" match_parent" >
4+ android : layout_height =" match_parent"
5+ android : clickable =" true"
6+ android : focusable =" true" >
57 <CheckBox
68 android : id =" @+id/item_checkbox"
79 android : layout_width =" match_parent"
You can’t perform that action at this time.
0 commit comments