Problems when put large image in screen (Andengine)
I am using andengine to develop a game . The game is running in LANDSCAPE and emulator resolution is 320*480. when I place the background image as size (320*480) . The images is cleared. But when i place large image (1440*400). The images become faded images. The game play is to move the background image from left to right. The images width automatically increases and makes fade . How do I fix that problem . I used FillResolutionPolicy
public Engine onLoadEngine() {
this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
return new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new FillResolutionPolicy(), this.mCamera));
}
开发者_Go百科
But still having same problem. Any help would be appreciated.
Many phones have maximum OpenGL ES texture size of 1024x1024, so you 1440 width might be the reason.
You can check your phones limit with an OpenGL query, see How can I find the maximum texture size for different phones?
Try RatioResolutionPolicy
instead. Problems when put large image in screen
AndEngine forums should always be your first place to search for answers
You will have to use
android:layout_width="fill_parent"
android:layout_height="fill_parent"
In your image view tag, it will automatically adjust to your screen, if u are using it as a background image then you have to define in it your Linearlayout tag
精彩评论