File Chooser

Anything about development not directly related to libgdx, e.g. OpenGL, Android APIs etc.

File Chooser

Postby Cloud9 » Mon Jun 04, 2012 4:44 pm

For some reason I need a file chooser. I see the following options:

a) Write an Interface and go with native FileChooser, may be the OI FileManager on
android and some JFileChooser on the desktop. Some receipes on how to do that
are available by google.

b) Write a libgdx FileChooser and use the libgdx UI stuff to do so.

I dont like to write file choosers, but sooner or later my application will need something
like that. To my feelings b) is less painful to maintain in the long term,
but it may be that I will reinvent the wheel another time.
Does anyone here have an opinion about that ? Which way to go ?


Greetings, Alfred.
Cloud9
 
Posts: 4
Joined: Wed Nov 02, 2011 4:11 pm

Re: File Chooser

Postby mzechner » Mon Jun 04, 2012 5:55 pm

I'd hold that off for as long as possible. Wrap the native file choosers first and get the rest of your app done. Write a custom one with the libgdx UI stuff at the end. It will take quite a bit of time, maybe someone writes something like that in the meantime (we won't i'm afraid).
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Re: File Chooser

Postby Cloud9 » Mon Jun 04, 2012 7:14 pm

OK, thanks for the advice !

I will probably follow if I dont succeed with plan b until the day after tomorrow,

cheers, Alfred.
Cloud9
 
Posts: 4
Joined: Wed Nov 02, 2011 4:11 pm

Re: File Chooser

Postby Cloud9 » Wed Aug 15, 2012 6:58 am

In the meantime, I wrote a basic directory chooser for my needs.
The new table layout just works !

I published the GdxFileChooser.java on https://github.com/Cloud8/Code-Examples
just in case anybody else is interested.

Greetings,
Alfred.
Cloud9
 
Posts: 4
Joined: Wed Nov 02, 2011 4:11 pm

Re: File Chooser

Postby BenMcLean » Thu May 16, 2019 12:00 am

Native file chooser on PC works great, but I keep having problems trying to use the Android native file chooser throwing exceptions having to do with permissions. Can anyone help?

Been working on a fork of the gdx-nativefilechooser project in hopes of getting it to work again:
https://github.com/BenMcLean/gdx-nativefilechooser/blob/master/android/src/main/java/net/spookygames/gdx/nativefilechooser/android/AndroidFileChooser.java
BenMcLean
 
Posts: 23
Joined: Mon Oct 07, 2013 2:57 pm

Re: File Chooser

Postby BenMcLean » Thu May 16, 2019 12:57 am

I ended up making an issue about this: https://github.com/libgdx/libgdx/issues/5633
BenMcLean
 
Posts: 23
Joined: Mon Oct 07, 2013 2:57 pm


Return to General Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron