Posts by Jadiel Santana • 1 point
6 posts
-
0
votes2
answers102
viewsA: Format a double of a variable with two houses
There are two solutions. 1° solution: String resultadoFormatado = String.format("%.2f", precoDesconto); 2° solution: DecimalFormat formato = new DecimalFormat("#.##"); double resultadoFormatado =…
-
0
votes1
answer171
viewsA: Recyclerview does not show list data
This should work for you: public void ListarArquivosdoFTP() { new Thread() { @Override public void run() { try { Recibo recibo = null; classe_FTP ClienteFTP = new classe_FTP();…
-
0
votes1
answer37
viewsA: Android Locked When Calling API
I believe the problem lies in these lines: connection.setRequestProperty("Content-type", "application/json"); connection.setRequestProperty("Accept", "application/json"); You call the same method…
-
0
votes1
answer1147
viewsA: Delete data from Sqlite database
I do not know if it is still useful, but it follows a solution: public void delete(int id) { try { String[] args = {id}; getWritableDatabase().delete("Dados_familia", "id = ?", args);…
-
0
votes1
answer164
viewsA: Unexpected return when converting String to Integer in Java
Just replace '%s' with '%d'. %s is for Strings printing and%d is for integer printing. chamarTelaPrincipal.rpm.setText(String.format("%d", valorrpmint));
-
0
votes1
answer45
viewsA: Doubt with data protection in application
I believe that of the two options, the second is the most trivial. However, I would suggest you create a web server to store this data, as malicious people would not have access to the server and…