用背景图像填充android,并在横向和纵向视图中进行维护

用背景图像填充android,并在横向和纵向视图中进行维护,android,cordova,Android,Cordova,目标:-在我的应用程序中设置背景图像,在纵向和横向模式下填充设备 使用的工具:带eclipse的Phonehgap 遇到的问题: 1my图像在纵向模式下根据设备宽度进行拟合,但 箱子的高度不同,它只占设备的50% 2在图像中切换到横向模式时 闪烁并在2秒内消失 我在谷歌搜索后添加的代码:- main.xml中的1 <WebView android:id="@+id/appView" android:layout_height="fill_parent"

目标:-在我的应用程序中设置背景图像,在纵向和横向模式下填充设备

使用的工具:带eclipse的Phonehgap

遇到的问题:

1my图像在纵向模式下根据设备宽度进行拟合,但 箱子的高度不同,它只占设备的50% 2在图像中切换到横向模式时 闪烁并在2秒内消失 我在谷歌搜索后添加的代码:-

main.xml中的1

  <WebView android:id="@+id/appView"
            android:layout_height="fill_parent"
            android:layout_width="fill_parent"
      />
3在索引页中

  <meta name="viewport" content="target-densitydpi=device-dpi"  />
or 
<meta name="viewport" content="user-scalable=no, width=device-width" />
<link rel="stylesheet" href="homepage.css" type="text/css" media="only screen and (max-width: 480px)"/>
注意:-剩下的代码是简单的html和css以及所有我们必须做的电话间隙修改

我想要的优惠:-在告诉代码的同时,请告诉我在哪里也包括这些,因为我是eclipse和phonegap的新手


thanx提前

使用jquery mobile,并且在使用android的eclipse作为平台时不做任何更改 将图像填充到设备的大小很简单

{
 background-image:url('Images/indeximage.jpg');
 background-size: 100% 100%;
 background-repeat:no-repeat;
 background-position:100% 100%;
 top: 0px;
 left: 0px;

} 

使用jquerymobile,并且不要在作为平台使用的工具(比如eclipseforandroid)中做任何更改 将图像填充到设备的大小很简单

{
 background-image:url('Images/indeximage.jpg');
 background-size: 100% 100%;
 background-repeat:no-repeat;
 background-position:100% 100%;
 top: 0px;
 left: 0px;

} 

现在告诉我如何修复该景观。切换到横向视图时图像消失现在告诉我如何修复该横向视图。切换到横向视图时图像消失