我的问题是我想通过每行显示 2 张图像来重新调整帖子中所有图像的大小
我的应用程序将屏幕宽度发送到 php api php api 必须将倾角转换为像素并将图像宽度设置为屏幕倾角的 50%
这是迄今为止的目标
Display d = getWindowManager().getDefaultDisplay();
int w = display.getWidth();
int h = display.getHeight();
String response = get_html_postinfo("bla.php?postid=1&h="+h+"&w="+w);
//response will append it to WebView
在php端
$screen_dip_w = $_GET['w'];
$screen_dip_h = $_GET['h'];
//i want this dip to be converted to pixel how ?
$screen_px_w = ( ? X $screen_dip_w );
$set_image_w = $screen_px_w/2;
任何想法 ?感谢你