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
6d79e26b
Commit
6d79e26b
authored
Oct 22, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proper textinpulayout styling
parent
d1d9a545
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
117 additions
and
33 deletions
+117
-33
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+4
-1
ScreenContract.kt
...sual/roompark/presentation/screen/feeds/ScreenContract.kt
+2
-0
ScreenController.kt
.../roompark/presentation/screen/to_flat/ScreenController.kt
+24
-0
find_flat_screen.xml
app/src/main/res/layout/find_flat_screen.xml
+24
-22
to_flat_tab_view.xml
app/src/main/res/layout/to_flat_tab_view.xml
+34
-0
styles.xml
app/src/main/res/values/styles.xml
+29
-10
No files found.
app/src/main/AndroidManifest.xml
View file @
6d79e26b
...
...
@@ -10,7 +10,10 @@
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme.Launch"
>
<activity
android:name=
".base.RoomParkMainActivity"
>
<activity
android:name=
".base.RoomParkMainActivity"
android:configChanges=
"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:screenOrientation=
"portrait"
android:windowSoftInputMode=
"stateHidden|adjustPan"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feeds/ScreenContract.kt
View file @
6d79e26b
...
...
@@ -11,3 +11,5 @@ interface FeedsScreen : BigantoBaseContract<FeedsScreenViewState> {
fun
feedsTabSelected
():
Observable
<
Int
>
}
data class
EstateTabModel
(
val
title
:
String
,
val
building
:
Int
)
\ No newline at end of file
app/src/main/java/com/biganto/visual/roompark/presentation/screen/to_flat/ScreenController.kt
View file @
6d79e26b
package
com.biganto.visual.roompark.presentation.screen.to_flat
import
android.view.View
import
android.widget.TextView
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.feeds.EstateTabModel
import
com.google.android.material.tabs.TabLayout
import
timber.log.Timber
import
javax.inject.Inject
...
...
@@ -22,12 +26,32 @@ class FindFlatScreenController :
getComponent
()
}
@BindView
(
R
.
id
.
flat_estate_tabs
)
lateinit
var
feedsTabs
:
TabLayout
@Inject
override
lateinit
var
injectedPresenter
:
FindFlatScreenPresenter
val
estateTabs
=
arrayListOf
(
EstateTabModel
(
"Д1"
,
1
),
EstateTabModel
(
"Д2"
,
2
),
EstateTabModel
(
"Д3"
,
3
)
)
override
fun
onViewBound
(
v
:
View
)
{
estateTabs
.
forEach
{
estate
->
val
tab
=
feedsTabs
.
newTab
()
.
setCustomView
(
R
.
layout
.
to_flat_tab_view
)
tab
.
customView
?.
let
{
it
.
findViewById
<
TextView
>(
R
.
id
.
tab_title
)
?.
text
=
estate
.
title
it
.
findViewById
<
TextView
>(
R
.
id
.
tab_divider
)
?.
visibility
=
if
(
estateTabs
.
indexOf
(
estate
)
==
estateTabs
.
size
-
1
)
View
.
GONE
else
View
.
VISIBLE
}
feedsTabs
.
addTab
(
tab
)
}
}
override
fun
render
(
viewState
:
FindFlatScreenViewState
)
{
...
...
app/src/main/res/layout/find_flat_screen.xml
View file @
6d79e26b
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
<com.google.android.material.tabs.TabLayout
android:id=
"@+id/flat_estate_tabs"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"
32
dp"
android:layout_marginTop=
"
16
dp"
android:layout_marginEnd=
"16dp"
android:orientation=
"horizontal"
>
<include
layout=
"@layout/simple_text_tabs"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
android:background=
"#00000000"
app:tabIndicatorColor=
"@color/colorAccent"
app:tabMaxWidth=
"@dimen/feeds_tab_max_width"
app:tabMode=
"scrollable"
/>
<com.google.android.material.textfield.TextInputLayout
style=
"@style/SelectFlatInputLayout"
android:colorControlActivated=
"@color/colorAccent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"
32
dp"
android:layout_marginTop=
"
16
dp"
android:layout_marginEnd=
"16dp"
>
<com.google.android.material.textfield.TextInputEditText
style=
"@style/SelectFlatInputLayout.EditText"
style=
"@style/ToFlat.EditText"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"32dp"
/>
android:cursorVisible=
"true"
android:includeFontPadding=
"false"
android:singleLine=
"true"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
style=
"@style/AuthButton"
style=
"@style/AuthButton
.Enable
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"
32
dp"
android:layout_marginTop=
"
16
dp"
android:layout_marginEnd=
"16dp"
android:text=
"СМОТРЕТЬ"
/>
android:text=
"СМОТРЕТЬ"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/to_flat_tab_view.xml
0 → 100644
View file @
6d79e26b
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tab_title"
style=
"@style/Default_TextView.Accent_Text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tab_divider"
style=
"@style/Header_TextView.Accent_Header"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignEnd=
"@id/tab_title"
android:layout_marginStart=
"16dp"
android:text=
"@string/feeds_tab_divider"
android:textColor=
"@color/colorAccentSecondary"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/tab_title"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/values/styles.xml
View file @
6d79e26b
...
...
@@ -12,6 +12,13 @@
<item
name=
"materialCardViewStyle"
>
@style/Widget.Biganto.MaterialCardView
</item>
<item
name=
"switchStyle"
>
@style/Widget.MaterialComponents.CompoundButton.Switch.BellSwitchStyle
</item>
<item
name=
"colorControlActivated"
>
@color/colorAccent
</item>
<item
name=
"colorControlHighlight"
>
@color/colorAccent
</item>
<item
name=
"colorControlNormal"
>
@color/colorAccent
</item>
</style>
<style
name=
"Widget.MainTextInputStyle"
parent=
"Widget.MaterialComponents.TextInputLayout.OutlinedBox"
>
<item
name=
"android:theme"
>
@style/AppTheme.Theme2
</item>
</style>
<style
name=
"AppTheme.Launch"
>
...
...
@@ -44,7 +51,8 @@
<item
name=
"colorControlActivated"
>
@color/colorAccentSecondary
</item>
</style>
<style
name=
"AuthTextInputLayout"
parent=
"Widget.MaterialComponents.TextInputLayout.FilledBox.Dense"
>
<style
name=
"AuthTextInputLayout"
parent=
"Widget.MainTextInputStyle"
>
<item
name=
"colorControlNormal"
>
@color/colorCommonBackground
</item>
<item
name=
"colorControlActivated"
>
@color/colorCommonBackground
</item>
<item
name=
"boxStrokeColor"
>
@color/colorAccent
</item>
...
...
@@ -65,25 +73,36 @@
<item
name=
"android:hint"
>
"ПАРОЛЬ"
</item>
</style>
<style
name=
"SelectFlatInputLayout"
parent=
"Widget.MaterialComponents.TextInputLayout.FilledBox.Dense"
>
<item
name=
"colorControlNormal"
>
@color/colorCommonBackground
</item>
<item
name=
"colorControlActivated"
>
@color/colorCommonBackground
</item>
<item
name=
"boxBackgroundColor"
>
@color/colorCommonBackground
</item>
<style
name=
"AppTheme.Theme2"
>
<item
name=
"colorPrimary"
>
@color/colorAttention
</item>
</style>
<style
name=
"SelectFlatInputLayout"
parent=
"Widget.MainTextInputStyle"
>
<item
name=
"colorControlNormal"
>
@color/colorAccent
</item>
<item
name=
"colorControlActivated"
>
@color/colorAccentSecondary
</item>
<item
name=
"colorControlHighlight"
>
@color/colorAccentSecondary
</item>
<item
name=
"android:textColorHint"
>
@color/colorNoticeText
</item>
<item
name=
"android:textColor"
>
@color/colorCommonText
</item>
<item
name=
"errorTextAppearance"
>
@style/Auth.EditText
</item>
<item
name=
"hintTextColor"
>
@color/colorNoticeText
</item>
<item
name=
"android:editTextStyle"
>
@style/SelectFlatInputLayout.EditText
</item>
<item
name=
"android:hint"
>
"Кв.№"
</item>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:baselineAlignBottom"
>
true
</item>
<item
name=
"android:textSize"
>
@dimen/super_size
</item>
</style>
<style
name=
"SelectFlatInputLayout.EditText"
parent=
"Widget.AppCompat.EditText"
>
<style
name=
"ToFlat.EditText"
parent=
"SelectFlatInputLayout"
>
<!-- <item name="android:theme">@style/AppTheme</item>-->
<!-- Inactive underline color-->
<item
name=
"colorControlNormal"
>
@color/colorAccent
</item>
<item
name=
"android:textSize"
>
@dimen/super_size
</item>
<item
name=
"android:hint"
>
"Кв.№"
</item>
<item
name=
"android:baselineAlignBottom"
>
true
</item>
<item
name=
"android:includeFontPadding"
>
false
</item>
<!-- Cursor and Active underline color, uses colorAccent by default if not defined-->
<item
name=
"colorControlActivated"
>
@color/colorAccentSecondary
</item>
</style>
...
...
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