public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
setHasOptionsMenu(true);
final View view = inflater.inflate(R.layout.this_fragments_layout, container, false);
new EasyDialog(mainActivity)
// .setLayoutResourceId(R.layout.layout_tip_content_horizontal)//layout resource id
.setLayout(view)
.setBackgroundColor(mainActivity.getResources().getColor(R.color.background_color_black))
.setLocation(new int[]{300, 300})//point in screen
//.setLocationByAttachedView(btnTopLeft)
.setGravity(EasyDialog.GRAVITY_BOTTOM)
.setAnimationTranslationShow(EasyDialog.DIRECTION_X, 1000, -600, 100, -50, 50, 0)
.setAnimationAlphaShow(1000, 0.3f, 1.0f)
.setAnimationTranslationDismiss(EasyDialog.DIRECTION_X, 500, -50, 800)
.setAnimationAlphaDismiss(500, 1.0f, 0.0f)
.setTouchOutsideDismiss(true)
.setMatchParent(true)
.setMarginLeftAndRight(24, 24)
.setOutsideColor(mainActivity.getResources().getColor(R.color.background_color_black))
.show();
I am creating the EasyDialog inside a Fragment. If I don't call show(), then the crash does not occur. I am not sure which child already has a parent. Am I doing something wrong?
Stack log:
My code:
I am creating the EasyDialog inside a Fragment. If I don't call show(), then the crash does not occur. I am not sure which child already has a parent. Am I doing something wrong?