Placing images in a list - android

I am developing an Android application which involves splash screen.
There is a screen containing four Buttons and four Tabs. Now U am facing a problem when I have to show an image in a list.
Can anyone help me in this regard.

This is quite simple. In your adapter in the getView Method, you can return an Image or any other view.
See also this tutorial
http://www.androidpeople.com/android-custom-listview-tutorial-example/

Related

How do viewpager images as app "Mercado Livre" and others

I would like to ask your help on how to do this layout that neither the "Mercado Livre" (Name from app in portuguese Brazil) and other app out there, how real "Viva Real Imoveis" (Name from app in portuguese Brazil). The layout I need is equal to this I'm putting down, it would be a toolbar in the same way and just under one view pager with those balls that pass the images and clicking on the images they're in fullscreen and continue with indicator balls. Below view pager pictures I put the rest of my layout. The main part of you that need help that would be it, the slide images with drag finger counter with balls and fullscreen too. Design material.
Could help me?
Here you have mate. Maybe you'll need customize a little the drawables.

Slide in a Layout and replace with another layout in android

I want to create slide in effect like below.
http://demosthenes.info/blog/838/CSSslidy-An-Auto-Generated-Responsive-CSS3-Image-Slider
The differences are
1) I have layout with two images, and when the new image is downloaded in background, one of the existing image has to slide out and this new image has to slide in.
2) User dont need to scroll and see previous images, I want to show only two images at any given time.
3) Its better if the diapered images get disposed.
What i tried so for with no luck
1) Horizontal scroll view- issues is hard to add items dynamically scroll to it while existing images been deletes.
2) ViewPager - http://developer.android.com/training/animation/screen-slide.html, couldnt get it to work.
what other ways is there, or how to improve what I tried.
Thanks
Simple and effective tutorial here.
1.http://android-er.blogspot.in/2011/09/implement-slide-in-and-slide-out.html
2.http://wptrafficanalyzer.in/blog/image-slideshow-from-right-to-left-using-viewflipper-in-android/
Basics about animation tutorial here,
https://github.com/codepath/android_guides/wiki/Animations
I think your looking for this.
ViewPager is what you want, hope it'll help.

Facebook style slider

the new facebook app has an image slider inside posts which have multiple images. It looks something like this:
One thing to notice is the adjacent images are slightly displayed with the current image in focus.
I know I can implement a slider using viewpager. But, in a viewpager, the current fragment occupies the entire view. Only the titles of the adjacent views are visible, not the content itself.
Can anybody give me a direction to look at for implementing this. Or is there anu opensource library for this?
Thanks

Android horrizontal scroll gallery application

I want to create simple application like android image gallery but I don't want to display images. I want to display an editTexts and buttons...
My idea is to use android.widget.Gallery. Is it good way to solve this?
My next idea is HorizontalScrollView but here is problems with snaps etc.
Yes, you could do this with Gallery, make an Adapter that returns your layout that contains the EditText and Buttons.
However, you should check out ViewPager

Issue with Gallery

I am extending Gallery class & displaying scrollable images in a horizontal manner.
I am displaying only on the landscape mode.
For displaying the images , I am using BaseAdapter , since I need to place text & icon over the images.
I am displaying the no of images based on a condition which is set.
I want to put the following conditions.
i> If the no of image to be displayed is 1 , I'll only show a single image on the middle of the screen & there should not be any scrolling.
ii> If the no of images to be displayed is 2 , then both the images should be shown side by side(horizontal) & without any scrolling.
iii> Only if the no of images is equal to or greater than 3 , then images should be displayed in the horizontal manner & scrollable.
How can I handle all the above cases using a single layout xml & by handling the conditions source code.
Kindly provide me your inputs/sample code.
Thanks in advance.
Warm Regards,
CB
well for showing the text and the image you will need to create a custom adapter override the getView method and a custom layout (a linear layout with vertical orientation containing a textView and an ImageView) inside the getView. You can find a lot of examples of doing that on google, its pretty simple.(there is the gallery example on the android developers page that explains this). Hello Gallery
For your conditions you can probably make something like this in the adapter constructor or the actual creation of the adapter in the activity. i think by default it wont be scrollable for 1 item, but for 2 it will be since the gallery centers the selected item... which is pretty lame. and for 3 or more it will work as intended (show a scrollable horizontal list of items).
Hope this helps.

Categories

Resources