调整大小不工作
问题描述:
我已经通过Android上的screen support部分读取,并看着计算器上的其他职位,但没有解决方案似乎是为我工作多的Android平板电脑屏幕...调整大小不工作
我使用科尔多瓦2.9.0,JavaScript,HTML和CSS来创建这个应用程序。
我试图通过添加代码改变的AndroidManifest.xml:
<supports-screens android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
android:requiresSmallestWidthDp="600"
android:largestWidthLimitDp="720"/>
我自己也尝试下水库改变的main.xml代码 - >布局太:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World, ShowMeWhere"
/>
</LinearLayout>
这是在Android模拟器中看起来像什么页面:
这就是我想要的样子(显示完整图像):
感谢您的关注!
答
我找到了一个临时的解决方案,但它看起来并不大的图像像素化..
我通过把所有的图像引用到<div>
的,然后使用CSS这样做将max-height
和max-width
设置为<div>
中的每一个。
HTML代码:
CSS代码:
.leftImage{
margin-left:5%;
max-width:45%;
max-height:65%;
}
.leftImage img{
max-width:100%;
max-height:100%;
}