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
150c032a
Commit
150c032a
authored
Dec 27, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
estate views
parent
e5e2c20d
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
70 additions
and
20 deletions
+70
-20
Explication.kt
.../roompark/data/repository/db/requrey/model/Explication.kt
+1
-0
ScreenController.kt
...l/roompark/presentation/screen/estate/ScreenController.kt
+23
-7
ScreenViewState.kt
...al/roompark/presentation/screen/estate/ScreenViewState.kt
+3
-1
plantype_tab_background_selector.xml
app/src/main/res/color/plantype_tab_background_selector.xml
+7
-0
plantype_tab_text_selector.xml
app/src/main/res/color/plantype_tab_text_selector.xml
+7
-0
feeds_block_view.xml
app/src/main/res/layout/feeds_block_view.xml
+1
-1
find_flat_screen.xml
app/src/main/res/layout/find_flat_screen.xml
+1
-1
flat_full_card_screen.xml
app/src/main/res/layout/flat_full_card_screen.xml
+10
-9
select_text_tab.xml
app/src/main/res/layout/select_text_tab.xml
+11
-0
styles.xml
app/src/main/res/values/styles.xml
+5
-0
view_size.xml
app/src/main/res/values/view_size.xml
+1
-1
No files found.
app/src/main/java/com/biganto/visual/roompark/data/repository/db/requrey/model/Explication.kt
View file @
150c032a
...
...
@@ -12,6 +12,7 @@ interface Explication : Persistable {
@get
:
Generated
val
id
:
Int
@get
:
ForeignKey
(
references
=
PlanPreset
::
class
)
@get
:
ManyToOne
val
planId
:
Int
val
living
:
Boolean
val
area
:
Float
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenController.kt
View file @
150c032a
package
com.biganto.visual.roompark.presentation.screen.estate
import
android.view.View
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
butterknife.BindView
import
com.biganto.visual.roompark.R
import
com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.conductor.BigantoBaseController
import
com.biganto.visual.roompark.presentation.screen.favorites.DaggerEstateScreenComponent
import
com.biganto.visual.roompark.presentation.screen.favorites.util.EstateListAdapter
import
com.biganto.visual.roompark.util.view_utils.grid.CeilsDecoration
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.textview.MaterialTextView
import
timber.log.Timber
import
javax.inject.Inject
...
...
@@ -34,6 +32,9 @@ class EstateScreenController :
@BindView
(
R
.
id
.
favorites_cards_recycler_view
)
lateinit
var
favoritesRecyclerView
:
RecyclerView
@BindView
(
R
.
id
.
planTypesTabs
)
lateinit
var
planTypesTabLayout
:
TabLayout
private
fun
setToolbar
(){
toolBar
.
showAll
()
...
...
@@ -43,6 +44,8 @@ class EstateScreenController :
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
favoritesRecyclerView
.
isNestedScrollingEnabled
=
false
// planTypesTabLayout.
}
private
fun
bindRecycler
()
{
...
...
@@ -59,7 +62,8 @@ class EstateScreenController :
Timber
.
d
(
"Render state $viewState"
)
when
(
viewState
){
is
EstateScreenViewState
.
Idle
->
render
(
viewState
)
is
EstateScreenViewState
.
FavoriteEstatesLoaded
->
render
(
viewState
)
is
EstateScreenViewState
.
LoadEstate
->
render
(
viewState
)
is
EstateScreenViewState
.
LoadPlanTypes
->
render
(
viewState
)
is
EstateScreenViewState
.
SomeError
->
render
(
viewState
)
}
}
...
...
@@ -72,14 +76,26 @@ class EstateScreenController :
showError
(
viewState
.
exception
)
private
fun
render
(
viewState
:
EstateScreenViewState
.
FavoriteEstatesLoaded
)
{
private
fun
render
(
viewState
:
EstateScreenViewState
.
LoadEstate
)
{
}
private
fun
render
(
viewState
:
EstateScreenViewState
.
LoadPlanTypes
)
{
planTypesTabLayout
.
removeAllTabs
()
var
i
=
1
viewState
.
types
.
forEach
{
val
tab
=
planTypesTabLayout
.
newTab
()
.
setCustomView
(
R
.
layout
.
select_text_tab
).
setTag
(
it
.
planTypeId
)
tab
.
customView
?.
findViewById
<
MaterialTextView
>(
R
.
id
.
textTitle
)
?.
text
=
"Вариант $i"
i
++
}
}
private
fun
getComponent
()
=
DaggerEstateScreenComponent
.
factory
()
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
)
.
inject
(
this
)
override
fun
getLayoutId
():
Int
=
R
.
layout
.
f
avorites
_screen
override
fun
getLayoutId
():
Int
=
R
.
layout
.
f
lat_full_card
_screen
}
\ No newline at end of file
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenViewState.kt
View file @
150c032a
...
...
@@ -2,6 +2,7 @@ package com.biganto.visual.roompark.presentation.screen.estate
import
com.biganto.visual.roompark.conductor.BigantoBaseViewState
import
com.biganto.visual.roompark.domain.model.EstateModel
import
com.biganto.visual.roompark.domain.model.PlanTypeModel
import
com.biganto.visual.roompark.util.monades.ExceptionString
/**
...
...
@@ -11,6 +12,7 @@ import com.biganto.visual.roompark.util.monades.ExceptionString
sealed
class
EstateScreenViewState
:
BigantoBaseViewState
()
{
class
Idle
:
EstateScreenViewState
()
class
FavoriteEstatesLoaded
(
val
items
:
List
<
EstateModel
>)
:
EstateScreenViewState
()
class
LoadEstate
(
val
estate
:
EstateModel
)
:
EstateScreenViewState
()
class
LoadPlanTypes
(
val
types
:
List
<
PlanTypeModel
>)
:
EstateScreenViewState
()
class
SomeError
(
val
exception
:
ExceptionString
)
:
EstateScreenViewState
()
}
\ No newline at end of file
app/src/main/res/color/plantype_tab_background_selector.xml
0 → 100644
View file @
150c032a
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_selected=
"true"
android:color=
"@color/colorAccent"
/>
<item
android:state_focused=
"true"
android:color=
"@color/colorAccent"
/>
<item
android:state_pressed=
"true"
android:color=
"@color/colorAccent"
/>
<item
android:color=
"@color/colorPrimary"
/>
</selector>
\ No newline at end of file
app/src/main/res/color/plantype_tab_text_selector.xml
0 → 100644
View file @
150c032a
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_selected=
"true"
android:color=
"@color/colorPrimary"
/>
<item
android:state_focused=
"true"
android:color=
"@color/colorPrimary"
/>
<item
android:state_pressed=
"true"
android:color=
"@color/colorPrimary"
/>
<item
android:color=
"@color/colorAccent"
/>
</selector>
\ No newline at end of file
app/src/main/res/layout/feeds_block_view.xml
View file @
150c032a
...
...
@@ -18,7 +18,7 @@
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:tabMaxWidth=
"@dimen/
feeds_
tab_max_width"
app:tabMaxWidth=
"@dimen/tab_max_width"
app:tabMode=
"scrollable"
/>
<androidx.recyclerview.widget.RecyclerView
...
...
app/src/main/res/layout/find_flat_screen.xml
View file @
150c032a
...
...
@@ -14,7 +14,7 @@
android:layout_marginEnd=
"16dp"
android:background=
"#00000000"
app:tabIndicatorColor=
"@color/colorAccent"
app:tabMaxWidth=
"@dimen/
feeds_
tab_max_width"
app:tabMaxWidth=
"@dimen/tab_max_width"
app:tabMode=
"scrollable"
/>
<com.google.android.material.textfield.TextInputLayout
...
...
app/src/main/res/layout/flat_full_card_screen.xml
View file @
150c032a
...
...
@@ -13,17 +13,18 @@
android:orientation=
"vertical"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/variants_choose_recycler_view"
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:layout_marginStart=
"24dp"
android:layout_marginTop=
"24dp"
android:layout_marginEnd=
"24dp"
android:orientation=
"horizontal"
<com.google.android.material.tabs.TabLayout
android:id=
"@+id/planTypesTabs"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"32dp"
android:background=
"#00000000"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
app:tabMaxWidth=
"@dimen/tab_max_width"
app:tabMode=
"scrollable"
/>
<include
android:id=
"@+id/include5"
...
...
app/src/main/res/layout/select_text_tab.xml
0 → 100644
View file @
150c032a
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.textview.MaterialTextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/textTitle"
style=
"@style/Accent_Minor_TextView.Tab"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"4dp"
android:orientation=
"vertical"
android:text=
"Вариант 1"
>
</com.google.android.material.textview.MaterialTextView>
\ No newline at end of file
app/src/main/res/values/styles.xml
View file @
150c032a
...
...
@@ -347,6 +347,11 @@
<item
name=
"android:textColor"
>
@color/colorNoticeText
</item>
</style>
<style
name=
"Accent_Minor_TextView.Tab"
>
<item
name=
"android:textColor"
>
@color/plantype_tab_text_selector
</item>
<item
name=
"android:background"
>
@color/plantype_tab_background_selector
</item>
</style>
<style
name=
"Accent_Minor_TextView.DatePlaceHolder"
>
...
...
app/src/main/res/values/view_size.xml
View file @
150c032a
...
...
@@ -9,5 +9,5 @@
<dimen
name=
"ceil_grid_padding"
>
8dp
</dimen>
<dimen
name=
"
feeds_
tab_max_width"
>
999dp
</dimen>
<dimen
name=
"tab_max_width"
>
999dp
</dimen>
</resources>
\ No newline at end of file
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