2013-10-16 157 views
0

我已經通過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模擬器中看起來像什麼頁面: enter image description here

這就是我想要的樣子(顯示完整圖像): enter image description here

感謝您的關注!

回答

0

我找到了一個臨時的解決方案,但它看起來並不大的圖像像素化..

enter image description here

我通過把所有的圖像引用到<div>的,然後使用CSS這樣做將max-heightmax-width設置爲<div>中的每一個。

HTML代碼:

CSS代碼:

.leftImage{ 
    margin-left:5%; 
    max-width:45%; 
    max-height:65%; 
} 

.leftImage img{ 
    max-width:100%; 
    max-height:100%; 
}