imageview

Constraint layout not showing image from ImageView when app run

自闭症网瘾萝莉.ら 提交于 2019-12-10 12:43:48
问题 I am trying to add some Images by ImageView in Android Activity(ConstraintLayout), on Android Studio Preview screen, it's showing images correctly, but when I am running the app on real device or emulator, it's not showing the image. Below is the code which I am using, <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas

During the Loading several images in ImageView get Out of Memory exception [duplicate]

孤街浪徒 提交于 2019-12-10 12:25:16
问题 This question already has answers here : Strange out of memory issue while loading an image to a Bitmap object (43 answers) Closed 5 years ago . Hello I have created an Application. In application i loading the several images from URL. But during the loading of images i get the Out Of Memory exception. Give me solution about this problem. 回答1: Well, Now image loading time from internet has many solution. You may also use this library "Android-Query" https://code.google.com/p/android-query

custom ArrayAdapter<Object> ViewHolder : imageView changes for several items in Listview not for one only

折月煮酒 提交于 2019-12-10 12:18:59
问题 ok i encounter a problem with this custom ArrayAdapter public class AuthorsAdapter extends ArrayAdapter<Entity> { View row; static class ViewHolder { TextView textViewTitle; TextView textViewEntitySummary; ImageView imageViewPicture; } public AuthorsAdapter(Context context, LinkedList<Entity> entity) { super(context, 0, entity); } @Override public View getView( final int position, View convertView, final ViewGroup parent) { row = convertView; final ViewHolder holder; if (row == null) { row =

Why does my UIImageView replace the second one?

假装没事ソ 提交于 2019-12-10 12:16:03
问题 I have two outlets for two different UIImageViews, when I select the first one it'll appear on the first Image View but when I select the second Image, it replaces the first Image View even though it's connected to the second ImageView. This is my code for the Select Image button. @IBOutlet weak var myImageView1: UIImageView! @IBOutlet weak var myImageView2: UIImageView! @IBAction func pickImage1(_ sender: Any) { let image = UIImagePickerController() image.delegate = self image.sourceType =

How can I click the whole row in a list activity with a custom adapter instead of just the image I added?

此生再无相见时 提交于 2019-12-10 12:14:29
问题 I'm creating a ListActivity that has only images in the rows. I can display the images already but when I try to click on the row it does nothing. I can click on the image that I've added but I would like to be able to click on the whole row like a normal List Activity. Can anyone tell me how I can do that? Not sure why the code backtick isn't picking up my first line but here it is: Still haven't been able to solve this problem. Anyone? public class AddNote extends ListActivity { IconAdapter

Android: Read image as thumb in runtime

时光毁灭记忆、已成空白 提交于 2019-12-10 12:08:39
问题 For a custom gallery im creating using a gridview with imageviews, i wish to read an image from sd storage. This gives me huge perfomance issues, because it will read the whole image, and load this into the imageview. How can i read a large image as a thumb in runtime with emphasis on performance? File imgFile = new File(img.getInternalImagePath()); if(imgFile.exists()){ Bitmap myBitmap; try { BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 4; myBitmap =

How to draw a dot on the zoomable bitmap by taking x, y coordinates form its image view

不打扰是莪最后的温柔 提交于 2019-12-10 12:05:39
问题 Please help me I'm developing an android application to display a pinch zoom-able and drag-able bit map in a image view(Image view's boundaries are same as device screen size). I'm only zooming the bit map and show it in the image view What I want is When click a place on the device screen get that X an Y positions and draw a dot exactly in the place where I clicked on the bitmap Its like marking your location on the bit map Here is a descriptive image (Sorry I couldn't upload it to here

Adding 4mb image from URL to imageVIew in android studio

断了今生、忘了曾经 提交于 2019-12-10 11:55:13
问题 I used picasso for loading my images from web into the imageView and it works perfectly for images less than 600 kb but anything above that returns a black imageview meaning that image is not loading. Can I take an image of 1mb or more from URL using picasso? If not, what is the best way to accomplish this. 回答1: Try Glide. Glide.with(context).load(url).placeholder(R.drawable.placeholder).into(imageView); OR Glide.with (context).load (url).asBitmap().into(imageView); 回答2: u want to use picasso

Android GridView Items Resizing

筅森魡賤 提交于 2019-12-10 11:53:28
问题 I using a GridView to display a feed. If the entry has a background image for it, the image gets loaded from the device or the server. My problem is that when an image is loaded, the gridview's item expands to accomodate the image. I want the image to scale down to fit the box. I have tried using an ImageView with various scaletypes and using the view's background. Nothing seems to work. Any ideas? 回答1: The answer I found was that when I was inflating the XML is I was using: LayoutInflater

How to change images in imageview every n number of seconds

牧云@^-^@ 提交于 2019-12-10 11:48:57
问题 I have made an array that has all the images in int and i want to change those images every 3 seconds in the imageView, I have tries all the solutions I could find but was showing some error, I can't figure it out . java file (home.java) /** * Created by sukhvir on 17/04/2015. */ public class home extends android.support.v4.app.Fragment { ImageView MyImageView; int[] imageArray = { R.drawable.image1, R.drawable.image2, R.drawable.image3, R.drawable.image4, R.drawable.image5 }; public View