私は最初のアプリケーションを「play ストア」に公開しました。このアプリケーションは PhoneGap で作成されています。
アプリケーションはすべてのデバイスで適切に表示されますが、Galaxy S3 および Note II では、font-size と div の高さが大きすぎます。
私は持っている:
if (window.devicePixelRatio == 1.5) {
document.write('<link rel="stylesheet" type="text/css" href="css/hdpi.css">');
} else if (window.devicePixelRatio == 1) {
document.write('<link rel="stylesheet" type="text/css" href="css/mdpi.css">');
} else if (window.devicePixelRatio == 2) {
document.write('<link rel="stylesheet" type="text/css" href="css/xhdpi.css">');
} else if (window.devicePixelRatio == 0.75) {
document.write('<link rel="stylesheet" type="text/css" href="css/ldpi.css">');
}
正しいスタイルシートをロードします。
ギャラクシー S3:
http://img17.imageshack.us/img17/7998/16761073.png
ネクサス4:
http://img802.imageshack.us/img802/2327/88668575.png
2 台のデバイスは 720x1280 です。