On Mon, Jan 24, 2011 at 9:20 PM, Paul <[email protected]> wrote: > 1) How do I bind multiple values to multiple Views in the > adapter. ArrayAdapter can't do it, is there another more appropriate option, > or am I looking at creating my own custom adapter? If so, any > example and/or suggestions on how to best proceed? >
Yes it can. ArrayAdapter<MyCustomType> where MyCustomeType has all the parameters you need (file name, timestamp, etc). Then override getView() as necessary. This is explained in the ArrayAdapter docs. > > 2) Am I going down the completely wrong path here with how I am tying files > into the List... is there some 'hybrid' way to tie files to a Cursor such > that I could use the SimpleCursorAdapter to handle all of this? > Seems fine, AFAICT. > 3) As a follow-up to that, in terms of adding items, I have an OptionsMenu > that launches a Note Editing function (very similar to the > Notepad example). I can create XML files via this method, but on going > back to the ListView, the new items are not in the List, unsurprisingly. > Then add them to the list. > Notepad does this via the ContentResolver.insert() method, but with > physical files scanned from the directory, I'm just not sure how I should be > proceeding to update the List... I'd rather not have to re-scan every time a > new note is added, but that may be y only option, as far as I know. > That is unnecessary. > Again, any help here is much appreciated. I see ArrayAdapter has > insert/remove methods, but when in the child Editing activity, I'm not sure > how I can access these (ContentResolver?). Thanks for any clarification > here. > As Kostya mentioned, startActivityForResult, the result being the new entry to add. > 3) In terms of the Uri I define for each item, I am generating it from the > absolute filepath, due to the fact that it may be possible in > future versions to move/store files on the SD card, and I'm trying > to maintain the Uniqueness of the Uri. Anyone see any issues with > this solution? > What do you need a Uri for each item for? ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

