android-imageview

When click a button rotate image clockwise in android

旧城冷巷雨未停 提交于 2019-12-28 22:29:09
问题 I have a requirement where I have an ImageView and a button. http://i1289.photobucket.com/albums/b509/salikclub/Rotate-Last-Start_zps0d2fced8.png I want to rotate the image when I click the button. I need the image with full screen. but when I click the button image will be rotate, but not shown in the full screen. Please see the below link. http://i1289.photobucket.com/albums/b509/salikclub/Rotate-Last1_zps2ccb1326.png After that also when I clicked the button image will rotate. but

ImageView adjustViewBounds not working

≡放荡痞女 提交于 2019-12-28 02:32:08
问题 I have an ImageView with android:layout_width=100dp , android:layout_height=wrap_content and android:adjustViewBounds=true It's source is a 50 x 50 px picture. But the aspect ratio is not preserved - height of the ImageView is 50px, not 100px (i.e. adjustViewBounds is not working). If I have a 200x200px picture it works - width and height are 100px. This code results in a 100px wide and 50px tall picture but the src image is square: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns

Applying ColorFilter to ImageView with ShapedDrawable

人盡茶涼 提交于 2019-12-27 17:23:59
问题 I have an ImageView with android:src set to a ShapedDrawable , namely a white circle. What I want is to colorize this ImageView in runtime responding to some events. imgView.setColorFilter seems to be solution, but after using this (tried different parameters) the image becomes invisible (I don't see it at the screen). How to solve this? And are there better ways to have color circles? 回答1: Alright, I had a quick play with this and noticed your issue of the circles disappearing. Without you

Different sizes of images in Android

不羁岁月 提交于 2019-12-26 17:41:04
问题 I'm trying to create main activity in my application using GridView. I need to have a grid 3x3. Every cell contains ImageView (icons for different actions). All images must have the same size. And my question is: what sizes of image I must use? I watched tutorial and found a table with sizes for different resolutions and density. But I didn't understand. For instance, I have mdpi density and screen size 480*800. Does it mean that I should use icons 160*266 for this screen? And what sizes

Setting image from url to ImageView with AsynchTask

半世苍凉 提交于 2019-12-25 23:08:51
问题 I have an image on my website, that I want to set on my ImageView. Do to that I needed to use an asynch task. I'm doing it like below. But new getThumbnail().execute(stringThumbnail); is throwing me the error getThumbnail cannot be resolved to a type . What am I doing wrong in here? final ImageView thumbnail = (ImageView) findViewById(R.id.btnThumbnail); String stringThumbnail = "myImage.jpg"; new getThumbnail().execute(stringThumbnail); class getThumbnail extends AsyncTask<String, Void, Void

How to unBlur square portion of Blurry image on touch android

半城伤御伤魂 提交于 2019-12-25 20:37:10
问题 What I want to do: On mouse hover of Blurry image, it shows unblur same image in square shape like following image. (image is completely blur, on mouse hover unblur image shown in square shape) What I have done: I set blur image using following code (link) using PorterDuff.Mode. On touch of screen mouse pointer converted into square and image shows unblur. Edit: Problem: Now picture is unblur but i cant find proper blur effect on blurry image and unblur image is also not clear, on touch is

My circular imageview not working properly

本小妞迷上赌 提交于 2019-12-25 18:54:19
问题 I follow this example [here][1] to to give circuler shape. I am getting images from server and set it via BaseAdapter , the image is showing but not in circular view. So, can anyone tell what is the mistake with my code, following is the way I load the images and set circular shape aQuery.id(holder.propic).image(listData.get(position).get(INTEREST_ACCEPT_IMG),true,true,0,R.drawable.ic_launcher); Bitmap icon = BitmapFactory.decodeFile(listData.get(position).get(INTEREST_ACCEPT_IMG)); holder

My circular imageview not working properly

纵饮孤独 提交于 2019-12-25 18:54:15
问题 I follow this example [here][1] to to give circuler shape. I am getting images from server and set it via BaseAdapter , the image is showing but not in circular view. So, can anyone tell what is the mistake with my code, following is the way I load the images and set circular shape aQuery.id(holder.propic).image(listData.get(position).get(INTEREST_ACCEPT_IMG),true,true,0,R.drawable.ic_launcher); Bitmap icon = BitmapFactory.decodeFile(listData.get(position).get(INTEREST_ACCEPT_IMG)); holder

How to check if an imageview has an image in it and skip over the image to the next imageview

点点圈 提交于 2019-12-25 18:36:54
问题 Kinda like hangman how to skip over the imageview if something is in it and check to see if something is in it trying to check the imageView if there is an image in it CODE final boolean imageThere = mImageView17.setBackgroundResource(null); public void image6(){ randomNumber(); final int thisLetter = currentLetter; final boolean imageThere = mImageView17.setBackgroundResource(null); mImageView6 = (ImageView) findViewById(R.id.imageView6); mImageView6.setImageResource(thisLetter); mImageView6

Adjust GridView with ImageViews to different screen sizes, Android

旧街凉风 提交于 2019-12-25 16:47:47
问题 I'd so appreciate if someone could advise on below. My GridView has 3 columns that will be filled with ImageViews: <GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/grid_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center" android:layout_marginRight="10dp" android:layout_marginLeft="10dp" android:numColumns="3" android:columnWidth="0.3dp" android:horizontalSpacing="20dp"