android-imageview

ImageView.setImageBitmap is blank

≡放荡痞女 提交于 2019-12-11 13:53:35
问题 I took a picture using MediaStore and saved it. I can see the image in my Gallery. However when I try to set the image bitmap to my ImageView, it becomes blank. String abspath; public void getPicture(View view) { Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); File imageFile = new File(PATH + "/image.jpg"); abspath = imageFile.getAbsolutePath().toString(); cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); sendBroadcast(new Intent

AsyncTask does not execute in onCreate()

只谈情不闲聊 提交于 2019-12-11 13:48:34
问题 I want that If my app start first time it should download image from web and store that image in Device/Emulator , from Device/Emulator that should be displayed in ImageView . I have tried in this way : ImageView myImgView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); myImgView = (ImageView) findViewById(R.id.imageView1); new MyAsnyc(); Log.d(MY_TAGT, "AsyncTask Executed....."); } private class

Android Image loader

点点圈 提交于 2019-12-11 13:22:53
问题 Pls help in my image loader it take few sec to load the image ,on that time i need to display the progress bar on middle of the image view ,pls help me Pls see the code in my class i'm calling image loader as this way public ImageLoader imageLoader = new ImageLoader(this); imageLoader.DisplayImage1(imagepath, image_view); public class ImageLoader { MemoryCache memoryCache=new MemoryCache(); FileCache fileCache; private Map<ImageView, String> imageViews=Collections.synchronizedMap(new

getting an image path from a imageview?

孤人 提交于 2019-12-11 13:22:36
问题 I have an ImageView and I want get the path of image and add in a String . I want do this because I need send this to my webservice like a default image How can I do it ? ImageView <ImageView android:id="@+id/ivPerfil" android:padding="5dp" android:layout_width="120dp" android:layout_height="120dp" android:src="@drawable/icon_usuario" android:scaleType="fitXY" /> Getting the path ivPerfil = (ImageView)findViewById(R.id.ivPerfil); Drawable img = getResources().getDrawable(R.drawable.icon

Why does the Image Picker in my Android app rotate automatically portrait images into landscape?

不羁岁月 提交于 2019-12-11 13:17:59
问题 I'm using this code in my android app to launch camera/gallery to get an Image, and display it into an ImageView. When the user picks an image with landscape orientation everythings works fine, but when the user picks a portrait image, the image is displayed rotated by 90 degrees. I can't understand why..I'm testing my app on a Galaxy S3 with Android 4.3 I've noticed that the problems only occours when the picture is taken by the phone..maybe this is a problem with the S3? This is my code:

Android ImageView dynamic width and height

元气小坏坏 提交于 2019-12-11 13:14:28
问题 I have a horizontal list of images loaded from a url. So i have an ImageLoader, then an Adapter then my Activity. My xml layouts looks like this: mainlayout.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <com.devsmart.android.ui.HorizontalListView android:id="@+id/hlist_view" android:layout_width="match_parent" android:layout_height="match_parent" android

Add double Tap listener to my custom ImageView

旧时模样 提交于 2019-12-11 12:33:51
问题 I want to detect double tap on my custom ImageView this is what I have tried but no success: public class TouchImageView extends ImageView { Matrix matrix; // We can be in one of these 3 states static final int NONE = 0; static final int DRAG = 1; static final int ZOOM = 2; int mode = NONE; // Remember some things for zooming PointF last = new PointF(); PointF start = new PointF(); float minScale = 1f; float maxScale = 3f; float[] m; int viewWidth, viewHeight; static final int CLICK = 3;

Android Marshmallow 6.0 Cannot Create Lazylist File

蹲街弑〆低调 提交于 2019-12-11 11:52:52
问题 I have small problem in Android Marshmallow OS. I can use Android 6.0. But I can not see ImageView. Ex: First, I try 5.0 OS, Everything OK. Then I can use 6.0 but I don't see Imageview? What's going on? I use Imageloader.java (Because create thumb image.) Screenshot from 6.0 http://i.stack.imgur.com/SonGL.png Screenshot from 5.0 http://i.stack.imgur.com/cZpwu.png AndroidManifest.java <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"

Android Fragment Layout - ImageView To Bottom Of Screen

回眸只為那壹抹淺笑 提交于 2019-12-11 10:29:29
问题 ****I currently have this layout, and want the 3 image views to be shown at the bottom of the screen (left, center and right). I am aligning them to the bottom using gravity property but it is not working. **** Should I use relative layout instead as I could use the alignparent bottom property? My layout file <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"

Attempt to invoke virtual method On changing Listview item image

不打扰是莪最后的温柔 提交于 2019-12-11 10:26:42
问题 I am not able to change Image on listview item when click on listview button Logcat error java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setBackgroundResource(int)' on a null object reference Java code onclick holder.txtnext.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub try{ imageUrls=strimgview.get(pos).split("\\|\\|"); i=imageUrls.length; if((i<=1)) { i++; ImageView