Questions tagged [android-imageview]

Displays an arbitrary image or a drawable, such as an icon or an xml defined graphical element.

Filter by
Sorted by
Tagged with
0 votes
1 answer
41 views

Android - Image Size Difference Between Using Glide and Using Only ImageView

I have a LaunchActivity and I have a centered ImageView inside this activity. And I have a PNG with different densities. The problem is that there is a size difference between when I load my drawable ...
  • 648
0 votes
0 answers
14 views
+50

Image appear blank/red when picking an image from gallery in some android phones?

The picked image mostly works on all phone devices. But some users reported getting blank/red image when picking an image. I use the code below to pick an image Intent intent = new Intent(); intent....
  • 2,127
2 votes
1 answer
48 views

RecyclerView Item Size changing while scrolling every time

I have a chat RecyclerView, and I want the ImageView to wrap different sizes. When the view loads for the first time it works fine, but on scroll the sizes changes. If possible i want to fit different ...
0 votes
0 answers
21 views

Is there a way to make a layout in an XML file to wrap content to fit different images' sizes?

If possible, I want to make a specific layout in an XML file to wrap content, because every image within RecyclerView items will vary in height or width. So, I want to make every item's height depend ...
3 votes
1 answer
26 views

Why ImageView not showing the string image url using Glide library?

I have a problem with Glide not showing image URL in ImageView. I suppose to get the image URL and fit it inside ImageView of a RecyclerView item, the it was working fine first, but after some changes ...
0 votes
1 answer
72 views

How to know the accurate dimensions of an image if the width and height is match_parent?

Let me explain the following example: If I had an ImageView that had width and height = (50 x 50)dp, the dimension for the mdpi density (the baseline density as dp=px) would be (50x50)px. Okay, but ...
0 votes
0 answers
21 views

How to correctly decide pixel dimension of the mdpi baseline drawable according to the dp size?

I have investigated and read all the official Android documentation according to the topic of supporting different screen sizes to create different images sizes to support different screen densities. ...
0 votes
0 answers
19 views

Adding Bottom Sheet in Recycler view onclick listener

I have a Recyclerview and some items in it like imageviews and textviews. I need to open a bottom sheet using model class, when I click the imageview in the recyclerview. E/AndroidRuntime: FATAL ...
0 votes
0 answers
32 views

Display multiple images in android studio in textview

I have been trying to display multiple images with a image holder in a textview like in notes app but the solutions I have seen only support one image and the image view where just hidden and shows ...
0 votes
0 answers
12 views

Show text and image in textview using sqlite as datasource

I want to display my data in flutter app as shown in below image. Also, all the data is stored in sqlite as shown below. My content to be displayed like this image All this content to be stored in ...
0 votes
0 answers
20 views

Android. How to setImageBitmap without using settings of previous seated bitmap?

I'm using ZoomableImageView https://github.com/jsibbold/zoomage/blob/master/zoomage/src/main/java/com/jsibbold/zoomage/ZoomageView.java. And everything works fine. But I have a problem. Suppose I ...
0 votes
2 answers
84 views

How to get bitmap from ViewGroup?

I'm using recycler view where each item is simple ImageView. My RecyclerView is places in a ViewGroup - FrameLayout. My task is to get from my FrameLayout - a bitmap. That is, I need to get a bitmap ...
0 votes
1 answer
62 views

How can I make a circle image in an app widget?

I can't seem to figure out how can I make an image (such as ImageView) a circle image, inside an app widget. I mean crop it in the form of a circle, like .clipShape(Circle()) in SwiftUI. I tried some ...
  • 375
0 votes
0 answers
21 views

Android. How to effective frequently create bitmap?

I'm using library which takes bitmap. At first I'm showing bitmap in ZoomableImageView. But after scale, zoom I need to send to the library only visible part of image view. Here is my code to create ...
0 votes
0 answers
29 views

Android. How to get scaled bitmap?

I'm using custom zoomable image view. Here is example of such a view: https://github.com/jsibbold/zoomage/blob/master/zoomage/src/main/java/com/jsibbold/zoomage/ZoomageView.java. Everything works well,...
0 votes
1 answer
30 views

From Glide.with showing ImageView Android Studio

I am trying to solve this issue but i didn#t find enything until now. So my Image View its a string and i am trying to call it with Glide.with and many more but unfortunately no success until now. It ...
1 vote
1 answer
30 views

Convert image from gallery to bitmap. I get a NullPointerException

I'm trying to convert an image from the gallery into a bitmp and then store it in an array. Previously, however, I am getting a NullPointerException. How can I convert the image from the gallery? ...
  • 650
3 votes
0 answers
47 views

How to FIX OutOfMemoryError for seemingly very light resource 64 byte

I have got a android.view.InflateException, and further down the stacktrace, I've got this outOfMemory exception at the line where a 4 kb XML drawable is loaded with srcCombat into an ...
  • 1,025
0 votes
0 answers
35 views

How to add ripple animation in imageView?

I'm trying to show a ripple animation in imageView before loading the image from the server. I tried below code: ImageView imageView = findViewById(R.id.image_view); // Create a ...
0 votes
1 answer
58 views

how to make a gradient color and set it on ImageView (android)

gradient.xml: <gradient android:angle="135" android:endColor="#aaFFB5B9" android:startColor="#aaFFDEB5" /> <corners android:radius="0dp&...
  • 1
1 vote
0 answers
37 views

Android Vector Drawable with ImageView: the image is being cutted at the bottom

I have the following svg (vector file): <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="18dp" android:height="3dp" ...
  • 693
0 votes
0 answers
51 views

Proper toggling between play/pause buttons in chat app with audio messages defined

I have an app that has a fragment with chat to admin. View is represented by a recyclerView. Ofc I'm at the beginning of app, but I have some problems. 1- Here is the view. If we press "play ...
0 votes
0 answers
24 views

Android: ImageView with svg looks blurry

I'm many svg exported from Adobe illustrator, it only have a size of 9.36*10.8. When I use the xml vector of this svg (converted by Android Studio) as the src of ImageView with a size of 19.5dp * 22....
  • 693
0 votes
1 answer
72 views

Clear tint on a vector drawable programmatically?

I'm trying to toggle the tint of an ImageView whose source is a vector drawable: <ImageView android:id="@+id/iv_lightbulb" android:layout_width="wrap_content" ...
  • 2,425
0 votes
0 answers
43 views

How to set a view dynamically over an imageview in android programmatically?

basically i wanted to have a kind of a view on either side of the Imageview (banner) to show something like this in the below image. As you can see Offers at top left corner. My requirement is to show ...
0 votes
0 answers
6 views

How to compare which drawable is in an imageview with a user spinner selection

Currently I am displaying a random image using math.random, this part works but I need to check if the users selection from the dropdown list matches this. The only part I can get to work is the ...
0 votes
0 answers
9 views

How to track randomly displayed drawable to cross check with user submitted answer

I am trying to create an application where a random image is displayed(Working), and the user selects from a dropdown list the displayed image and this is checked to see if it is correct or not I am ...
0 votes
1 answer
34 views

ImageView centerCrop Overflow in CardView

I doin' my daily practice. I saw this problem, the Image does not fit on Cardview. I created a Cardview with wrap_Content Height, Looks like this, The code: <?xml version="1.0" encoding=&...
0 votes
1 answer
28 views

How to make an image always have the same height as another view?

How can I make the image (the actual image itself, not just ImageView) always have the same height as LinearLayout? <androidx.constraintlayout.widget.ConstraintLayout android:...
0 votes
1 answer
71 views

Android: corner border stroke getting hidden behind imageview

hello I'm trying to add a corner to my constraint layout so the logic is whenever from the response I'm not getting the image I will show text else image but whenever the image comes corner stroke is ...
  • 300
0 votes
0 answers
17 views

Is there any website/developer resources that I can check out the smallest android device width out in the market?

I am developing an android app which has a page with 4 columns and fixed 72x72dp image view in each columns. I just wonder if there is any small width device that might stretch my final image in the ...
0 votes
0 answers
27 views

Glide unable to show image after downloading from Android download manager

I am trying to download an animated Gif file from Drive link through Android download manager and display the downloaded image in an imageViewif it is downloaded successfully. If the device doesn't ...
0 votes
1 answer
358 views

How to display a bitmap image in Android imageview

I am new at Android. Here is my code: Bitmap bitmap = BitmapFactory.decodeByteArray(nadraData.image, 0, nadraData.image.length); ((ImageView) view.findViewById(R.id.iv_user)).setImageBitmap(...
0 votes
1 answer
65 views

How to adjust image in android screen under status bar and navigation in android?

I am using an Imageview to show an image. If I set the image in background then its taking full widths and height under status bar and navigation bar. like as in below screen. And the image is ...
0 votes
1 answer
34 views

How to fill a screen with two images?

I am making a simple app in android studio, which includes two images filling up half of the screen, one on each side. Almost like a split screen. I have used this link: Make image appear half of the ...
user avatar
1 vote
0 answers
63 views

How to fill half of screen with image?

I am making a simple app in android studio, which includes two images filling up half of the screen, one on each side. Almost like a split screen. I have used this link: Make image appear half of the ...
user avatar
0 votes
0 answers
21 views

MP Graph bar graph how to add top of set icon in android

I want to add a bar graph for cricket wickets if 1 over blower gets a wicket top of the bar chat comes to the icon and touches Boller's name how to implement this I am trying many chats did not get my ...
0 votes
0 answers
23 views

I don't understand how to make this error go away; Cannot resolve Symbol 'ImageViewer' and i have already imported facebook.fresco and github.stfalcon

enter image description here enter image description here I have tried implementing some libraries images above, and the suggestion that shows says create inner Buider but that is not working out pls ...
-1 votes
1 answer
104 views

How to make an ImageView the same height as the LinearLayout, but keep original aspect ratio which makes the width wider than the LinearLayout

I'm in a horizontal LinearLayout (landscape app). I have an image that is 5000x1080px for a scrolling home screen background. I need the image to fill the height of the LinearLayout while maintaining ...
0 votes
3 answers
73 views

I want to add a circular profile image inside my constraintlayout which is inside the cardview which is again inside cnstrntlyout like whtsappp

Like this (watsapp SS) I'm stuck with it I can not find how to round profile pics like this and than I don't know how to constraint my my 3 text views basically I'm trying to create something like ...
0 votes
1 answer
27 views

ImageView click works on emulator, not on phone (Android)

I have ImageView as : <ImageView android:id="@+id/btnBack" android:layout_width="12dp" android:layout_height="18dp" ...
  • 2,197
0 votes
2 answers
28 views

android - Imageview has height 0 in adapter

I've an imageview in my RecyclerView's adapter ... I download the image for it with Glide library . this is item view code : <androidx.cardview.widget.CardView xmlns:android="http://schemas....
0 votes
0 answers
38 views

How can I achieve this shape without rotation?

I want to achieve this shape which is clubhouse's profile ImageView shape clubhouse profile example but this shape is is not exactly a square with rounded corners it is more like a square with rounded ...
0 votes
1 answer
69 views

Android multiple ImageViews to use the same scale

I have an image that is sliced into 3 parts (top 320x57, middle 320x138, bottom 320x233). How could I ensure that those 3 parts use the same scale, on every screen so that the final picture does not ...
  • 3,657
1 vote
0 answers
24 views

Collapse views like FAB with CollapsingToolbarLayout inside CoordinatorLayout

What attribute should be added in order for a view to behave like FAB that shrinks upon scroll up and collapsing a Toolbar that is inside CoordinatorLayout? Can you shrink the ImageView here with just ...
  • 2,455
0 votes
1 answer
93 views

How to set tint for an text view programmatically in android?

I am trying to set the tintList programatically in the Android app for both imageView and textView. The code works for imageView but dosent work for textView. I have tried using the following code. //...
0 votes
1 answer
85 views

How to pass Firebase Realtime database images from reyclerview to image view in another activity. KOTLIN

I have Firebase Realtime Database images displayed in a reyclerview. When users click that image, I want it to send the image to another activity's IMAGEVIEW and open that activity at the same time. ...
1 vote
0 answers
105 views

Firebase realtime database recyclerview pass image to imageview in another activity

I have a recyclerview with an imageview that displays Firebase Realtime database images. When a user clicks the imageview, I want the image to open a second activity and display that image in another ...
0 votes
1 answer
133 views

Why can't you change srcCompat of an Imageview directly?

I am following the Kotlin Android tutorial and am currently on the Dice Roller App tutorial. For changing the image, the tutorial says to write: diceImage.setImageResource(drawableResource) My ...
  • 3
2 votes
1 answer
181 views

How To Fit Number of ImageViews Inside RecyclerView?

I have a RecyclerView with a fixed Dimension-Ratio <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content&...

1
2 3 4 5
86