android-imageview

Android how to set a transparent image resource of a view? or Remove the image?

只愿长相守 提交于 2019-12-12 20:04:39
问题 ((ImageView) v.findViewById(R.id.imageViewHeart1)).setImageResource(R.drawable.heart); I d like to remove my graphicss from my Image Resource so: ((ImageView) v.findViewById(R.id.imageViewHeart1)).setImageResource(null); or something, how can I do this? 回答1: If you remove image then used ((ImageView) v.findViewById(R.id.imageViewHeart1)).setImageResource(0); 回答2: Use ImageView.setImageDrawable(null); or simply View.setVisibility(View.INVISIBLE); 回答3: Try add transparent png with 1px width and

Issue with onActivityResult

江枫思渺然 提交于 2019-12-12 18:15:50
问题 I am creating an app, On app start camera opens to take pic. I have also implemented the Facebook login in the app FB Login, everything is working fine. My problem is I want to show the pic taken in an imageView which I have added in the MainActivity layout. There is no error but image is not showing in imageView. But when I change the name of onActivityResult method to onActivityResult2 image doesn't display. Image displays when I dont change method name. I can't keep the name to

How to download image from aws s3 into imageview?

ⅰ亾dé卋堺 提交于 2019-12-12 16:29:15
问题 so I want to be able to grab my images from my s3 bucket and (using glide or picasso) load that image into an imageview. (I don't want to download that image into my phone). currently i have this: downloadButton = (Button) findViewById(R.id.cognito_s3DownloadButton); downloadButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { File file = new File(Environment.getExternalStorageDirectory().toString() + "/" + "fromAWS"); observer = transferUtility

How to upload image to Parse in android?

不羁岁月 提交于 2019-12-12 10:56:54
问题 I have been able to take a picture using a camera or take from a gallery and show it in an ImageView using this code. What I need to do now is to use that picture and upload it to Parse. I have been googling here and there to do this, and I haven't found the right way to do it. Can someone please help me with this? Is it possible to upload the image from the ImageView? Thank you. protected Button mFromCamera; protected Button mFromGallery; protected ImageView mImageView; private static final

Using ClipDrawable to hide a part of and ImageView

ⅰ亾dé卋堺 提交于 2019-12-12 10:20:18
问题 I am trying to hide a part of an image so that the user does not see it. Initially I copied the Bitmap pixels on another Bitmap, without copying only the pixels that I needed and making the second bitmap the correct size at creation. That worked, but I have many large images and that results in OOMs unfortunately. So instead of doing that I thought on using a ClipDrawable to draw the image, and making the pixels that I don't need invisible. The code is as follows ClipDrawable clipDrawable =

Android: Display image in imageview by SimpleAdapter

青春壹個敷衍的年華 提交于 2019-12-12 09:41:18
问题 I am new android now I want to display image from an url. I am using imageview in listview. I want to add the list of images into the each row of the list item. I used SimpleAdapter but the imageview shows blank. Here's the main activity: package com.example.mysqltest; import java.util.ArrayList; import java.util.HashMap; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.app.ListActivity; import android.app.ProgressDialog; import android

How to Zoom in/out imageView on Click using java in Android?

假如想象 提交于 2019-12-12 09:15:30
问题 i have followed this tutorial to zoom in imageview on touch but i have an activity that have 15 images and when i click on any one image it will open new Activity and will zoom in that clicked image on new Activity so my question is How can i pass clicked image src to nextActivity so that my single method will be applicable to zoom in for all images. On new Activity (Zoom in) when i clicked on it how can i zoom out that image again. I have followed this:Zoom in Its successfully zoom in an

How to half overlap images in android constraint layout

China☆狼群 提交于 2019-12-12 08:36:31
问题 Is there any way to place an images half is on top of another image using only constraint layout. I know it can be done using relative and frame layouts but in the case of constraint layout is there anyway? prefer ways which do not require any hardcoding of heights/widths the requirement will look like this 回答1: you can set layout using only constraint layout like below : <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android

Android zoomable/scrollable ImageView with overlays

和自甴很熟 提交于 2019-12-12 07:40:23
问题 I would like to display an image (including scroll and zoom functionality). Additionally, I need to add some overlays to the image dynamically. The overlays are in a relationship to the content within the image. If the user scrolls, the overlays should move too If the user zooms, the overlays should not be zoomed but hold their relative position to the image In other words: I'd like to implement a Map with some markers, but I provide my own map material. My main question is: How could I do

How To Get Dynamically Created Imageview or textview clicked id or position in android?

依然范特西╮ 提交于 2019-12-12 05:49:57
问题 i want to create dynamic imageview and button which in scrollview so i want to get the id for that clicked item which is created dynamically how can i get this here is my code public class TestActivity extends Activity implements OnClickListener { private static final String TAG_DATA="data"; private static final String TAG_ADVERTISE="advertisments"; private static final String TAG_ADVERTISEID="advt_id"; String advertiseid; private static final String TAG_SHOWTEXT="showtext"; String showtext;