[android] Fix custom dialog styles

Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
Jean-Baptiste
2026-01-03 23:34:04 +01:00
committed by x7z4w
parent f38953458d
commit e869fe1da1
4 changed files with 15 additions and 4 deletions

View File

@@ -42,6 +42,7 @@ public class ChooseBookmarkCategoryFragment
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View root = inflater.inflate(R.layout.choose_bookmark_category_fragment, container, false);
getDialog().getWindow().setBackgroundDrawableResource(android.R.color.transparent);
mRecycler = root.findViewById(R.id.recycler);
mRecycler.setLayoutManager(new LinearLayoutManager(requireActivity()));
return root;

View File

@@ -77,6 +77,7 @@ public class ChooseBookmarksSortingTypeFragment
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
{
super.onViewCreated(view, savedInstanceState);
getDialog().getWindow().setBackgroundDrawableResource(android.R.color.transparent);
final Bundle args = getArguments();
if (args == null)

View File

@@ -61,6 +61,7 @@ public class StackedButtonsDialog extends AppCompatDialog implements View.OnClic
setCancelable(mCancelable);
setOnCancelListener(mCancelListener);
setContentView(R.layout.dialog_stacked_buttons);
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
TextView title = findViewById(R.id.tv__title);
UiUtils.setTextAndHideIfEmpty(title, mTitle);

View File

@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.Material3.CardView.Filled"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="28dp">
<LinearLayout
android:orientation="vertical"
android:background="?cardBackground"
android:minWidth="@dimen/bookmark_purchase_img_width"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -21,9 +27,11 @@
android:layout_marginEnd="@dimen/margin_base_plus"
android:layout_marginStart="@dimen/margin_base_plus"
tools:text="Select list"/>
<include
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler"
android:layout_marginTop="@dimen/margin_base"
android:layout_height="wrap_content"
android:layout_width="match_parent"
layout="@layout/recycler_default"/>
android:scrollbars="vertical"/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>