android-imageview Questions

19

Solved

I am reusing ImageViews for my displays, but at some point I don't have values to put it. So how to clear an ImageView in Android? I've tried: mPhotoView.invalidate(); mPhotoView.setImageBitmap(...
Extinctive asked 18/5, 2010 at 16:35

2

Solved

How can we make ImageView width and height equal to width of parent ConstraintLayout? So it displays a full width square ImageView. Generally how can one set HEIGHT of some widget equal to WIDTH o...
Lynnelynnea asked 29/9, 2018 at 14:19

7

Solved

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 ther...

18

Solved

I'm loading a bitmap into an ImageView, and seeing this error. I gather this limit relates to a size limit for OpenGL hardware textures (2048x2048). The image I need to load is a pinch-zoom image o...
Lowly asked 22/4, 2012 at 18:53

7

I am trying to rotate this image by using a thread. what should I do? public class Start extends Activity { View base; Bitmap rotate, base1, rotate1; ImageView rotator; float angle, pivX, pivY;...
Rayborn asked 29/1, 2014 at 11:51

4

Solved

I would like to convert a screen of my app and convert it into a Bitmap. I already know how to convert a view into a bitmap, but that's not what I want as my screen is made up of many fragments. Th...
Submit asked 25/4, 2014 at 13:24

12

I have searched more on websites and got many suggestions like below Changing background with custom style to set the corner radius and padding ( Getting image as rectangle and background as roun...
Ultramicroscope asked 28/7, 2015 at 11:48

5

Solved

I get imageView's width 0. Below is code. xml file : <ImageView android:id="@+id/img" android:layout_width="200dp" android:layout_height="200dp" /> Activity : @Override protected void...
Zoniazoning asked 9/10, 2013 at 12:9

7

I want to apply shadow to the ImageView. When I'm applying shadow to a TextView I'm getting it but same it's not getting to ImageView. How can I solve this problem?
Toxicity asked 2/12, 2011 at 7:39

6

import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.os.Bundle; import android.os.Parcelable; import android.util.Log; import android.view.Menu...
Various asked 8/11, 2013 at 10:8

4

I have a ShapeableImageView here, with 5dp stroke: <com.google.android.material.imageview.ShapeableImageView android:id="@+id/profile_picture" android:layout_width="100dp" ...
Woodwork asked 24/2, 2021 at 4:10

8

Solved

I try to save the image into WathsappIMG but when I go to image gallery android I don't see the image and the image there into the directory can be seen from ES File Explorer OutputStream output; ...
Sigismondo asked 31/12, 2013 at 15:35

15

Solved

I need to show an image by using the file name only, not from the resource id. ImageView imgView = new ImageView(this); imgView.setBackgroundResource(R.drawable.img1); I have the image img1 in t...
Esdras asked 15/11, 2010 at 5:53

6

Solved

I am trying to make my layout like this but i am not able to make my imageview like this with rounded corners. It shows perfectly in Android studio's layout editors but in real device i am gettin...
Outfit asked 21/5, 2020 at 4:8

4

Solved

I'm just wondering if there is any significant difference between an ImageView that's set to be clickable, compared with an ImageButton? Is there any reason for using one over the other? Is there...
Subcontraoctave asked 1/5, 2011 at 7:32

16

Solved

I want to set a ripple effect on textview and imageview in Android Studio. How can I do it?
Raptorial asked 2/11, 2015 at 11:54

5

Solved

When using a state selector as the src for an ImageView, enabled="false" is being ignored. i.e. this doesn't work properly: <ImageView android:layout_width="wrap_content" android:layout_heig...
Weakminded asked 3/5, 2012 at 10:36

5

Solved

I would like my ImageView to scale in a particular fashion: Scale so that the height of the image always fits the height of the ImageView Crop any excess width A picture speaks louder than a 1...
Malinin asked 29/1, 2014 at 8:43

10

Solved

I have a cell with a fixed width and height, let it be 100x100px. Inside that cell I want to display an ImageView with a border around. My first idea was to put a background resource to the ImageVi...

3

Solved

I have this code: <ImageView android:id="@+id/listitem_logo" android:layout_width="match_parent" android:layout_height="wrap_content" /> and imageview_logo.setImageBitmap(bit); // comes ...
Benighted asked 25/5, 2013 at 11:25

7

Solved

I want to add a gradient on the bottom of my image . Something like this : I tried something like this but I only get the gradient no image.. <ImageView android:id="@+id/trendingImageView"...
Lehman asked 2/6, 2014 at 9:33

6

Solved

I'd like to scale an image up to take up the entire size of an ImageView. This is subtly different than using scaleType=fit_center because fit_center will leave bands around the image if the image ...
Monda asked 12/7, 2011 at 19:15

37

I am trying to create an ImageView in a Fragment which will refer to the ImageView element which I have created in the XML for the Fragment. However, the findViewById method only works if I extend ...
Percyperdido asked 27/6, 2011 at 16:24

11

I have an Android application which contains multiple activities. In one of them I'm using a button which will call the device camera: public void onClick(View view) { Intent photoIntent = new Int...
Mashhad asked 27/3, 2012 at 13:44

3

I'm developing an app and I have made the below shown layout: There is a CircleImageView and a CardView. Here's the XML code: <RelativeLayout xmlns:android="http://schemas.android.com/apk/...

© 2022 - 2024 — McMap. All rights reserved.