I m working on the showing of marquee of images in my project.
I had referred this example from github.
My Problem is, i m in need of showing the images only on the top of the screen not in the entire screen(like thumb images).
In that github example, they had used LinearLayout for showing the images which is scrolled automatically.
In my case the images are dynamic , i have to retrieve them from the database.
The total of number images size may vary.
My problem is when i have reached the last image, auto scroll stops , Also if i have only two images, it won't scroll.
So i m keen to know, is there any other way to achieve marquee of images in android.
Related
I have an activity that gets data from a web service. The output of the web service consists of multiple sets of one web URL and some text. The URL points to an image. Each set is displayed by creating a linear layout which contains an imageview and textview. So, for 200 sets, I would have 200 layouts, 200 imageviews, and 200 textiews. I know that a list view would be a better solution, but I've gone too far in the project to change this now.
Currently, I download all images before the activity is displayed. I download around 200 images and in the future this might rise to more than 1000.
I would like to download the images only when the imageview appears on screen. The approach I am thinking of is creating some listener or event so that once the the imageview or layout appears on screen, the download starts. I searched a lot for this but could not find a good solution. My problem is creating the listener not starting the download.
Some solutions suggested lazy load but this would still mean all images are loaded which would not be appropriate for users who have limited download capacity.
Edit: I do not want to load all images, only the ones that appear on screen. And every time the user scrolls, the new imageview that appear on screen also start downloading.
I ended up using a different and easier approach by following #Akos's solution on this link for detecting the end of the scroll view. Once the activity starts, I load 10 layouts. Once the scroll view reaches the end, I display a progress dialog and load 10 more layouts.
In my android project I have 50 small images that need to be dragged and dropped in three big images.I set that three big images as the background of three different relative layouts.Now I want to restrict the dropped area in all three big images and also want to get the dropped place which will be later used when user came to the same page next time.I dont know how to begin and where to begin?Can anyone help me?I want the dropped place and also restrict the place of dropped....
Thanks!!
if u check this steam page http://store.steampowered.com/
There is a banner which feature games, It move from right to left scroll horizontal transition which is automatic and can be scrolled left or right on press of button. I want to do same banner in android app. But right now i don't know how to start with. Need some ideas from you guys. I need efficient approach. Is it just one imageview and drawing and doing transition on its canvas. If yes then how does it work for my situation which is i am fetching images from web service via xml. SO this banner contents would be dynamic. The url of image will be in xml and i have to render those images in this banner with those transition as seen in steam page.
Thanks.
I'd suggest using a ViewFlipper and dynamically (in code) adding ImageViews. Keep in mind that loading multiple Images is very memory heavy.
You could load the shown picture +- 1 and adding/removing images on-the-fly when the shown image is switched. With this approach it would save memory and should be efficient.
I need to display some images which can be scrolled horizontally. Only one image should be visible on the screen. It should be like iphone screen, which has multiple 4 or more screen and display the items per screen and shows how many screens left as small circles at the bottom. Like that I have show the small circles as many as the images. I tried GestureListener, but it scroll only a single image. Any suggestions pls..
You might want to take a look at android.widget.AdapterView and android.widget.Gallery: These are standard Android widgets that provide scrolling through images. However, this will not look like the UI you describe (iOS look&feel) but like an Android app...
See this example code:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/Gallery1.html
I am displaying an image gallery consisting of 15 images with image displayed on the screen (full-screen) at a time. When the user swipes across, the image changes. I am looking at a small polka-dots style indicator at the center-bottom of the screen to show the image count and where the user currently is.
eg: If my gallery held 5 images and the user was currently on the 3rd image, then there would be 5 polka dots with 3rd dot highlighted/filled with color and the rest polka-dots be hollow.
I know the description might sound a little vague but in short, I am looking at an image count indicator! :)
Thanks!
You might check out this Android Count Indicator project: https://github.com/rupertbates/android-count-indicator
I know exactly what you want, you are looking for the PageControl that is used on iPhones with the Scroll Views. I have never seen anything like that for Android. You would have to build a custom view. It's explained here:
Building Custom Android Components
I finally found it in the Launcher code!