开发者

Make the screen of my app longer than the device screen

开发者 https://www.devze.com 2023-03-23 15:20 出处:网络
I am developing a game app and I am a newbie to android. My req开发者_StackOverflow中文版uirement is that I want to place 2 copies of my background image side by side, so that my application\'s extend

I am developing a game app and I am a newbie to android. My req开发者_StackOverflow中文版uirement is that I want to place 2 copies of my background image side by side, so that my application's extends horizontally as twice the length of the device and the user has to swipe his finger to go back and forth.


You need to create a HorizontalScrollView and put another layout inside that (perhaps a RelativeLayout or LinearLayout). A scroll view of any type can only have one child.

Place your images inside the inner layout and it should scroll horizontally if the contents are large enough.


Create a ScrollView and put the images inside the scrollview. That way the user can scroll up/down and left/right across the screen if the images are too big for the screen.

0

精彩评论

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