Android :: Showing ImageView And TextView In Gallery
Oct 6, 2010How to show TextView and ImageView both in a single Gallery View. I want to show Image title for each image just below it.
View 1 RepliesHow to show TextView and ImageView both in a single Gallery View. I want to show Image title for each image just below it.
View 1 RepliesI 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.
Is it possible to add TextView and ImageView on canvas?
View 2 Replies View RelatedIn my application I have a title(TextView) and an Image. The image is grabbed from the web and most of the images are different sizes. Some of these images are to tall and overlap on top of my textview, covering it up. Is there anyway to prevent this? code...
View 1 Replies View RelatedI'm having a problem with incorporating an imageview with a textview into a list view.
Activity code:
Code:
ListView menuList = (ListView) findViewById(R.id.ListView_Menu);
String[] menuitems = {getResources().getString(R.string.playgamebtn),[code]....
displaying the imageview and the textview isn't the problem it is clicking on it. When clicking on the textview, there is an error with the ArrayAdapter.
I coded an AppWidget the user can add to his homescreen. There are a bunch of images (ImageView) in it that perform different actions like starting Activities on click (realised with PendingIntents). To make it easier to navigate through the AppWidget I'd like to use the trackball (as it works with the SearchWidget or FacebookWidget) but I just can't make it work. Here's my layout code for the AppWidget...
So I want to be able to navigate through a bunch of these "Spots" that are all relativeLayouts. How can I make that work out? I'd be really happy about every hint or idea!
I'm having a problem with setImageURI on my ImageView objects. I was using setimageResource(R.drawable.x), which was working fine, but now I'm trying to change over to using URIs so that I can be more flexible about my image source (not constrained to pre-packaged images).
I'm using ImageView.setImageURI(uri), where uri is (for example android.resource://com.example.hellogridview/2130837520, which I created by doing Uri.pars ("android.resource:// com.example.hellogridview/" + R.drawable.x). I took this method from my MediaPlayer, where I created URIs for R.raw wav files from this path.
It's not throwing any errors that I can see, but it's just displaying blank images. The images are ~150px each way and I'm displaying them about half size - would that cause a problem?
When I load an image frome the media gallery into a Bitmap, everything works fine, except that pictures that were shot with the camera while holding the phone vertically, are rotated so that I always get a horizontal picture even though it appears vertical in the gallery. how can I load it correctly?
View 3 Replies View RelatedI have a query i want to set my ImageView over the Gallery,How to do this? One more thing is there any possibility to display images in android app without using Gallery view.
View 6 Replies View RelatedI have a normal TextView which has multiple lines. I set its max number of lines to 3. I'd like it to show an ellipsis at the end if the text is too long:
TextView tv = new TextView(context);tv.setLines(tv); tv.setText("some really long text.");
I tried the set ellipsis calls but it doesn't seem to do anything - the text appears the same way. How do we get this to work?
What i m trying to do is, just showing numbers from 1 to 100 in a textview, randomly, and keep on changing until the view is active.
But i am not able to continuously change random number when view is active.
it is just like a timer showing decrement from 10 to 0, but the only difference is i need to show random numbers in between 0 to 100.
How can show this on my view. this is how i am trying to do something..may be a better approch will help me out. Code...
In testing my app across different OS versions I've noticed what appears to be carriage returns showing as visible squares in TextView. This doesn't happen on Froyo wondering if anyone knows how get around this in previous versions?
View 2 Replies View RelatedI'm wondering how I can create a custom pop-up like the one in the screenshot below (borrowed from the Swype keyboard), where I can have a couple of buttons, which each commit a string to the currently "connected" TextView (via a InputConnection). Please note: this is an InputMethodService and not an ordinary Activity. I already tried launching a separate Activity with Theme:Dialog. However, as soon as that one opens I lose my focus with the TextView and my keyboard disappears (and with that my InputConnection is gone).
View 3 Replies View RelatedI'm making an alternative camera App. As you might expect my App involves taking pictures and saving them to the sdcard. On most phones (and the Emulator) everything works fine, pictures appear in the built-in Gallery App straight away. However on the HTC incredible images only appear when the user restarts the device. (I'm talking about an HTC Incredible phone with an sdcard, I know some of them shipped with internal storage only, but this is not the issue I'm talking about) The code I'm currently trying goes like this: I've also tried MediaScannerConnection.scanFIle() with no luck. I wonder is the problem is due to the HTC incredible being originally designed to operate with internal storage only, maybe the Gallery App has issues with media stored on the sdcard. You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
View 4 Replies View RelatedI searched all over and cannot find something about this issue: My problem is all my photos in gallery look really low resolution until I zoom in slightly on the photo. At that point the detail snaps in. But when I just open it up it looks to be about half res. Any idea what is causing this and how to prevent it?
View 4 Replies View RelatedBasically I downloaded the app ES File Explorer and I cut everything on the internal storage and pasted it in to my SD card. Everything worked perfectly except now I can't view any of my photos in the gallery, it seems as if they all just disappeared! I noticed something during the switch over from the internal to the SD card that a message about DCIM came up. Now apparently that has to do with photos and I just skipped it. I went into my SD card folder after and it only shows the pictures that have been screenshot and those that have been posted on Instagram. None of my pictures that have actually been taken with my camera are in my sd card folder neither in my internal storage.
Does this mean they have been deleted because I pressed skip during the transfer?
The phone I am using is the Motorola Razr I XT890.
I've created an application that show around 250 images in ImageView. Images are loaded one after another, 15-30 images per second. Basically the whole thing gives an illusion of a rotating 3D object, at least it should.
The problem is next, app hangs when loading certain images(i.e. I see a few seconds of fluid animation and then animation hangs, jump 10-15 frames(images) ahead and continues. It always happens at the same places in animation cycle.
I though that Android might not have enough resources to handle something like this, so I've resized images to half their size, but it did't help. I've tried buffering images but that did't help either(actually, maybe a little, I think that animation looks a little bit smoother).
And now the weirdest thing. I use the touch screen to allow users to "rotate" the 3D object on those images, and while rotating I again experience those hangs at exactly the same places as with the animation.
All images are in .png format and their size vary from 15kB to 40kB.
I use the following code for the animation:
CODE:.....................
I have never had any gallery problems that i can remember, but all of a sudden my images/folders arent showing in the gallery. I use a file explorer, and it shows that all my files are there, but for some reason nothing will show in the gallery. sometimes i can gt it to show a "camera" folder and like 3 "download" folders, and some weird folders with numbers and stuff, but they never show thumbnails and wont let you click them.
Gone are my picture folders, and also the galleries from picasa web. I have the droid, with the latest updates and everything. Never had this problem before. Was working the other day. Today i was tryin to send someone a picture, and noticed this.
So whenever i save a picture using the default browser... it will not show up in the gallery. How do you fix this? Extremeeeellyyy irritating. When i look at downloads on the browser it will show only the picture you clicked on as being in the gallery, but as soon as you open the regular gallery outside the browser download menu... it wont show up. Who would have thought it would be so hard to update a twitter pic on such a "smart"phone -__-
View 1 Replies View RelatedAnyone else have this problem? I take a photo and its not there and takes opening and closing the gallery a few times. Sometimes I have to take another photo and then they both show up. Is this a bug with 2.1 or is there a fix for this?
View 28 Replies View RelatedI was just wondering if there was a way to protect certain pictures from showing up in the gallery while still allowing unprotected access to the others.
View 9 Replies View RelatedThis is my first android powered phone ever. I just migrated from a crackberry and I do love the phone, it just irritates the holy moses out of me. Its a Samsung S4.
The phone has this nasty habit of not deleting my files that I want to delete. I am talking about photos here. old crap photos that I dont want anymore or that are somewhat inappropriate as I use my phone for business but they constantly reappear on my phone. I have no idea where they are hidden or go and then come back from. I have even taken the SD card out of the phone and deleted them off there only to find them back on. I had SYNC completely disabled but that is also not an option as I have lost work due to emails not getting to me in time, silly damn phone.. So how in the world does one permanently delete the photos of the phone and why do they keep on popping back up after being deleted? Especially if you use the rapid shoot mode, i dont want to keep all the bad ones but after I delete them they reappear.
My rar extracted folders (with images) do not show up in the gallery.I tried Androzip & B1, both give the same results.
View 2 Replies View RelatedI'm an iPhone user. Upgraded from a AT&T Samsung Fascinate to a AT&T Galaxy SII Skyrocket.
When we put her SD card from the Fasc into the Sky, all her pictures didn't transfer over, I guess only the main "Camera" album. I used the Astro app and see that the additional images that aren't showing up must be in a subfolder called ".thumbnails", since it's full of image files.
I downloaded Rescan Media and ran that but it didn't work.
I just finished the update to 2.1, and all went well. But when I went to look at my gallery, it downloaded and is showing all of my Picasa pictures! It never did this before, and I can't seem to find a settings menu to make it not do this! I would go ahead and delete the folders it added from Picasa, but before I do this, I want to make sure that it's not going to delete them on my Picasaweb account too.
Did anyone else have this problem? Will deleting the Picasa pics that showed up on my phone make the ones on my online account go away?
Never mind, just found the answer:
Similar to syncing for contacts and email, thumbnails of synced photos are transferred wirelessly, so there's no need to plug your phone into your computer. You can add and select the Google accounts associated with the Picasa photos you want to sync with the Gallery in the "Accounts & sync" tab under Settings. Click on an account and mark the checkbox next to "Sync Picasa Web Albums" to automatically pull your online photos into the Gallery.
It still would have been nice if this were an opt-in thing, but at least I can turn it off...
I have a Samsung Galaxy S II Plus and I recently updated the Dropbox app. After updating, the Gallery app is showing all the pictures I have in my Dropbox, this did not happen before the update. I had a clean Gallery with only the pictures in my phone. I checked the accounts in the settings, but I don't see anything in the Dropbox account settings.
I do not want to see these pictures in my phone. How can I stop this sync?
I believe this is pretty trivial but I can't get it to work. I want to display a default image in gallery elements (ImageViews) while their actual image is being fetched from the net. Right now, nothing is shown for an ImageView which its image has yet to arrive. Once it arrives it is immediately shown. What I tried is right after the instantiation of the ImageView to call its setImageResource function like so:
final ImageView i = new ImageView(mContext);
i.setImageResource(R.drawable.loading);
But it doesn't seem to work. Below is the full getView() function.
public View getView(int position, View convertView, ViewGroup parent) {
final ImageView i = new ImageView(mContext);
i.setImageResource(R.drawable.loading);
// if the drawbale is in the buffer - fetch it from there
Drawable bufferedImage = DataManager.getInstance().getImagesBuffer()[position];
if (bufferedImage != null){ i.setImageDrawable(bufferedImage);
BitmapDrawable drawable = (BitmapDrawable) i.getDrawable();
drawable.setAntiAlias(true);
} // if drawable is not in buffer - fetch it from the net via AsyncImageLoader
else { String imageUrl = DataManager.getInstance().getImageBufferInstance().getImageUrl(position);
Drawable downloadedImage = AsyncImageLoader.getInstance().loadDrawable(imageUrl, new ImageCallback() {
public void imageLoaded(Drawable imageDrawable, String imageUrl) {
if (imageDrawable == null) { imageDrawable = getResources().getDrawable(R.drawable.icon);
} i.setImageDrawable(imageDrawable); BitmapDrawable drawable = (BitmapDrawable) i.getDrawable();
drawable.setAntiAlias(true);
} } ); i.setImageDrawable(downloadedImage);
} i.setLayoutParams(new CoverFlow.LayoutParams(Utils.getInstance().getScreenWidth() / 2, Utils.getInstance().getScreenHeight() / 2));
i.setScaleType(ImageView.ScaleType.CENTER_INSIDE); return i;
I have a gallery widget and in that i had a view with linear layout which has a edit text inside. When it launches on device the edittext box shows but has no text visible.
However when i scroll to next view in gallery it shows text and when it comes to focus and centered the text disappears.
If i replace gallery with grid or a horizontal view I can see the text on edit text.
Can you please advise what I might be doing wrong here. Why the text disappears.
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?
I want to do something like that. For example, I have a textview with String
Alibaba love Mary so muck. In that String alibaba and Mary have a event to open something but I can't know how to use event for Mary and Alibaba seperately