Android :: Why Bitmap Is Placed On An An Imageview Incorrectly?

Nov 24, 2010

this problem has been bothering me for days and I cannot figure out why on earth it is happening. I have a method that detects for a face, if a face is detected, the method will draw a rectangle on a canvas along the face.That part works fine.The problem is, when it displays to the image_view in my xml file, it will display on the far left middle of the image view, in a box, rather than in the center with the width as fill_parent.I thought of a possible workaround : to set the bitmap as a bitmapdrawable, but canvas only draws to bitmaps, so I can get the bitmapdrawable in the middle, but with no red box around it.I commented out my testing of bitmap drawable, and left it as what I have now...it only displays to my xml in the far left of the image_view.

Android :: why bitmap is placed on an an imageview incorrectly?


Android :: ImageView Always Displaying Incorrectly

Nov 21, 2010

My ImageView for some odd reason is always displaying a picture in the middle, left of my screen despite the xml code insisting it to be in the center.So, the page should display as Picture in the middle, extending the width of the screen, the text below that and the button below that.But for some reason, the picture is displayed as a small, box thumbnail in the middle left of the screen.any ideas on a workaround?

View 1 Replies View Related

Android :: How To Set Bitmap To ImageView In Main.xml?

May 28, 2010

I have a Imageview in main.xml, how to set the bitmap the to the imageView in main.xml i can assign bitmap to the local image view in the below code...

View 1 Replies View Related

Android :: Bitmap In ImageView Is Cropped Off The Screen

May 14, 2010

I'm working on an Android application that needs to download an image and display it inside an image view. The Bitmap is passed to the main java file and added to the image view like this:

CODE:.......

This works, except that the left side of the image disappears off the screen. The ImageView is in a ScrollView and the scroll view maintains the correct size. This means that there is black space to the right in the ScrollView and the image is cut off to the left.

The XML for the ImageView is this:

CODE:.......

Any idea why my image is being cut off?

View 5 Replies View Related

Android : How To Place A Bitmap Image In ImageView?

Jun 9, 2010

I have a Bitmap image (bm) and a an ImageView (iv) of 50 by 50 when i do iv.setImageBitmap(bm) ... only a portion of the entire image is seen ..How can i see the whole image in the 50 dip by 50 dip ImageView...

View 9 Replies View Related

Android :: Converting A TextView - Bitmap - ImageView - Nothing's Showing Up

Nov 12, 2010

I started a test project just to get this down. No changes to main.xml. I want to create a widget-sized ImageView (80x100) that contains a Bitmap converted from a TextView. Yes, that sounds very roundabout but this is just for testing; in the end I want the ImageView to have a background image and multiple TextViews. I'm not sure exactly what I'm doing wrong, but nothing is being pushed to the screen.

Is it a problem with declaring the TextView/ImageView and passing it "this" in the constructor? Is it a problem with my layoutParams? Here is the code:

package com.doaf.testproject;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView; Code...
I'm relatively new to Android, and pretty lost with this one.

View 3 Replies View Related

Android : Bitmap Memory Handling With ImageView.setimage

Jun 4, 2010

I've read a lot of previous messages on this topic but couldn't find universal agreement on the whole. I can't reproduce this in house, but a customer got an OutOfMemoryError when using an icon chooser dialog.

This dialog is much like the Grid1 example - only it's in a dialog.

The bitmap memory seems to run out after running the dialog a few times for a customer, resulting in java.lang.OutOfMemoryError: bitmap size exceeds VM budget. Should I try to call recycle on the bitmap from an ImageView when I reuse the view? Or would the ImageView do that anyway?

But even if I do that, that's only a small portion of the bitmaps because most of them are seen without scrolling. The Adapter and the GridView are both local variables and therefore shouldn't be referenced after the dialog is dismissed.

I do believe that it should be possible to use many bitmaps in an app - Google Maps does it, Picture Gallery does it. But maybe I need to learn more rules. Some say you should call bitmap.recycle, some say you shouldn't have to. Many say calling gc.collect will make it worse, etc.

View 2 Replies View Related

Android : Preventing Scale On Bitmap Created In Execution Time For ImageView

Sep 23, 2010

I have a ImageView acting as a top banner on top of a webview. The image of this banner is created in execution time dependending on the resolution of the device. The height of the banner is always the same for each resolution. The only thing that changes is the width, which changes according to the orientation. But, since the width changes and the height doesn't, I end up having sort of 2 images with different proportion. And this is way the scale down/up won't work out for me.

Another problem is that everytime the user rotates the screen, the banner image is created again but Android seems not to update the image and thus I have a banner missing part of it.

I thought about having a real big image that will fit for both landscape and portrait orientation. But this seems not to be a good idea since Android keeps resizing the image everytime so it will fit on the space of the ImageView.

I'm running out of ideas here. Can someone suggest something?

View 1 Replies View Related

Android :: How To Change Size Of Bitmap Contained In ImageView / Without Affecting Surrounding View

Oct 14, 2010

I have an ImageView that contains a bitmap. Now the bitmap can change size within a known range. This makes the surrounding views to relocate which I want to prevent. I've tried setting margins and padding for the ImageView but without success.

View 1 Replies View Related

Android : Crop Bitmap Without Reading Entire Bitmap / Cannot Read Image Into Memory

Jul 21, 2010

I have a very large image and I only want to display a section the size of the display (no scaling), and the section should just be the center of the image. Because the image is very large I cannot read the entire image into memory and then crop it. This is what I have so far but it will give OutOfMemory for large images. Also I don't think inSampleSize applies because I want to crop the image, not lower the resolution.

Uri data = getIntent().getData();
Input Stream is = getContentResolver().openInputStream(data);
Bitmap bitmap = BitmapFactory.decodeStream(is, null, null);

Any help would be great?

View 3 Replies View Related

Android :: Create Mutable Bitmap From Camera - Draw Another Bitmap On Top - And Save It

Apr 2, 2009

I am 1) taking a picture and 2) then draw another Bitmap on top of it 3) then I store it

I am doing it as follows and it works on the emulator.

On the device I get a OutOfMemoryError: bitmap size exceeds VM budget android.graphics.Bitmap.nativeCopy(Native Method) android.graphics.Bitmap.copy(Bitmap.java:199) in the line copy the Bitmap to get a mutable Bitmap.

CODE:...........

What I am asking:

a) Is there a better way to do what I am doing? 1) take a picture 2) draw another Bitmap on top of it 3) then I store it

b) What is the best way to create a mutable Bitmap from the picture I just took with the camera?

In my app, resolution is not an issue. If it works better for small photos that would be fine.

View 3 Replies View Related

Android :: Overlay Bitmap - Draw Over A Bitmap

Oct 8, 2009

I have two questions actually:

Is it better to draw an image on a bitmap or create a bitmap as resource and then draw it over a bitmap? Performance wise... which one is better?

If I want to draw something transparent over a bitmap, how would I go about doing it?

If I want to overlay one transparent bitmap over another, how would I do it?

View 1 Replies View Related

Android :: Draw A Bitmap Rotated Onto Another Bitmap

Mar 22, 2009

My goal is the draw a bitmap onto another bitmap but rotated 90 degress. whats the most efficient way to do that. My current method is as follows which is horribly bad because it creates a new bitmap every time.

CODE:.....................

View 4 Replies View Related

Android :: Imageview Ontop Of Another Imageview

Jun 15, 2010

I have a listlayout with items in it that looks like this:

There is first an ImageView (the light) and then two textViews. All of this inside a TableLayout. (source here: http://code.google.com/p/switchctrl/source/browse/trunk/android/res/layout/device_switch.xml)

I want to have a rotating animation of a loading indicator Ontop of this light when this particular device (light) performs an action or an action is performed on it.

How do I put an animation ontop of this light imageview?

View 1 Replies View Related

Android :: ImageSpan Is Cut Off / Incorrectly Aligned

Jul 15, 2010

The result (builder) is set as text to a TextView. It works just fine if the span is surrounded by text, i.e. when the start > 0 and the end < length - 1, but the image is cut off (shifted up) if there is no text around it. how do I fix that?

View 1 Replies View Related

Android :: Gradient Image Is Displayed Incorrectly

Sep 21, 2009

I have got another mysterious issue. So, I am setting a background image for LinearLayout. This image contains gradient. Don't know why, but after I launch application the image appears to consist of several parts that actually form "smooth transition" of gradient, and that's why it seems that background image is not a gradient.

View 1 Replies View Related

Android :: Left-to-right Alphabets Are Rendered Incorrectly

Nov 3, 2010

Android's textView does not correctly input characters when left-to- right Unicode characters, such as those of Hebrew or Arabic, are used. For languages such as Arabic, morph transformation is also required that is not done correctly either (or at all!).This is also obvious when using Facebook App on Android to read posts in LTR languages, which is completely messed up and totally illegible.Can someone from Android OS address this? I would like to extend our patented virtual keyboard (MessagEase) for Entering Hebrew, Persian, and Arabic, among other languages, but currently it's impossible to do so.

View 5 Replies View Related

Android :: Draw Shape Or Bitmap Into Another Bitmap - Java - Android

Jun 22, 2010

I want to draw a shape(many circles particularly) into a Specific Bitmap. I have never used canvas / 2D graphs etc. As i see it i create a Drawable put the bitmap in it then "canvas-it" to the shapes i want etc.

View 1 Replies View Related

Android :: OpenGL Works Incorrectly When Projection Matrix Is Set To Identity?

Jun 23, 2010

I have an OpenGL app that manipulates it's geometry in screen space to acheive some effects, and therefore bypasses OpenGL's matrices by setting modelview and projection to identity. For some reason, Android's OpenGL implementation seems to be unhappy with this, and doesn't draw anything. The same app, compiled from the same code base, works fine on windows and on iPhone. If I load the app's projection matrix into GL's matrix, and multiply it's inverse with the final geometry prior to drawing it (which is effectively a no-op) it displays correctly.

View 6 Replies View Related

HTC Desire :: SMS Incorrectly Ordered

Apr 27, 2010

Weird thing I've noticed is that in some text message threads replies are listed before my text.One thing I was thinking was when I set up the phone I adjusted the clock to be a minute or two fast. Could this affect the message ordering? Assuming the phone orders them by time sent?I may have answered my own question but I thought it would be smarter than that!

View 2 Replies View Related

HTC Desire :: Birthdays Being Shown Incorrectly

Jun 10, 2010

I have birthday details for some of my contacts entered into my googlemail account.then I click Phone from the home screen and then select the a contact the Birthday section under information shows one day earlier, e.g. birthday set as 25th August shows as 24/08. Is this a known bug, and if not how do I report it to HTC?

View 5 Replies View Related

HTC Hero :: Voicemail Number Incorrectly Set As Default

May 13, 2010

When I first got the phone, I incorrectly set the number then reset it soon after. It seems to default back to that first wrong number. Am using the HTC Hero on 3 (UK) network - every now and again it decides to lose or update the voicemail number it dials when I press and hold the #1 key. Have reset it more times than I care to remember.

View 3 Replies View Related

HTC EVO 4G :: Touch Input Freezes / Works Incorrectly

Nov 4, 2010

To start: I searched the forums for this problem but didn't see anything similar. If this is a repost, sorry, please give me a link to a solution.The problem seems to go away when I shut off the screen and then turn it back on again. However, I sometimes have to do this three times in order to type a single sentence text. I did a hard reset earlier today and it was fine for a few hours. It seemed to come back after I installed some of the apps I had before it was reset. I've read that there was an issue with the earlier Evos about the screen not being grounded, but this seems more of a software issue to me. Anyone know what I can do?

View 7 Replies View Related

Nexus :: Phone Number Reporting Incorrectly

Mar 9, 2010

My Nexus One reports "My phone number"
(Settings => "About phone" => Status ) - as the SIM number before my "previous 'phone" number was PAC'd and ported... The PAC transfer happened about 3 weeks ago.,... The phone appears when calling anyone else as my transferred number, rings when called as the transferred number, ... but the beast reports the original, old" number. As it happens I've also done a "Factory reset" on the N1 ... Weird... so everything works as it should do, but the number is miss-reporting...

Any suggestions...e.g. ????
a) It's just one of those things, deal with it..
b) It's a known Android bug, deal with it...
c) It's a Nexus-One special, deal with it...
d) Oh! New one, report it to Mssrs Google...
e) HTC dogs all behave like this....

View 13 Replies View Related

Samsung Galaxy S :: SMS Sender Names Displayed Incorrectly

Aug 26, 2010

Sometimes when i recieve a text, the drop down notification bar might say its from "Mike" for example, when actually when i go into the text application, it is from my wife or someone else.

View 2 Replies View Related

General :: Browsers Incorrectly Loading Webpages Very Small?

Nov 20, 2012

I'm had a really strange bug/problem in Android for months and I still haven't been able to find the roou cause of it in order to fix it. For some reason the browser is not rendering correctly webpages - the fonts are extremely small and the page is off centered. This is happening only while on 3G/Edge connection - if using WiFi this issue doesn't occur.

This happens with every single browser: Stock Browser, Firefox, Chrome, Dolphin, etc.

I thought this was a ROM specific issue, but I have tried flashing more than 3 ROMs now (every time I've flashed i've done a wipe cache, wipe dalvik cache and wipe data/factory reset) with no luck. I also tried formatting the internal SD.

View 2 Replies View Related

Motorola Droid :: Facebook Touch Identifies Phone Incorrectly

May 4, 2010

Ever since the 2.1 update (forced following directions on here) when I go to the facebook touch site in the stock browser (or xscope) it says at the bottom "Download Facebook for your Hero" but I have the DROID.

View 3 Replies View Related

General :: Galaxy Note 3 - Typed Email Incorrectly For Verification

Jan 16, 2014

I bought a new galaxy note 3. I typed my email incorrectly so didn't receive the verification email from samsung.

View 1 Replies View Related

Sony Ericsson Xperia X10 :: Geotagging Incorrectly Reported In Image Information

Sep 17, 2010

I want to geotag any photos I take with my Xperia X10 and have the phone set up to do that. When I display the photos on my phone and examine the jpg information. I see the Filename, date and data for Latitude and Longitude. However, the Longitude data is always misreported (showing 1 degree and 53 minutes greater than true). When I transfer the photos to my PC and examine EXIF meta data using PhotoME (and other similar software) the correct Longitude is reported. Has anyone else had a similar problem? I have emailed Sony but don't expect to hear from them until the next millennium.

View 1 Replies View Related

General :: Droid Razr Maxx Incorrectly Reading Battery Or Not Charging

Jul 26, 2012

I usually charge my phone over night and I have never had any problems. Last night my phone didn't charge and I woke up to a 15% charge. I figured that I must have knocked the charger out of the outlet, so I just took it to work with me to let it charge today. It's been charging for almost an hour and there is still no change in the charge (now it's at 10%). When I go under settings and look at battery use, I see that I have "1d 0h 18m 22s on battery." I don't know if my phone is just incorrectly reading my battery or something.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved