私の問題は、行ごとに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;
何か案が ?ありがとう