mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-09 23:41:08 +01:00
Create custom radioGroup/radioButton for Export/Import choice.
Add corresponding colors
This commit is contained in:
parent
b29be4fc8a
commit
2f6b46a4e6
2 changed files with 34 additions and 0 deletions
32
app/src/main/res/layout/custom_switch_btn.xml
Normal file
32
app/src/main/res/layout/custom_switch_btn.xml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<com.google.android.material.button.MaterialButtonToggleGroup android:id="@+id/toggleGroup"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
app:checkedButton="@id/switch_btn_export"
|
||||||
|
app:singleSelection="true"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
|
android:id="@+id/switch_btn_export"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/export_prescriptions"
|
||||||
|
android:backgroundTint="@color/selected_backgroundf"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
|
android:id="@+id/switch_btn_import"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/import_prescriptions"
|
||||||
|
android:backgroundTint="@color/unselected_backgroud"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</com.google.android.material.button.MaterialButtonToggleGroup>
|
|
@ -18,4 +18,6 @@
|
||||||
|
|
||||||
<color name="led">#31f623</color>
|
<color name="led">#31f623</color>
|
||||||
<color name="grey">#777</color>
|
<color name="grey">#777</color>
|
||||||
|
<color name="unselected_backgroud">#777777</color>
|
||||||
|
<color name="selected_backgroundf">#4f91ff</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue