Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Bogdashkin
Room Park Android
Commits
0bae18e9
Commit
0bae18e9
authored
Jan 15, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
button click fix
parent
60e9bf89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
ScreenContract.kt
...al/roompark/presentation/screen/to_flat/ScreenContract.kt
+1
-1
ScreenController.kt
.../roompark/presentation/screen/to_flat/ScreenController.kt
+4
-3
No files found.
app/src/main/java/com/biganto/visual/roompark/presentation/screen/to_flat/ScreenContract.kt
View file @
0bae18e9
...
...
@@ -11,4 +11,4 @@ interface FindFlatScreen : BigantoBaseContract<FindFlatScreenViewState> {
fun
getFlat
()
:
Observable
<
FlatRequestModel
>
}
data class
FlatRequestModel
(
val
number
:
Int
,
val
building
:
Int
)
\ No newline at end of file
data class
FlatRequestModel
(
val
building
:
Int
,
val
number
:
Int
)
\ No newline at end of file
app/src/main/java/com/biganto/visual/roompark/presentation/screen/to_flat/ScreenController.kt
View file @
0bae18e9
...
...
@@ -16,6 +16,7 @@ import com.bluelinelabs.conductor.changehandler.FadeChangeHandler
import
com.google.android.material.button.MaterialButton
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.textfield.TextInputLayout
import
com.jakewharton.rxbinding3.view.clicks
import
com.jakewharton.rxbinding3.view.keys
import
io.reactivex.Observable
import
io.reactivex.android.schedulers.AndroidSchedulers
...
...
@@ -34,7 +35,8 @@ class FindFlatScreenController :
override
fun
getFlat
():
Observable
<
FlatRequestModel
>
=
flatNumberEditor
.
keys
{
it
.
keyCode
==
KeyEvent
.
KEYCODE_ENTER
}
Observable
.
merge
(
flatNumberEditor
.
keys
{
it
.
keyCode
==
KeyEvent
.
KEYCODE_ENTER
},
findFlatButton
.
clicks
())
.
doOnNext
{
flatNumberEditor
.
hideKeyboard
()
}
.
map
{
FlatRequestModel
(
...
...
@@ -44,7 +46,6 @@ class FindFlatScreenController :
}
.
observeOn
(
AndroidSchedulers
.
mainThread
())
override
fun
injectDependencies
()
{
getComponent
()
}
...
...
@@ -70,7 +71,7 @@ class FindFlatScreenController :
lateinit
var
flatNumberEditor
:
EditText
@BindView
(
R
.
id
.
findFlatButton
)
lateinit
var
f
ub
dFlatButton
:
MaterialButton
lateinit
var
f
in
dFlatButton
:
MaterialButton
@Inject
override
lateinit
var
injectedPresenter
:
FindFlatScreenPresenter
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment