69 lines
1.7 KiB
Java
69 lines
1.7 KiB
Java
package com.arpa.hndahesudintocctmsdriver.util;
|
|
|
|
import android.content.Context;
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import com.lxj.xpopup.animator.PopupAnimator;
|
|
import com.lxj.xpopup.core.CenterPopupView;
|
|
import com.arpa.hndahesudintocctmsdriver.R;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/**
|
|
* @author hlh
|
|
* @version 1.0.0
|
|
* @date 2021/8/20 8:57
|
|
* @description:
|
|
*/
|
|
public class YinDaoFs extends CenterPopupView {
|
|
|
|
|
|
public YinDaoFs(@NonNull @NotNull Context context) {
|
|
super(context);
|
|
}
|
|
|
|
@Override
|
|
protected int getImplLayoutId() {
|
|
return R.layout.my_there_popup;
|
|
}
|
|
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
|
@Override
|
|
protected void onCreate() {
|
|
super.onCreate();
|
|
|
|
}
|
|
// 设置最大宽度,看需要而定,
|
|
@Override
|
|
protected int getMaxWidth() {
|
|
return super.getMaxWidth();
|
|
}
|
|
// 设置最大高度,看需要而定
|
|
@Override
|
|
protected int getMaxHeight() {
|
|
return super.getMaxHeight();
|
|
}
|
|
// 设置自定义动画器,看需要而定
|
|
@Override
|
|
protected PopupAnimator getPopupAnimator() {
|
|
return super.getPopupAnimator();
|
|
}
|
|
/**
|
|
* 弹窗的宽度,用来动态设定当前弹窗的宽度,受getMaxWidth()限制
|
|
*
|
|
* @return
|
|
*/
|
|
protected int getPopupWidth() {
|
|
return getResources().getDimensionPixelOffset(R.dimen.dp_300);
|
|
}
|
|
|
|
/**
|
|
* 弹窗的高度,用来动态设定当前弹窗的高度,受getMaxHeight()限制
|
|
*
|
|
* @return
|
|
*/
|
|
protected int getPopupHeight() {
|
|
return getResources().getDimensionPixelOffset(R.dimen.dp_500);
|
|
}
|
|
}
|