imageview

Captcha image cannot be refresh by using Glide

强颜欢笑 提交于 2019-11-30 21:18:21
I have tried to use Glide to load an Captcha image into a ImageView. The first time loading is fine. However, when I reload the Captcha image into the same ImageView, the ImageView does not refresh to new image. Does anyone have idea how to solve this issue? String url = "https://captcha_path"; ImageView imgView = (ImageView)getActivity().findViewById(R.id.imgView); Glide.with(getActivity()).load(url).asBitmap().diskCacheStrategy(DiskCacheStrategy.NONE).into(imgView); You can always use Glide.clear() and then call Glide.with(...).load() again. If your url doesn't change when the image changes,

How to show images in imageview in simple adapter?

孤街浪徒 提交于 2019-11-30 20:59:22
I am getting data from JSON Array and I can show the text in textviews but having problems with showing the images. here's the main activity: public class test extends ListActivity { // url to make request private static String url = "http://test/json.php"; // JSON Node names private static final String CONTACTS = "contacts"; private static final String NAME = "name"; private static final String IMAGE = "image"; // contacts JSONArray JSONArray contacts = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //

Android: Slow performance using a big image in ImageView

自闭症网瘾萝莉.ら 提交于 2019-11-30 20:20:43
I have an Activity where I have a background image in an ImageView, and nine transparent buttons on top of the image. http://i.stack.imgur.com/GGQqd.png When I tap any of the buttons I make a RelativeLayout appears in the top of the background. http://i.stack.imgur.com/JvKQK.jpg The problem is: When I use a big resolution image as a background in the layout the performance is very poor. I'm using a PNG image of 2048 x 1536 , and it's weight is about 500k. When I use a smaller image like 1024 x 768 the application works fine, but it looks terrible. Is there a restriction or a method to use big

Skia Decoder fails to decode remote Stream

房东的猫 提交于 2019-11-30 20:07:09
I am trying to open a remote Stream of a JPEG image and convert it into a Bitmap object: BitmapFactory.decodeStream( new URL("http://some.url.to/source/image.jpg") .openStream()); The decoder returns null and in the logs I get the following message: DEBUG/skia(xxxx): --- decoder->decode returned false Note: 1. the content length is non-zero and content type is image/jpeg 2. When I open the URL in browser I can see the image. What is that I am missing here? Please help. Thanks. ol_v_er The solution provided in android bug n°6066 consist in overriding the std FilterInputStream and then send it

Create an image-overlay mask in javafx

为君一笑 提交于 2019-11-30 19:55:41
问题 I'm trying to do a simple thing. I have a binary image and all I want is to overlay the binary image on a color image, but the white pixels in the binary image should be red, and the black transparent. I'm quite used to JavaFx but I'm stuck with this one. I know I could achieve it by iterating through all pixels with a PixelReader, but I'm sure there is an easier way. I tried to use some sort of Blend-effect but no luck so far. I think it should be similar to this: How to Blend two Image in

How to inflate new copies of an ImageView object on a layout?

淺唱寂寞╮ 提交于 2019-11-30 19:20:22
问题 What I am trying to do is create N (in this case 9) copies of the ImageView object R.id.tile , place each of them at different coordinates on the layout, and give each its own unique identifier. board_layout.xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/backgroundcolor" android:orientation="vertical" > <LinearLayout

Get Bitmap from ImageView loaded with Picasso

独自空忆成欢 提交于 2019-11-30 18:37:19
I had a method that loads images, if the image has not been loaded before it will look for it on a server. Then it stores it in the apps file system. If it is in the file system it loads that image instead as that is much faster than pulling the images from the server. If you have loaded the image before without closing the app it will be stored in a static dictionary so that it can be reloaded without using up more memory, to avoid out of memory errors. This all worked fine until I started using the Picasso image loading library. Now I'm loading images into an ImageView but I don't know how

implement GestureDetector for an ImageView

旧巷老猫 提交于 2019-11-30 18:34:02
问题 Good moorning : I have an ImageView in my Activity and I setted the OntOuchListner() to my ImageView, which means that I implemented that interface for my ImageView like this : public class mapActivity extends Activity { //-------------------------------------- private ImageView imageView; /** * Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); imageView = (ImageView)

Using picasso library with a circle image view

試著忘記壹切 提交于 2019-11-30 17:13:24
I am looking at using the Picasso library to download an image from URL and pass this into circle image view, but since picasso requires that you pass in an actual imageView I have come to a standstill on how to do it I am using the picasso library from here http://square.github.io/picasso/ and the circle image view class from here https://github.com/hdodenhof/CircleImageView Here is the start of my code to get the image private void getData() { userName.setText(prefs.getString("userName","")); jobTitle.setText(prefs.getString("profile","")); userLocation.setText(prefs.getString("location","")

Captcha image cannot be refresh by using Glide

不想你离开。 提交于 2019-11-30 17:08:11
问题 I have tried to use Glide to load an Captcha image into a ImageView. The first time loading is fine. However, when I reload the Captcha image into the same ImageView, the ImageView does not refresh to new image. Does anyone have idea how to solve this issue? String url = "https://captcha_path"; ImageView imgView = (ImageView)getActivity().findViewById(R.id.imgView); Glide.with(getActivity()).load(url).asBitmap().diskCacheStrategy(DiskCacheStrategy.NONE).into(imgView); 回答1: You can always use