Guest User

Untitled

a guest
Aug 16th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. metrics concept with popwindow android
  2. public void displayDropDownPopup() {
  3. dashview = new DashboardItem((Activity) context);
  4. popUp3 = new PopupWindow(dashview, 120, 65, true);
  5. popUp3.setBackgroundDrawable(new BitmapDrawable());
  6. popUp3.setOutsideTouchable(true);
  7. popUp3.setTouchInterceptor(new OnTouchListener() {
  8.  
  9. public boolean onTouch(View v, MotionEvent event) {
  10. if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
  11. popUp3.dismiss();
  12. return true;
  13. }
  14. return false;
  15. }
  16. });
  17. if (appObj.width <= 320 && appObj.height <= 427) {
  18. //y_Value = DataMemebers.SMALL_Y;
  19. popUp3.showAtLocation(dashview, Gravity.TOP | Gravity.RIGHT, 0,66);
  20. } else if (appObj.width > 320 && appObj.height <= 800) {
  21. y_Value = DataMemebers.NORMAL_Y;
  22. } else {
  23. //y_Value = DataMemebers.SMALL_Y;
  24. popUp3.showAtLocation(dashview, Gravity.TOP | Gravity.RIGHT, 0,66);
  25. }
Add Comment
Please, Sign In to add comment