开发者

Background image stretching

开发者 https://www.devze.com 2023-01-29 06:52 出处:网络
I have a background image on my layout\'s outer-most LinearLayout.I si开发者_运维百科mply do the following:

I have a background image on my layout's outer-most LinearLayout. I si开发者_运维百科mply do the following:

android:background="@drawable/home_background"

This stretches the image to the dimensions of my phone's screen (or more accurately, the dimensions of the LinearLayout).

Unfortunately, when a user clicks an EditText and the virtual keyboard shows, the image squishes because the height of the LinearLayout has shrunken. How can I get this to not happen?


in Androidmanifest in activity tag use:

<activity
...
android:windowSoftInputMode="adjustPan" >

</activity>

for more info you may check Android Developer reference at

http://developer.android.com/guide/topics/manifest/activity-element.html

good luck,

0

精彩评论

暂无评论...
验证码 换一张
取 消