Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old October 27th, 2009, 01:32 AM   #1 (permalink)
New Member
 
Join Date: Sep 2009
Posts: 3
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Endless Views

I am developing an application in which a user keeps on scrolling
vertically. Each view displays a single text on a drawable background.
How can i obtain endless views?
Is it a ListView do i have to use here? But how can i make a ListView
not to end and keep on going forever until the application is
terminated by the user?
Is there an attribute or i have to do it programatically? Please
explain.
Hope my question is clear.Waiting for the reply.

Maxood

Maxood is offline  
Reply With Quote
Sponsors
Old October 29th, 2009, 12:57 PM   #2 (permalink)
Member
 
Gremlyn1's Avatar
 
Join Date: Sep 2009
Location: San Diego, CA
Posts: 221
 
Device(s): Samsung Epic 4G
Thanks: 3
Thanked 1 Time in 1 Post
Default

No idea how to do it, but why on earth would you need it to scroll infinitely?
Gremlyn1 is offline  
Reply With Quote
Old October 30th, 2009, 04:03 AM   #3 (permalink)
New Member
 
Join Date: Sep 2009
Posts: 3
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Reply to Infinite Scrolling

There are 636 facts in total. Each fact is fetched from the database randomly and displayed on the view.There are 27 drawables (background images) on which each fact will be displayed. These drawables are meant to repeat themselves randomly or sequentially.

I need infinite scrolling as the facts and views keep on repeating them as the user scrolls vertically.
Hope you understand my requirement. This is the layout i have made.



Now i need to have these views repeating them. How can i do that?Thanks

Maqsood
Maxood is offline  
Reply With Quote
Old October 30th, 2009, 10:03 AM   #4 (permalink)
Member
 
Gremlyn1's Avatar
 
Join Date: Sep 2009
Location: San Diego, CA
Posts: 221
 
Device(s): Samsung Epic 4G
Thanks: 3
Thanked 1 Time in 1 Post
Default

I'm still in my early phase of learning Java, but I would imagine it may be best to set the visual template of what you want and populate the background image and on screen data using a while that just never reaches it's conclusion.

I would do it using someting like
Code:
while (true statement) {
    randomly.display.fact 
}
Your 'true statement' could just be that the next fact has been called for. While it's not technically infinite (in the sense it'll just keep running and eat up your memory and crash), it just always keeps going and you can create a function to randomly select a number/id/name/fact/whatever for the data to display. Maybe include an array that is storing the last 50 or so shown facts that you can check the randomly generated fact against so that they don't repeat too often. So I can't be more help with actual code, but that's the logic I'd approach this with, hope it helps!
Gremlyn1 is offline  
Last edited by Gremlyn1; October 30th, 2009 at 10:06 AM.
Reply With Quote
Old November 6th, 2009, 06:55 AM   #5 (permalink)
New Member
 
Join Date: Nov 2009
Posts: 11
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you had any luck implementing this in terms of just being able to show 600 odd entries?

I don't require the list to loop, but need to show a vast amount of data and memory is a big factor.

I'll let you know if I come up with / find a good solution that might be relevant to your needs.

Matt
gauntface is offline  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Endless boot! Need help seanyboii Eris - All Things Root 4 December 31st, 2010 05:25 PM
Endless reboot cycle Slokunshialgo MyTouch 3G - All Things Root 2 September 7th, 2010 10:48 PM
Captivate Endless Reboot? cmhock Samsung Captivate 0 July 22nd, 2010 08:55 AM
Launcher 2 FC in endless loop VertigoCycles Droid - Support and Troubleshooting 4 April 1st, 2010 12:16 AM
Support endless loop hah2110 HTC Magic 11 June 13th, 2009 02:15 PM



All times are GMT -5. The time now is 11:31 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo