adrian
adrian

Reputation: 4594

problems with taking picture using the android camera

After days of struglling I have finally succeded to take a decent picture on a physical device.For this I had to set my activity to have a landscape view. But I'm facing a few problems. First I have to write a text on the image and second the bar with the name of the application appears on the right of the screen and I wanna get rid of it. Here is how it looks: http://i54.tinypic.com/14xi42e.png.

On the physical device the image is looking OK and I don't wanna change that.What I wanna change is the writting.I want it to be set at the bottom of the image horizontally aligned(not vertical how is now). And second I wanna get rid of the bar with the name of the application, the one in the right.

This is a bit of code with the way I'm writting text on the image and how I'm setting up the LANDSCAPE view for the activity:

        public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
         .............
        Canvas c = new Canvas(bitmapResult);
        drawTextImage(bitmapResult);

        ImageView imageView = (ImageView) findViewById(R.id.myPic);
        imageView.setImageBitmap(bitmapResult);
}

private Canvas drawTextImage(Bitmap b) {
        Canvas c = new Canvas(b);
        Paint paint = new Paint();
        paint.setColor(Color.BLUE);
        paint.setStrokeWidth(30);
        paint.setStyle(Paint.Style.FILL);
        paint.setAntiAlias(true);
        paint.setTextSize(8);
        c.drawText("Xperia-Orange!", 1, 80, paint);
        return c;
    }

If you need extra information I'm here to give it to you.Thanks!

Upvotes: 0

Views: 183

Answers (1)

Related Questions