Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have code which is running with preference data. I have very simple boolean control store in preference. When I update my application, I'm seeing that it doesn't clear data and is running with previous data. I have to fix that problem tonight, what is your suggestion about this? Thank you
Make your application read a "version" value from the preferences. If that version is not there, or is not the same as the current version, then you can clear/update/migrate the preferences to the new version.
I'm writing from iPad, so I can't write more code. I did something that U want to do a longtime ago )))To clear all data use this. And then in loading activity use something like this:
if (BuildConfig.VERSION_CODE < #version code from preferences#) {
// clear data
// save new version code to preferences
}
Always when user updates his app, this code will clear data if the application's preferences have no >= version code.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 months ago.
Improve this question
I've built a simple storeHelper app (you can write which products you need to buy, when and in which store) and I want to add a function of adding a checkbox as a user to mark what you've bought from the list, like in a SamsungNotes app, how can I do it + how do I need to change a database to save the status of checkbox?
You can add the checkbox from the Palette in Android Studio, checkbox is available inside the button section in the palette. About the Firebase connection I only know about how to save the user credentials in the database I have no idea about the checkbox status.
#Serg Do provide more details on what database you want to use as the question is very vague. Also, do check the documentation for checkbox and try it out first.
#Manthan For checkbox status it can be stored into Firestore as a field in a document which belongs to the user. Do check out the documentation.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have 1000 images, each of them signifies a state at the time step. I would like to create an application that allows us to use a slider move through time steps, eventually being able also to see some information about what is going on in the image (like region size ect). I created the algorithm which creates generates and analyzes images in Python and I guess I will try to create UI in Java. Any recommendations on how to approach it? ( I am not very proficient in Java but I understand the basics). I attached the general view of what I want it to be below:
Try Tkinter, it is a very easy to use UI creator in python.
https://docs.python.org/3/library/tkinter.html
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to monitor changes that occur in the database. Say, for instance when an item is removed from the database. I want to be able to use an interface to monitor such changes and create an alert of how many no of items are left in the database . Every 5 min or so. Is there any plugin for java, or some kind of interface or something else? I will be grateful for the help.
Best Option Use DDL TRIGGER as it is DB change event meaning
CREATE DDL TRIGGER
ON DB AFTER DELETE AS
"YOUR ACTION STATEMENT" ;
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I want it to be like this. Inside the panel some details from database. Maybe a loop to do this?
You would generally display data from database tables in a JTable. You need to do an SQL query to get the data from the database and then you copy the data from the ResultSet to a TableModel.
Take a look at the TableFromDatabase.java class found in Table From Database for a generic example of this might be done.
If you are using Netbeans 7.x and above, then Right Click on the desired package (or better create one) -> New -> Other -> Swing GUI forms -> MAster Detail Sample Form.
Proceed forward, establish a database connection through the wizard, choose which entities you wish to display and let Netbeans do the rest for you.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
In My app I want to have an external file for saving my settings, item tags , etc. (for using it in outside of app like sending it on another device and so on).
after researching a lot I came to have a text file like this:
settings.txt
"Item1" : "data1"
"Item2" : "data2"
...
now is it the best solution for my purpose?
and if it is, how am I supposed to get my data based on it's id (Item number) from this kind of text file? (I can do the writing part but have no idea how to retrieve it).
Thanks in Advanced.
Instead of your way, you can store the key and values in JSON format. That way it would be easier for you to parse the data and get the value based on the item number (key). You can even use Google's Gson lib o make things simpler. JSON.simple example – Read and write JSON will help as well.