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
abd6e913
Commit
abd6e913
authored
Apr 09, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix switcher for plan types
parent
f2a9e182
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
6 deletions
+81
-6
bell_switch_track.xml
app/src/main/res/drawable/bell_switch_track.xml
+1
-1
def_switch_track.xml
app/src/main/res/drawable/def_switch_track.xml
+49
-0
default_switch_view.xml
app/src/main/res/layout-v23/default_switch_view.xml
+18
-0
bell_switch_view.xml
app/src/main/res/layout/bell_switch_view.xml
+1
-0
flat_plan_type_selector_view.xml
app/src/main/res/layout/flat_plan_type_selector_view.xml
+4
-4
styles.xml
app/src/main/res/values/styles.xml
+8
-1
No files found.
app/src/main/res/drawable/bell_switch_track.xml
View file @
abd6e913
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
android:top=
"5dp"
android:top=
"5dp"
android:bottom=
"5dp"
android:bottom=
"5dp"
android:src=
"@drawable/ic_bell_on"
android:src=
"@drawable/ic_bell_on"
android:mipMap=
"
tru
e"
android:mipMap=
"
fals
e"
android:gravity=
"start"
android:gravity=
"start"
android:tintMode=
"screen"
android:tintMode=
"screen"
android:tint=
"@color/colorPrimaryDark"
/>
android:tint=
"@color/colorPrimaryDark"
/>
...
...
app/src/main/res/drawable/def_switch_track.xml
0 → 100644
View file @
abd6e913
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:width=
"http://schemas.android.com/apk/res-auto"
>
<item
android:state_checked=
"false"
>
<layer-list>
<item>
<shape
android:shape=
"rectangle"
android:dither=
"true"
android:useLevel=
"false"
>
<size
android:width=
"48dp"
android:height=
"24dp"
/>
<corners
android:radius=
"12dp"
/>
</shape>
</item>
<item
android:right=
"8dp"
>
<shape
android:shape=
"ring"
android:width=
"14dp"
android:height=
"15dp"
android:gravity=
"end"
android:tint=
"@color/colorPrimaryDark"
/>
</item>
</layer-list>
</item>
<item
android:state_checked=
"true"
>
<layer-list>
<item>
<shape
android:shape=
"rectangle"
android:dither=
"true"
android:useLevel=
"false"
>
<size
android:width=
"48dp"
android:height=
"24dp"
/>
<solid
android:color=
"#FFFFFFFF"
/>
<corners
android:radius=
"12dp"
/>
</shape>
</item>
<item
android:left=
"8dp"
>
<shape
android:shape=
"ring"
android:right=
"27dp"
android:top=
"5dp"
android:bottom=
"5dp"
android:gravity=
"start"
android:tintMode=
"screen"
android:tint=
"@color/colorPrimaryDark"
/>
</item>
</layer-list>
</item>
</selector>
\ No newline at end of file
app/src/main/res/layout-v23/default_switch_view.xml
0 → 100644
View file @
abd6e913
<?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:id=
"@+id/bell_container"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<com.google.android.material.switchmaterial.SwitchMaterial
style=
"@style/Widget.MaterialComponents.CompoundButton.Switch.DefaultSwitchStyle"
android:id=
"@+id/switch1"
android:layout_width=
"48dp"
android:layout_height=
"24dp"
android:height=
"24dp"
android:checked=
"false"
app:switchMinWidth=
"48dp"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/bell_switch_view.xml
View file @
abd6e913
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.switchmaterial.SwitchMaterial
style=
"@style/Widget.MaterialComponents.CompoundButton.Switch.BellSwitchStyle"
android:id=
"@+id/switch1"
android:id=
"@+id/switch1"
android:layout_width=
"48dp"
android:layout_width=
"48dp"
android:layout_height=
"24dp"
android:layout_height=
"24dp"
...
...
app/src/main/res/layout/flat_plan_type_selector_view.xml
View file @
abd6e913
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
<include
<include
android:id=
"@+id/sizes_switcher"
android:id=
"@+id/sizes_switcher"
layout=
"@layout/
bell
_switch_view"
layout=
"@layout/
default
_switch_view"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|center_vertical"
android:layout_gravity=
"end|center_vertical"
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
<include
<include
android:id=
"@+id/furniture_switcher"
android:id=
"@+id/furniture_switcher"
layout=
"@layout/
bell
_switch_view"
layout=
"@layout/
default
_switch_view"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|center_vertical"
android:layout_gravity=
"end|center_vertical"
...
@@ -183,7 +183,7 @@
...
@@ -183,7 +183,7 @@
<include
<include
android:id=
"@+id/electricity_switcher"
android:id=
"@+id/electricity_switcher"
layout=
"@layout/
bell
_switch_view"
layout=
"@layout/
default
_switch_view"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|center_vertical"
android:layout_gravity=
"end|center_vertical"
...
@@ -227,7 +227,7 @@
...
@@ -227,7 +227,7 @@
<include
<include
android:id=
"@+id/walls_switcher"
android:id=
"@+id/walls_switcher"
layout=
"@layout/
bell
_switch_view"
layout=
"@layout/
default
_switch_view"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|center_vertical"
android:layout_gravity=
"end|center_vertical"
...
...
app/src/main/res/values/styles.xml
View file @
abd6e913
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"materialCardViewStyle"
>
@style/Widget.Biganto.MaterialCardView
</item>
<item
name=
"materialCardViewStyle"
>
@style/Widget.Biganto.MaterialCardView
</item>
<item
name=
"switchStyle"
>
@style/Widget.MaterialComponents.CompoundButton.Switch.BellSwitchStyle
</item
>
<!-- <item name="switchStyle">@style/Widget.MaterialComponents.CompoundButton.Switch.BellSwitchStyle</item>--
>
<item
name=
"colorControlActivated"
>
@color/colorAccent
</item>
<item
name=
"colorControlActivated"
>
@color/colorAccent
</item>
<item
name=
"colorControlHighlight"
>
@color/colorAccent
</item>
<item
name=
"colorControlHighlight"
>
@color/colorAccent
</item>
<item
name=
"colorControlNormal"
>
@color/colorAccent
</item>
<item
name=
"colorControlNormal"
>
@color/colorAccent
</item>
...
@@ -43,6 +43,13 @@
...
@@ -43,6 +43,13 @@
<item
name=
"trackTint"
>
@drawable/bell_switch_track_tint
</item>
<item
name=
"trackTint"
>
@drawable/bell_switch_track_tint
</item>
</style>
</style>
<style
name=
"Widget.MaterialComponents.CompoundButton.Switch.DefaultSwitchStyle"
>
<item
name=
"track"
>
@drawable/def_switch_track
</item>
<item
name=
"android:thumb"
>
@drawable/bell_switcher
</item>
<item
name=
"thumbTint"
>
@color/colorPrimaryDark
</item>
<item
name=
"trackTint"
>
@drawable/bell_switch_track_tint
</item>
</style>
<style
name=
"Widget.Biganto.MaterialCardView"
parent=
"Widget.MaterialComponents.CardView"
>
<style
name=
"Widget.Biganto.MaterialCardView"
parent=
"Widget.MaterialComponents.CardView"
>
<item
name=
"cardUseCompatPadding"
>
false
</item>
<item
name=
"cardUseCompatPadding"
>
false
</item>
<item
name=
"strokeWidth"
>
0dp
</item>
<item
name=
"strokeWidth"
>
0dp
</item>
...
...
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