Я пытаюсь создать всплывающее окно android с помощью MvxAppCompatDialogFragment. Я бы хотел, чтобы диалог имел закругленные углы. Когда появляется всплывающее окно, есть белый фон, который я бы хотел избежать.
Я видел похожие проблемы, решаемые с помощью Java, но не для комбо Xamarin / MVVMCross.
Текущий вид всплывающих окон *** сильный текст ***
Мой вид:
namespace FeedMobile.Droid.Views
{
[Register("FeedMobile.Droid.Views.PopUp_IIView")]
[MvxDialogFragmentPresentation]
public class PopUp_IIView : MvxAppCompatDialogFragment<Popup_IIViewModel>
{
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var view = inflater.Inflate(Resource.Layout.popupII, container, false);
return view;
}
}
}
округлен. xml:
<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#ffDB0000" />
<corners android:radius="16dp" />
</shape>
и мое всплывающее окно xml:
<?xml version="1.0" encoding="utf-8" ?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="290dp"
android:layout_height="330dp"
android:orientation="vertical"
android:gravity ="center"
android:background="@xml/roundedbk">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/fontsize_setting_text"
android:text="My Popup Dialog"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/fontsize_setting_text"
android:text="Line 2"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/fontsize_setting_text"
android:text="Line 3"/>
</LinearLayout>