2013年12月4日星期三

Android realization popupWindows problems

I realize the effect of the current interface as follows: beginning to achieve results, ugly bear to look


effect you want to achieve :

1, this box pops up the original activity or fragment gray page can not be edited ( operation ) , but clicking popupWindow place outside the box , popupWindow box disappears

2, the information display frame popupWindow not fixed , may be more content , how to control the display position it . Can be displayed in the center of the page , if you can show in the list click on the lower right or lower left of the itm ( as shown below: Click on the left listView pop-up box appears in the right half , and vice versa , as shown in the left half ) the better



ask you great God .

------ Solution ------------------------------------ --------
from adpter defined inside , there should be set accordingly. As control , the display position , look inside the layout setting controls , how it occurs , from the beginning , x, y to the end of the x, y,
------ Solution ------ --------------------------------------
screen in the middle pw = new PopupWindow (view, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, true);
pw.setOutsideTouchable (true);
pw.setBackgroundDrawable (new ColorDrawable (Color.TRANSPARENT));
pw.showAtLocation (PopupWindowTestActivity.this.getWindow () getDecorView (), Gravity.CENTER, 0, 0.);
------ eference ----- ----------------------------------

Well, thank you ! Their own way to solve !
------ eference --------------------------------------- < br> LZ can provide some original ACTIVITY dimmed program allows inoperable it? I am also considering this , has not been resolved , followed by the switch dialog do
------ eference ----------------------- ----------------

Oh no , I was also solved with dialog

没有评论:

发表评论