저는 팝업레이아웃을 만들고 불러오는곳에서
if(Build.version.sdk_int >= 15 && Build.version.sdk_int < 17)
try{
mWidthPixels = (integer)Display.class.getMethod("getRawWidth").invoke(d);
mHeightPixels = (integer) Display.class.getMethod("getRawHeight").invoke(d);
}catch(Exception ignored)
}
로 화면 크기를 지정한후에
Layoutinflater inflater = (layoutinflater) smartswtich.this.getSystemService(Context.Layout_inflater_service);
View layout = inflter.inflate(R.layout.bettery_pop1, (ViewGroup) findeViewByid(R.id.Popup_element));
pwindo = new PopupWindow(layout, mWidthPixels - 100, mHeightPixels - 850, false);
pwindo.showAtLocation(layout, gravity.center,0,0);
로 팝업을 생성했습니다 근데 저기 굵은글자 보시는것처럼 픽셀을 조정하여 생성한거라서 화면크기에 따라서 짤리기도 합니다 그래서 레이아웃크기를받아와서 생성하고 싶은데 방법을 모르겟네요 ㅠㅠ 능력자분들 도와주셔요
(여담- 왜 여기 복붙이 안되나요.. 저거 손으로 다 친거에요 ㅠ)