public static MaryPopup with(Activity activity) { return new MaryPopup(activity); }
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_popup); ButterKnife.bind(this); popup = MaryPopup.with(this) .cancellable(true) .draggable(true) .scaleDownDragging(true) .blackOverlayColor(Color.parseColor("#DD444444")) .backgroundColor(Color.parseColor("#EFF4F5")); }
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_popup_image); ButterKnife.bind(this); setSupportActionBar(toolbar); popup = MaryPopup.with(this) .cancellable(true) .draggable(true) .center(true) .inlineMove(false) .scaleDownDragging(true) .shadow(false) .scaleDownCloseOnDrag(true) .openDuration(300) .closeDuration(500) .blackOverlayColor(Color.parseColor("#33000000")) .backgroundColor(Color.parseColor("#000000")); }
@Override public void onClick(View v) { if (cancellable && handleClick) { close(scaleDownCloseOnClick); } }
public MaryPopup content(int contentLayoutId) { View contentView = LayoutInflater.from(activity).inflate(contentLayoutId, popupView, false); content(contentView); return this; }
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_popup); ButterKnife.bind(this); popup = MaryPopup.with(this) .cancellable(true) .draggable(true) .scaleDownDragging(true) .fadeOutDragging(true) .blackOverlayColor(Color.parseColor("#DD444444")) .backgroundColor(Color.parseColor("#EFF4F5")); }
@Override public boolean animateExit(@NonNull DraggableView draggableView, Direction direction, int duration) { close(true); return true; } });
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_popup); ButterKnife.bind(this); popup = MaryPopup.with(this) .cancellable(true) .draggable(true) .fadeOutDragging(true) .blackOverlayColor(Color.parseColor("#DD444444")) .backgroundColor(Color.parseColor("#EFF4F5")); }
@Override public void onDraggedStarted(DraggableView draggableView, Direction direction) { MaryPopup popup = reference.get(); if (popup != null) { popup.close(false); } } }
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_popup); ButterKnife.bind(this); popup = MaryPopup.with(this) .cancellable(true) .draggable(true) .blackOverlayColor(Color.parseColor("#DD444444")) .backgroundColor(Color.parseColor("#EFF4F5")); }
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_popup); ButterKnife.bind(this); popup = MaryPopup.with(this) .cancellable(true) .blackOverlayColor(Color.parseColor("#DD444444")) .backgroundColor(Color.parseColor("#EFF4F5")); }
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_popup_center); ButterKnife.bind(this); setSupportActionBar(toolbar); popup = MaryPopup.with(this) .cancellable(true) .draggable(true) .scaleDownDragging(true) .fadeOutDragging(true) .center(true) .blackOverlayColor(Color.parseColor("#DD444444")) .backgroundColor(Color.parseColor("#EFF4F5")); }