mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Set corner_radius to custom dialog
This commit is contained in:
parent
b24903fd47
commit
231eab549c
4 changed files with 17 additions and 9 deletions
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
|
|
@ -6,6 +6,7 @@
|
||||||
<entry key="app/src/main/res/drawable-v24/ic_add.xml" value="0.27685185185185185" />
|
<entry key="app/src/main/res/drawable-v24/ic_add.xml" value="0.27685185185185185" />
|
||||||
<entry key="app/src/main/res/drawable-v24/ic_download.xml" value="0.27685185185185185" />
|
<entry key="app/src/main/res/drawable-v24/ic_download.xml" value="0.27685185185185185" />
|
||||||
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.2814814814814815" />
|
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.2814814814814815" />
|
||||||
|
<entry key="app/src/main/res/drawable/dialog_shape.xml" value="0.27685185185185185" />
|
||||||
<entry key="app/src/main/res/drawable/ic_close.xml" value="0.27685185185185185" />
|
<entry key="app/src/main/res/drawable/ic_close.xml" value="0.27685185185185185" />
|
||||||
<entry key="app/src/main/res/drawable/ic_download_for_offline.xml" value="0.27685185185185185" />
|
<entry key="app/src/main/res/drawable/ic_download_for_offline.xml" value="0.27685185185185185" />
|
||||||
<entry key="app/src/main/res/drawable/ic_downloading.xml" value="0.2722222222222222" />
|
<entry key="app/src/main/res/drawable/ic_downloading.xml" value="0.2722222222222222" />
|
||||||
|
|
|
||||||
|
|
@ -51,12 +51,14 @@ public class ServerSignupDialog extends DialogFragment {
|
||||||
|
|
||||||
bind = DialogServerSignupBinding.inflate(LayoutInflater.from(requireContext()));
|
bind = DialogServerSignupBinding.inflate(LayoutInflater.from(requireContext()));
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.AppTheme_Dialog);
|
||||||
|
|
||||||
builder.setView(bind.getRoot())
|
builder.setView(bind.getRoot())
|
||||||
.setTitle("Add server")
|
.setTitle("Add server")
|
||||||
.setNeutralButton("Delete", (dialog, id) -> { })
|
.setNeutralButton("Delete", (dialog, id) -> {
|
||||||
.setPositiveButton("Save", (dialog, id) -> { })
|
})
|
||||||
|
.setPositiveButton("Save", (dialog, id) -> {
|
||||||
|
})
|
||||||
.setNegativeButton("Cancel", (dialog, id) -> dialog.cancel());
|
.setNegativeButton("Cancel", (dialog, id) -> dialog.cancel());
|
||||||
|
|
||||||
return builder.create();
|
return builder.create();
|
||||||
|
|
|
||||||
7
app/src/main/res/drawable/dialog_shape.xml
Normal file
7
app/src/main/res/drawable/dialog_shape.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid
|
||||||
|
android:color="@color/colorPrimary"/>
|
||||||
|
<corners
|
||||||
|
android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
|
|
@ -25,12 +25,10 @@
|
||||||
<item name="alertDialogTheme">@style/AppTheme.Dialog</item>
|
<item name="alertDialogTheme">@style/AppTheme.Dialog</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog">
|
<style name="AppTheme.Dialog" parent="Theme.AppCompat.DayNight.Dialog.Alert">
|
||||||
<item name="android:background">@color/colorPrimary</item>
|
<item name="android:windowBackground">@drawable/dialog_shape</item>
|
||||||
<item name="colorPrimary">@color/colorAccent</item>
|
<item name="android:windowMinWidthMajor">86%</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="android:windowMinWidthMinor">86%</item>
|
||||||
<item name="android:windowMinWidthMajor">82%</item>
|
|
||||||
<item name="android:windowMinWidthMinor">82%</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Divider">
|
<style name="Divider">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue