Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

Re: Reuse page

I never know you could peek from the back button.

 

As Zmey confirmed peeking from the back button takes me back to my applications main page no matter what page i was on (pretty neat)  but if i do the slide peek it shows the page directly preceeding it, the slide peek is the behavior I want for my implementation which is like zmeys written example.

 

I think the (not-so-fun) but easiest way for me to manage the memory is to implement cache for the lists and drop everything but the visible page's files from the cache and just pull from it as needed


Zmey wrote:

To preserve memory, DataModel can be optimized to not store the entire filelist in memory, but to iterate the filesystem and only return the data which is currently shown on screen by ListView.

 

Or cache all the filenames for current folder to access them faster by index, but drop the cache when navigating to the next page. Recreate the cache when file info at any index is requested again (this can happen when the user has returned back to the page).


Thanks to both of you for all the info =)

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Reuse page

Is it actually a FileManager you are writing then?

Why not just use the built-in one?


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

Re: Reuse page

[ Edited ]

Can't use it in my data folder :'(

 

or at least I haven't had any success... and then even if I did pull that off, the back button always sends them back to the default shared directory, not the page before unless they manually navigated to that page

 

*that is what you were demonstrating to zmey*... when you open wallpapers and click back it sends you to the root instead of the previous page...  I think there might be a way around that but not entirely sure if it works haven't really checked into if it will restrict them from being sent back so far.

 

https://developer.blackberry.com/native/reference/cascades/bb__cascades__pickers__filepicker.html#pr...

 

 

The reason for wanting my list to be like a file picker is because i've seen others implement file lists and all users do is complain that they can't create folders or move stuff into them and for the purpose that I want the file system, folders would be very very useful =)

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Reuse page

[ Edited ]

You could use a WebView.

Would save you the hassle of recreating a file manager.

 

Although before greenmr pipes in you would have to do a little bit of preventative work to make sure they stay within the data folder and not wander in to other areas of your app.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

Re: Reuse page

[ Edited ]

Not sure i follow

 

that seems like it would be even more complicated as I'm allright with js, and i'm getting there with c++ but html and css are a no-go (mostly)

 

how exactly could a webview do this better than listview/pages

 

*keeping them restricted to a specific folder i could do Smiley Wink  not sure about the rest though haha

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Reuse page

Because you'd only need to do this...

 

WebView {
    id : webView
    url: "file:///accounts/1000/appdata/<your app folder>/data"
}

 It doesn't look like File Manager though so up to you.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

Re: Reuse page

[ Edited ]

That is very neat and looks better than I had pictured.  I can do the same thing with a listview (and a little datamodel work) though and it looks even better.

 

I might adopt this method of displaying content (same page) instead of new pages, i'm not decided on that yet, it does have many advantages as far as easier goes but then there's the loss of cool effects, which is primarily what i was after with pushing pages.

 

 

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Reuse page

Okay it was just another option for you.

 

I have almost got my infinite page working but it sounds like for you Zmey's recursive code will be sufficient.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.