Hi,
I want to add an ImageView dynamically or from an xml into a class which extends View.....
pleas help
this is my code ...but it doesn't show any image...
first class
public class Draw extends Activity {
DrawView drawView;
ImageView imageView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.o...
Trying to solve my current problem of drawing an image on an Android MapView and then animate it to represent a moving object, I decided to try to just draw a raw ImageView at a GeoPoint on the map and then try and animate it from there.
This is the code I put in my map activity (extends MapActivity)'s onCreate method:
GeoPoint point ...
I have a database with 5 columns, 1 column which is a TEXT with the name of a drawable that is /res/drawable folder.
private void fillData() {
mCursor = db2.getAllAchievements();
startManagingCursor(mCursor);
String[] from = new String[]{achHelper.ROW_NAME, achHelper.ROW_DESCRIPTION, achHelper.ROW_POINTS, achHelper.RO...
Hello,
I'm trying to get the real size of an image displayed in an image view. Actually my image is larger than the screen and the imageview is resizing the image to diplay it. I'm looking for this new size.
I've tried to override the onDraw method of the ImageView in a custom view but I'm not getting the correct height and width...
p...
I have a FrameLayout that has 2 images, a big one that that fills the FrameLayout and a very small one that I want to move around.
I try to move the small one like this:
xml file
<FrameLayout android:id="@+id/layTrackMap"
android:layout_width="wrap_content"
android:layout_height=...
How to get that working:
if(findViewById(ResIdWithUnkownType) instanceof Bitmap)
{
Bitmap bitmap = (Bitmap) findViewById(ResIdWithUnkownType);
} else if(findViewById(ResIdWithUnkownType) instanceof ImageView)
{
ImageView = (ImageView) findViewById(ResIdWithUnkownType);
}
...
I have a scrollview that automatically generates a series of subviews containing imageviews. The concept is that it's pretty much a custom PDF style reader, where each page is loaded in to an imageview as an image. There are three "layers" - the outer UIScrollView, the automatically generated subViews and the imageview inside the subview...
If I set my ImageView to be both clickable and focusable, it works, but I have no way to tell which image is focused. What's the best way to get it to draw an orange border around the view so the user knows it's currently in focus?
I tried dropping it in a LinearLayout and setting that to be focusable and clickable instead, but didn't ...
hello guys,
i have a image view which is drag able and zoom able but now i also need to put setOnLongClickListner on my image view. i have done that but it is not working. but when i disabled the ontouch event it started working. can anybody tell me please how to fix that.
here is my code
image.layout(0, 30, screenWidth, screenHeig...
The code to set image to imageView is:
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
SDWebImageManager *manager = [SDWebImageManager sharedManager];
UIImage *cachedImage = [manager imageWithURL:_url];
if (cachedImage)
{
_imageView.image = cachedImage;
[spinner stopAnimating];
}
els...
So I am a complete newb, and am currently taking an intro to Mobile Programming course in which we use Android (I have some experience with Java). I am trying to do a simple assignment which displays a text field and an image, and upon entering the correct "password" and pressing enter, the image changes.
Should be so simple! But I am ...
Hi,
I have an ImageView on which I have applied rotate animation. Since I want the rotation to go on continuously, I gave the repeatCount as infinite in my rotate.xml
android:repeatCount="infinite"
In onCreate(), I load the animation and start it.
Animation myAnim = AnimationUtils.loadAnimation(this, R.anim.rotate);
objectImg.sta...
I've set up an onTouch class to determine when one of my 40 buttons is pressed.
The problem I am facing is determining which button was pressed.
If I use:
int ID = iv.getId();
When I click on button "widgetA1"
I receive the following ID:
2131099684
I would like it to return the string ID "widgetA1"
from:game.xml
<ImageView andro...
Hello all,
How to overlay two images like the one in iphone notification icon or new launcher pro notification? I want to add new image on top right of an imageview to show notification
Here is the example of launcher pro notification and tweetcaster checked button (with facebook icon on topright)
http://londatiga.net/images/overlayim...
I want to load bitmaps into ImageViews in Android, but I don't want to use the R.drawable syntax because I have a lot of images with a standard naming convention so it's much easier to get the image with some logic. For example, all my images are named:
img1.png
img2.png
img3.png
So if a user selects a value, let's say x, I show "img" ...
I have 24 .png images and a ImageView. On user touch I change the ImageView to be one of the 24 images. I'm currently doing setImageResource(R.drawable.hour_1);, but there is a slight delay after I touch the screen and the ImageView actually changes. I figure the delay is the resource being loaded, but I can't find a better way to do thi...
I have file "Image_RGB565.raw" which contains image buffer in RGB565 format. I want this image to be displayed in ImageView. is it possible without extra code of converting to RGB888?
I have tried to
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inPreferredConfig = Bitmap.Config.RGB_565;
Bitmap bitmap = BitmapFactory.de...
Late hour @ work, brain turned off. I have 1 big set of images with different categories. User can choose to view all images or from 1 category only via dialog option. How should I change the default set for image adapter?
Currently the code is rly messy, but images are like:
private Integer[] images = { R.drawable.img1, R.drawable.img...
Hi, This works great for files. I marked the location needing refactoring to get it to work with a bitmap. I can't seem to find a compatible ContentBody for .addPart.
The problem I am trying to solve is that I already have the image in an ImageView within an Activity, so rather than read it again from the SD cara, I want to pass it to...
This has me baffled. I need to copy the Bitmap from one ImageView into another. I do not want to simply copy one ImageView to another because I need to do some changes to the bitmap on its way over.
Here is some code that doesn't work.
ImageView ivSrc = (ImageView) findViewById(R.id.photo);
ivSrc.setDrawingCacheEnabled(true);
Bi...