Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6388397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:16:25+00:00 2026-05-25T03:16:25+00:00

I have a simple photo taking application that has the following design: [Consider the

  • 0

I have a simple photo taking application that has the following design:

[Consider the landscape mode for simplicity]

  1. On the left side there are a some buttons
  2. On the rest of the surface (the right side) I put the camera image preview

The resolution of the image is the same as the screen dimensions. For example if I have a 800×480 resolution of the screen the image has also the 800×480 resolution.

What I want to do is to move the image preview into the right side. By moving I mean the following:

Let’s say that my resolution is 800×480. The left side (with buttons) has a size of 200 pixels. That means there are 600 pixels left for the image preview while the image is 800 pixels wide (800×480). This means that I can move the image on the x axis by 200 pixels (at most – that’s nOffset variable below). On Android 2.2 this worked very well with the use of the following code:

SurfaceView cameraView;
....
cameraView.setLayoutParams(new AbsoluteLayout.LayoutParams(
                                  surfaceWidth, surfaceHeight, 
                                  nOffset, 0)
);

My questions are:

  • What’s wrong with this code in 2.3 while in 2.2 it works well?
  • Is there a better way to move the preview image into a screen area?

Thanks for any suggestion and alternatives,

Iulian

PS: cameraView is under another surface which has set on it

holder.setFormat(PixelFormat.TRANSLUCENT);
setZOrderOnTop(true);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:16:25+00:00Added an answer on May 25, 2026 at 3:16 am

    All our tests show that this is an Android 2.3 issue. The image cannot be moved but instead it is stretched when we try to do the things that work on Android 2.2.

    This is the result of our investigation; it’s clearly not expected and comes somehow as a surprising “regression”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple form that generates a new photo gallery, sending the title
I have created a rather simple photo gallery that I wish to apply PayPal
I currently have a simple rewrite that redirects /photos/2 to /photoviewer.php?photo=2 However I need
In the Photo model I have following simple rule: searchable do string :note end
I have a fairly simple Action in an MVC3 application that should render an
I have a simple iPhone application I am making that will upload pictures to
I have a code for a simple photo gallery that had been writen with
I have simple php validation form that is halfway working. If you leave the
I have simple win service, that executes few tasks periodically. How should I pass
I have a simple php site that I built, but for some reason my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.