title: How to stretch to fit background image on live wallpaper
body: <p>I am trying to set the background of my live wallpaper so as to fit perfectly on screen. Current wallpaper size is 1024x1024, but only a part of the image  is appearing on my HTC Desire screen(size is 480 x 800).
  Also, when i try to set an image of less than 480x800, the image doesn't stretch to fit the entire screen.</p>
  
  <p>Is there any way by which this can be achieved so that the wallpaper fits perfectly atleast by height irrespective of screen size?</p>
  
  <p>Here is my code for your reference-</p>
  
  <pre><code>private static final int CAMERA_WIDTH = 480;
  private static final int CAMERA_HEIGHT = 720;
  
  
  @Override
  public EngineOptions onCreateEngineOptions() {
   final Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
   return new EngineOptions(true, ScreenOrientation.PORTRAIT_FIXED, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);
  }
  
  
  @Override
  public void onCreateResources(OnCreateResourcesCallback pOnCreateResourcesCallback) throws Exception {
   .
   .
   this.mBitmapBackgroundAtlas1 = new BitmapTextureAtlas(this.getTextureManager(), 1024, 1024);
   this.mFaceBackgroundRegion1 = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mBitmapBackgroundAtlas1, this, "bg1.jpg", 0, 0);
   this.mBitmapBackgroundAtlas1.load();
   .
   .
  }
  
  @Override
  public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) throws Exception {
   this.mEngine.registerUpdateHandler(new FPSLogger());
   .
   .
   mScene.setBackground(new SpriteBackground(new Sprite(0, 0, mFaceBackgroundRegion1, this.getVertexBufferObjectManager())));
   .
   .
  }
  </code></pre>