Display multiple images in android studio in textview - java

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 when you add images.
Example
enter image description here
It could be images, audio or links
I have taught of you creating multiple image view and hide and show them but I can't predict a user amount of image and that just inefficient

Related

How can I create this kinda layout in android studio

I'm not sure how to get image from image picker and add to a recycler view I'm pretty sure we can use recycler view for the images list and not sure how to make 1st image as cover image

Quickest/best way to load a large image ( using Glide )

I am developing a Android application that display's images loaded from the sdcard.
I use the mediastore to populate a recyclerview.
If the user would click a image in the recyclerview i would like to open a activity that shows the image in full size.
When the clicked item is a huge image it takes 4/5 seconds to load.
I noticed some applications can somehow load them instantly(quickpic, google photos).
How do they do this and or what is the best practise?
I am using Glide for the async loading and caching.
I tried the glide function that loads a thumbnail first and loads the full image in the background.
I tried resizing and subsampling the image.
And thats about all the techniques i could find.
Some code i tried:
Glide.with(this)
                .load(getUri().toString())
                .asBitmap()                  .diskCacheStrategy(DiskCacheStrategy.RESULT)
                .priority(Priority.IMMEDIATE)
                .dontAnimate()
.thumbail(0.1f)
.override(height,width)
.info(imageView
)

CardView - refresh images on visible items only

I have cardview list with each item containing image view and text. Each image for each item is provided as url with image to download.
Now, instead of converting each image to bitmap and putting it into my adapter I want to get functionality similar to Google Play search results, where images are refreshing after list is shown.
My idea is to use Universal Image Loader: https://github.com/nostra13/Android-Universal-Image-Loader so my images will be loaded in background.
However, I have no idea how to force refreshing only visible items. The rest should be refreshed on scroll, just after they appear when list is scrolled down. So basically, the same as it works in Google Playstore app.
Any tips?

Showing an image View dynamically

I am doing following things
1- Using a button opening File Explorer to choose a specific file.
2- When file is selected it is copied to my app folder.
3- The Number of files attached to that user is increased by one.
Now i want to add this receipt in a small image view under the button. Suppose i run the application and added two images using button. Now a small view of these images should be displayed beneath the button. (I need to store these images in database too so i can use them whenever i want) Now as much as the images are, i need to display images beneath the button
How can i do that
Best Regards
Simply have a linearlayout in your xml, where you want to display image,
Get reference of LinearLayout in your activity by:
LinearLayout llContatiner=(LinearLayout)findViewById(R.id.llCOntainer);
when you have copied image, create an ImageView by:
ImageView imgView = new ImageView(mContext);
imgView.setBitmap(img);
// or imgView.setDrawable(img);
llContainer.addView(imgView);

Creating a gridview of images' thumbnails that expands when tapped in Android

I would like to create a gridview of images, in which, these images will be downloaded based on a web service response.
The thumbnails of images will be displayed in a gridview, similar to how iPhone displays photos.
User can tap on the image and the corresponding full-res image will be shown, sized to fit within the android phone. Upon tapping on the full-res image, it will minimize and return to the gridview.
So far, following the guide here, I had manage to create the gridview of images, but I would like to have it expand to the original size upon tapping and tapping again, return to the gridview.
See the Gallery, maybe all you need to do is change the OnItemClick behaviour.
http://developer.android.com/resources/tutorials/views/hello-gallery.html

Categories

Resources