je veux déplacer et rejeter ma fenêtre popup comme commentaire facebook/comme fenêtre popup faire. Je me suis essayé et j'ai cherché mais j'ai échoué. Pouvez-vous s'il vous plaît m'aider à le faire.fenêtre popup ne bouge pas comme commentaire facebook/comme fenêtre popup faire
mon code:
int display_width=context.getResources().getDisplayMetrics().widthPixels;
int display_height=context.getResources().getDisplayMetrics().heightPixels;
final PopupWindow popupWindow=new PopupWindow(viewTmp_comment, display_width, display_height-60,true);
popupWindow.setOutsideTouchable(false);
popupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
popupWindow.showAsDropDown(view);
popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
popupWindow.setTouchable(true);
popupWindow.showAtLocation(view, Gravity.CENTER,0,0);
popupWindow.setContentView(view);
popupWindow.getContentView().setOnDragListener(new View.OnDragListener() {
@Override
public boolean onDrag(View view, DragEvent dragEvent) {
switch (dragEvent.getAction()) {
case MotionEvent.ACTION_DOWN:
Toast.makeText(context,"Down",Toast.LENGTH_LONG).show();
popupWindow.dismiss();
break;
// case MotionEvent.ACTION_MOVE:
// Toast.makeText(context,"Up",Toast.LENGTH_LONG).show();
//// popupWindow.dismiss();
// break;
}
return false;
}
});
ne bouge pas un peu – AAA
avez-vous ajouté l'animation à votre vue dialogue? –
oui j'ai ajouté de l'animation mais pas travaillé – AAA