[Q] how do file managers retain listview - Java for Android App Development

In most of the file managers present on Google play. when we open a folder and then go back,list view is automatically scrolled to the position from where folder was opened. So either the scroll position or whole list view is saved. I want to ask how this can be implemented?
Sent from my XT1033 using XDA Premium 4 mobile app

arpitkh96 said:
In most of the file managers present on Google play. when we open a folder and then go back,list view is automatically scrolled to the position from where folder was opened. So either the scroll position or whole list view is saved. I want to ask how this can be implemented?
Sent from my XT1033 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
yes, there are a few ways to do it, probably the easiest is just storing the scroll position yourself, much info on SO about this if you google... also complex views like listView save their own bundles too iirc

deanwray said:
yes, there are a few ways to do it, probably the easiest is just storing the scroll position yourself, much info on SO about this if you google... also complex views like listView save their own bundles too iirc
Click to expand...
Click to collapse
Thanks I got it
Sent from my XT1033 using XDA Premium 4 mobile app

Related

[Q] Is it possible to create folders in the menu screen?

I know you can create folders on the home screen but i'd really like to be able to organise the apps in the menu screen if its possible?
Thanks
Use App Categories
Sent from my X10i using XDA App
riccoex21 said:
Use App Categories
Sent from my X10i using XDA App
Click to expand...
Click to collapse
Did you read what the OP wanted and did you read what that program does?
go to the desktop and pres and hold then click folders then click new folders
-PiLoT- said:
go to the desktop and pres and hold then click folders then click new folders
Click to expand...
Click to collapse
You still can't move any of the programs that you have in your application menu screen into a new folder in that screen.
I think some of you need to learn to read properly before you give some answers that isn't about what the OP is asking for.
The program menu screen is not the home screen.
Don't think you can without using an application
Sent from my X10a
no but you can create short cuts on the homescreen and put themin folder therefore reducing the time u need to enter the menu
Firstly thanks for all your replies.
I know you can create folders on the homescreen, thats not what i'm looking for.
I want to organise the apps in my programs menu. Seems a bit silly its not more straight forward as i would have thought the ability to organise apps as being quite essential.
Any one know what apps can help?
@pilot
That isn't what he's after. There's no need to post it multiple times.
Sent from my X10i using XDA App
Also, you could try zMenu.
It's not great but at least it allows you to categorize all of your apps.
Sent from my X10i using XDA App
i know. i only posted it once and yes its because i didnt read. but io did say that if he was to make folders on the home scren it would decrease time needed to locate apps

Folders

Is there any way to create folders in that part were all your apps show up not sure what its called i know how to on the home screen
Sent from my GT-P1000 using XDA App
Yes Launcher PRO, tho it will cost you a dime...
skee^ said:
Yes Launcher PRO, tho it will cost you a dime...
Click to expand...
Click to collapse
I have the paid version of LP, and I can't find any way to create folders in the apps pages. Would you mind sharing how this is done?
You can't create folders in the app page as far as I know, only on the home pages.
Sent from my GT-P1000 using XDA App
Yeah i just paid for this and no you cant create folders in the draw
Sent from my GT-P1000 using XDA App
Try Apps Organizer by Fabio Collini
If you want to put app shortcuts in folders, yes.
I use "apps organizer" ( total disclosure, I have not upgraded to paid version yet, but I should )
After you install it, you can create Labels, into which you organize all of your apps.
I have about ten different label s:
Daily
Games: 2 player
Games: kids
Internet
Tools
Etc.
Once your apps are sorted then goto the Desktop, long press a blank spot, select Shortcut, select App Organizer and you will see all of your label groups
I use All Labels.... It works great
label interface page and long press on one
But the OP wanted to create folders in the applications pages (the drawer, right?).
Yes correct not on the home page but within the drawer
Sent from my GT-P1000 using XDA App
Thanjs for your help guys but i think ive found one go launcher ex seems good
Sent from my GT-P1000 using XDA App
What is the name of this app? And you can make folders in the drawer?
Yeah its called "Go Launcher EX" and you can create folders in the drawer like iphone folders also you can hide apps
Sent from my GT-P1000 using XDA App

Android databases technology

I am app developer and i plan to do application, which uses online database (on server), and i would like to ask, what are the most common used technologies(i mean which SQL databases). Im in touch with MySQL but think it isnt the best solution available. So what is your favourite way to connect your app with database?
//Do you know any good literature with this topic?
JohnDeere1334 said:
I am app developer and i plan to do application, which uses online database (on server), and i would like to ask, what are the most common used technologies(i mean which SQL databases). Im in touch with MySQL but think it isnt the best solution available. So what is your favourite way to connect your app with database?
//Do you know any good literature with this topic?
Click to expand...
Click to collapse
I think you should use GoogleAppEngine it shall simpify things if you dont plan for BIG DATA
Sent from my GT-S5302 using Tapatalk 2
It depends of how much data you plan to store and how many users you plan to have
It depends on connections
JohnDeere1334 said:
I am app developer and i plan to do application, which uses online database (on server), and i would like to ask, what are the most common used technologies(i mean which SQL databases). Im in touch with MySQL but think it isnt the best solution available. So what is your favourite way to connect your app with database?
//Do you know any good literature with this topic?
Click to expand...
Click to collapse
Pool of connections are preferable when your app uses many connections . It's already realized in Java and you may easily use it.
http://forum.xda-developers.com/showthread.php?t=2325799
Sent from my GT-S5570 using XDA Premium 4 mobile app
arpitkh96 said:
http://forum.xda-developers.com/showthread.php?t=2325799
Sent from my GT-S5570 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
That is an extremely limited guide that means a working internet connection has to be present for the app to work on all launches of the app.
A more efficient way of doing it is to put the JSON output into a local SQLite database, therefore effectively mirroring the online one and then make the app read (and write if needed) information from the local database - if you need changes to be written to the local database you would then need to add a post method that parses the local DB to JSON and sends it to the server for the server to update its version of the DB.
This way takes a little more coding but means that you can use the app offline.
Sent from my HTCSensation using Tapatalk
Jonny said:
That is an extremely limited guide that means a working internet connection has to be present for the app to work on all launches of the app.
A more efficient way of doing it is to put the JSON output into a local SQLite database, therefore effectively mirroring the online one and then make the app read (and write if needed) information from the local database - if you need changes to be written to the local database you would then need to add a post method that parses the local DB to JSON and sends it to the server for the server to update its version of the DB.
This way takes a little more coding but means that you can use the app offline.
Sent from my HTCSensation using Tapatalk
Click to expand...
Click to collapse
Depends on the op.wouldnt it be better if app simply downloads the database and use it(if he is only reading it).
Sent from my GT-S5570 using XDA Premium 4 mobile app
arpitkh96 said:
Depends on the op.wouldnt it be better if app simply downloads the database and use it(if he is only reading it).
Sent from my GT-S5570 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
If he could be sure his users would have a constant network connection then maybe, however, my method allows for offline viewing and more control over when the app connects to the internet if its tied into a refresh button for example.
Sent from my HTCSensation using Tapatalk
Jonny said:
If he could be sure his users would have a constant network connection then maybe, however, my method allows for offline viewing and more control over when the app connects to the internet if its tied into a refresh button for example.
Sent from my HTCSensation using Tapatalk
Click to expand...
Click to collapse
Little offtopic
Like if i want to open pdf from a file i use this
Code:
public void openpdf(File f){
if(f.exists()) {
Uri path =Uri.fromFile(f);
Intent intent =new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path,"application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {startActivity(intent);}
catch (ActivityNotFoundException e) {
Toast.makeText(MainActivity.this,"No Application Available to View PDF",Toast.LENGTH_SHORT).show();
}}}
What should i use to open archive files(zip,rar) (from intent).i have tried general method of getting Mime type but that didnt worked
Sent from my GT-S5570 using XDA Premium 4 mobile app
arpitkh96 said:
Little offtopic
Like if i want to open pdf from a file i use this
Code:
public void openpdf(File f){
if(f.exists()) {
Uri path =Uri.fromFile(f);
Intent intent =new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path,"application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {startActivity(intent);}
catch (ActivityNotFoundException e) {
Toast.makeText(MainActivity.this,"No Application Available to View PDF",Toast.LENGTH_SHORT).show();
}}}
What should i use to open archive files(zip,rar) (from intent).i have tried general method of getting Mime type but that didnt worked
Sent from my GT-S5570 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
if you wanted to open it from within the application you could do something like:
Code:
ZipFile z = new ZipFile("/mtn/sdcard/download/teste.zip");
But if you wanted the intent to launch into a different app to handle the zip (eg Archidroid etc) then have you tried something like:
Code:
File file = new File("mnt/sdcard/download/test.zip");
Intent i = new Intent();
i.setAction(android.content.Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(file), "application/zip");
try {
startActivity(i);
} catch (ActivityNotFoundException e) {
Toast.makeText(MainActivity.this,"No Application Available to View Zip files",Toast.LENGTH_SHORT).show();
}
Jonny said:
if you wanted to open it from within the application you could do something like:
Code:
ZipFile z = new ZipFile("/mtn/sdcard/download/teste.zip");
But if you wanted the intent to launch into a different app to handle the zip (eg Archidroid etc) then have you tried something like:
Code:
File file = new File("mnt/sdcard/download/test.zip");
Intent i = new Intent();
i.setAction(android.content.Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(file), "application/zip");
try {
startActivity(i);
} catch (ActivityNotFoundException e) {
Toast.makeText(MainActivity.this,"No Application Available to View Zip files",Toast.LENGTH_SHORT).show();
}
Click to expand...
Click to collapse
Thanks.
One more.l am asking about the method i suggested of downloading the database for readonly purpose.where should i upload the database so that server could handle multiple downloads etc.
Sent from my GT-S5570 using XDA Premium 4 mobile app
arpitkh96 said:
Thanks.
One more.l am asking about the method i suggested of downloading the database for readonly purpose.where should i upload the database so that server could handle multiple downloads etc.
Sent from my GT-S5570 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I'd have thought just having the database on the server and using the php script to output a JSON response then put the JSON response into a local SQLite database would do that.... I'm not entirely sure what you're asking though
Jonny said:
I'd have thought just having the database on the server and using the php script to output a JSON response then put the JSON response into a local SQLite database would do that.... I'm not entirely sure what you're asking though
Click to expand...
Click to collapse
Have you ever used Dictionary.com app.it has an option for offline mode in which it downloads the whole database into the internal memory to use it any time.i want to do that.I am asking where should i upload that database(server,website etc) so that i could download that easily in myapp
Sent from my GT-S5570 using XDA Premium 4 mobile app
arpitkh96 said:
Have you ever used Dictionary.com app.it has an option for offline mode in which it downloads the whole database into the internal memory to use it any time.i want to do that.I am asking where should i upload that database(server,website etc) so that i could download that easily in myapp
Sent from my GT-S5570 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Ah right I get it, you would need a server with sql support - or at least a hosting package that allows you to add your own database, then just use phpMyAdmin/MySQL to create the database.
Jonny said:
Ah right I get it, you would need a server with sql support - or at least a hosting package that allows you to add your own database, then just use phpMyAdmin/MySQL to create the database.
Click to expand...
Click to collapse
Thats ok.but which server or website can do this.
Sent from my GT-S5570 using XDA Premium 4 mobile app
arpitkh96 said:
Thats ok.but which server or website can do this.
Sent from my GT-S5570 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
2 services I'm currently using are http://www.unlimitedwebhosting.co.uk/ & http://x10premium.com/ - you're probably ok with the low cost options that offer "unlimited" stuff (subject to interpretation and fair use etc) because the overhead on MySQL is not a lot so you probably won't use much bandwidth.
As a general guide pretty much anyone who offers cpanel or similar control software will have MySQL enabled - though be sure to check because hosts have been known to disable MySQL in cpanel before.

Gallery question & issue with Docs to go

In both my S3 & S4 I was able to label a picture in my gallery from any one of my albums a favorite picture making it easier to find a picture i wanted. I can't seem to find that option in my S5. Is this feature gone?
Also, I cannot open any type document files on my phone. I was able to open files on my S4 and I haven't changed the Microsoft Office program I use to normally create or edit files. I keep getting the error THIS FILE CANNOT BE OPENED BECAUSE IT IS NOT A VALID MS WORD 97-2011 FILE. This error happens with word, ppt, & excel files I try to open. Anyone else get this error. Thanks in advance
Sent from my SM-P600 using XDA Premium 4 mobile app
Anyone
Sent from my SM-P600 using XDA Premium 4 mobile app
Just wait someone will reply about this problem

Can I use tabs in more than 1 activity?

I'm making an app that uses tabs in my main activity. I want to be able to open another activity which will also use tabs. Everything I've could think of to try results in my app crashing when I open the second activity.
Is this possible to do? If so can someone help me out?
Sent from my Moto X using XDA Free mobile app
jeb192004 said:
I'm making an app that uses tabs in my main activity. I want to be able to open another activity which will also use tabs. Everything I've could think of to try results in my app crashing when I open the second activity.
Is this possible to do? If so can someone help me out?
Sent from my Moto X using XDA Free mobile app
Click to expand...
Click to collapse
Log? Activity code? Layouts? Manifest file?
Usually the most common reason this happening is because people forget to add the new activity to the AndroidManifest.xml file, if you've already done that then we need more information than you've currently given.
Sent from my HTC One using Tapatalk
It is definitely possible, can you show us where it errors out (I.e. logcat)
Well. I just discovered viewpager and I was able to get that to work how I wanted to use the tabs. Kinda wish I would've found this before asking the question. I have the horizontal scrolling working to swipe between pages. Can you guys help me get the vertical scroll view to work so I can view the rest of the text on each page?
Edit: never mind. Just got the vertical scrolling to work.
Sent from my Moto X using XDA Free mobile app
Code:
<ScrollView >
<LinearLayout> <!--or whatever layout you choose-->
</LinearLayout>
</ScrollView>

Categories

Resources