문제

I got so confused after reading the documentation. I've designed my app to run on small, normal and large screens. my question is: how to prevent my app from being stretched when running on tablets? on other words: I want

the system to draw the application's layout the same as it would on a normal size handset (emulating a 320dp x 480dp screen), with a black border that fills the remaining area of the screen.

as mentioned in the documentation. thank you.

도움이 되었습니까?

해결책

You could possibly create a layout for xlarge screens which contains a RelativeLayout with a black background. In this RelativeLayout import your current layout (see the <include> tag), and position it in the location your require, also set the android:layout_width and android:layout_height in your include tag to 320dp and 480dp, this should force it to keep its size.

I think this should roughly do what you need.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top