Skip to content

Commit

Permalink
Added Toast Style 12
Browse files Browse the repository at this point in the history
  • Loading branch information
DHD2280 committed Aug 1, 2024
1 parent c757f4e commit d0b4325
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item>
<shape>
<gradient
android:angle="315.0"
android:endColor="@*android:color/holo_blue_dark"
android:startColor="@*android:color/holo_blue_light" />
<corners
android:bottomLeftRadius="14dp"
android:bottomRightRadius="24dp"
android:topLeftRadius="24dp"
android:topRightRadius="14dp" />
</shape>
</item>
<item
android:bottom="4.0dp"
android:end="4.0dp"
android:start="4.0dp"
android:top="4.0dp">
<shape>
<solid android:color="@color/toast_color_bg" />
<corners
android:bottomLeftRadius="10dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="10dp" />
</shape>
</item>
</layer-list>
</item>
</layer-list>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item>
<shape>
<gradient
android:angle="315.0"
android:endColor="@*android:color/holo_blue_dark"
android:startColor="@*android:color/holo_blue_light" />
<corners
android:bottomLeftRadius="14dp"
android:bottomRightRadius="24dp"
android:topLeftRadius="24dp"
android:topRightRadius="14dp" />
</shape>
</item>
<item
android:bottom="4.0dp"
android:end="4.0dp"
android:start="4.0dp"
android:top="4.0dp">
<shape>
<solid android:color="@color/toast_color_bg" />
<corners
android:bottomLeftRadius="10dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="10dp" />
</shape>
</item>
</layer-list>
</item>
</layer-list>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<color name="toast_color_bg">@android:color/system_neutral2_800</color>

</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<color name="toast_color_bg">@android:color/system_neutral1_50</color>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class ToastFrame : BaseFragment() {
add(ToastModel(R.drawable.toast_frame_style_9, String.format(appContextLocale.resources.getString(R.string.style), 9)))
add(ToastModel(R.drawable.toast_frame_style_10, String.format(appContextLocale.resources.getString(R.string.style), 10)))
add(ToastModel(R.drawable.toast_frame_style_11, String.format(appContextLocale.resources.getString(R.string.style), 11)))
add(ToastModel(R.drawable.toast_frame_style_12, String.format(appContextLocale.resources.getString(R.string.style), 12)))
}

return ToastAdapter(
Expand Down
34 changes: 34 additions & 0 deletions app/src/main/res/drawable-night-v24/toast_frame_style_12.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item>
<shape>
<gradient
android:angle="315.0"
android:endColor="@color/holo_blue_dark"
android:startColor="@color/holo_blue_light" />
<corners
android:bottomLeftRadius="14dp"
android:bottomRightRadius="24dp"
android:topLeftRadius="24dp"
android:topRightRadius="14dp" />
</shape>
</item>
<item
android:bottom="4.0dp"
android:end="4.0dp"
android:start="4.0dp"
android:top="4.0dp">
<shape>
<solid android:color="@android:color/system_neutral1_800" />
<corners
android:bottomLeftRadius="14dp"
android:bottomRightRadius="24dp"
android:topLeftRadius="24dp"
android:topRightRadius="14dp" />
</shape>
</item>
</layer-list>
</item>
</layer-list>
34 changes: 34 additions & 0 deletions app/src/main/res/drawable-v24/toast_frame_style_12.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item>
<shape>
<gradient
android:angle="315.0"
android:endColor="@color/holo_blue_dark"
android:startColor="@color/holo_blue_light" />
<corners
android:bottomLeftRadius="14dp"
android:bottomRightRadius="24dp"
android:topLeftRadius="24dp"
android:topRightRadius="14dp" />
</shape>
</item>
<item
android:bottom="4.0dp"
android:end="4.0dp"
android:start="4.0dp"
android:top="4.0dp">
<shape>
<solid android:color="@android:color/system_neutral1_50" />
<corners
android:bottomLeftRadius="14dp"
android:bottomRightRadius="24dp"
android:topLeftRadius="24dp"
android:topRightRadius="14dp" />
</shape>
</item>
</layer-list>
</item>
</layer-list>

0 comments on commit d0b4325

Please sign in to comment.