Building an Android FileBrowser (list-based) !

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Postby zumpar » Tue Oct 13, 2009 10:36 am

Hi,

thanks for the great tutorial.. but say I wanted to place a button at the bottom of the list. What would I have to change? Would i have to create a layout with a Linear Layout, in it a ListView and a Button on the bottom, and then scrap the row.xml layout and put the list in the listview? (I tried these things and they didnt seem to work)

Any help is appreciated,
Thank you
zumpar
Freshman
Freshman
 
Posts: 7
Joined: Thu Oct 08, 2009 2:07 pm

Top

With this listFiles can you use a url directory

Postby rayg » Sat Mar 06, 2010 8:17 pm

Hi,
Thanks for your samples, they are very helpful. Is there a way to use listFiles to return files in a uri directory? Say there are .jpg files at http://ficticious.myweb.gov/images I don't know what the files are called but I want a list of their names so I can nab them if I want.
rayg
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Mar 06, 2010 1:48 am

Re: Building an Android FileBrowser (list-based) !

Postby letroll » Wed Oct 20, 2010 7:53 pm

for this :

int selectionRowID = (int) this.getSelectedItemId();

change in this:

int selectionRowID = position;
letroll
Freshman
Freshman
 
Posts: 4
Joined: Tue Mar 16, 2010 4:59 pm

Re: Building an Android FileBrowser (list-based) !

Postby christiantang » Thu Nov 04, 2010 12:20 am

First of all: Great tutorial!

But I do have a problem. When I try to access the following folders in the root, the program crashes:
/config
/cache
/data
(and some other)

I have a feeling that it has something to do with permissions, but I can't figure out if this is the problem.

I have tried accessing the folders using OI File Manager, with no problems.

The program crashes on the emulator, and on my HTC Hero
christiantang
Freshman
Freshman
 
Posts: 3
Joined: Sun Apr 25, 2010 4:09 pm

Re: Building an Android FileBrowser (list-based) !

Postby danielle101 » Thu Nov 04, 2010 1:10 am

Could somebody help me figure out how to write code for a file browser for that would search through a specific folder (eg. the pictures folder)???? I am new to Android and any help would be much appreciated :D !!!!

Thanks in advance.
danielle101
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Nov 02, 2010 4:12 am

Re: Building an Android FileBrowser (list-based) !

Postby sourv » Fri Apr 22, 2011 8:22 am

Thanks for the tutorial. I am a newbie. Can you please post the updated AndroidFileBrowser.java for Android 2.3.3.
sourv
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Apr 22, 2011 8:13 am

Top

Re: Building an Android FileBrowser (list-based) !

Postby drawg99 » Fri Apr 29, 2011 12:02 am

Instead of using ListActivity.getSelectionRowId() which was removed from API by Android development team or ListActivity.getSelectedItemPosition() or getSelectedItemID() which have other problems returning 0 and -1 at times, I was able to use getItemAtPosition(position) following this example -> http://www.bestwebdesignseo.com/code-samples/solution-to-getselectionrowid-android-method-error/

It requires re-writing of the onListItemClick which may have other potential consequences for other developers to mitigate.
drawg99
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Apr 28, 2011 11:56 pm

Re: Building an Android FileBrowser (list-based) !

Postby leethaoqn » Wed Nov 23, 2011 3:57 pm

This is great tutorial . I have a question : What's different in ABSOLUTE, RELATIVE in your tutorial ?
leethaoqn
Freshman
Freshman
 
Posts: 7
Joined: Wed Sep 21, 2011 3:34 pm

Top
Previous

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 8 guests