添加弹窗,弹窗通用背景
This commit is contained in:
parent
d0b7b065b2
commit
ef34a6cf4f
@ -0,0 +1,27 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.core.CenterPopupView;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 升級精英/尊享戰令
|
||||||
|
*/
|
||||||
|
public class PromotionElitePopupWindow extends CenterPopupView {
|
||||||
|
public PromotionElitePopupWindow(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected int getImplLayoutId() {
|
||||||
|
return R.layout.promotion_elite_popup;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
}
|
||||||
|
}
|
20
common/src/main/res/drawable/background_order_dialog.xml
Normal file
20
common/src/main/res/drawable/background_order_dialog.xml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/background_order_dialog_out_layout"
|
||||||
|
android:gravity="fill_horizontal|fill_vertical" />
|
||||||
|
<item
|
||||||
|
android:bottom="15dp"
|
||||||
|
android:left="15dp"
|
||||||
|
android:right="15dp"
|
||||||
|
android:top="15dp">
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#F5F5FF" />
|
||||||
|
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="8dp"
|
||||||
|
android:color="#657FE4" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
Binary file not shown.
After Width: | Height: | Size: 873 KiB |
10
common/src/main/res/layout/promotion_elite_popup.xml
Normal file
10
common/src/main/res/layout/promotion_elite_popup.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="219dp"
|
||||||
|
android:layout_marginStart="22dp"
|
||||||
|
android:layout_marginEnd="22dp"
|
||||||
|
android:background="@mipmap/background_order_dialog"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user