Posts by Rafael Silva • 944 points
60 posts
-
3
votes2
answers1234
viewsQ: Compare Two List
I have a list List<Comentarios> comentarios List<Comentarios> comentariosSP The first list I receive data from a webserver, the second from a Sharedpreferences. I tried to compare them…
-
1
votes0
answers100
viewsQ: Upload image using Android
I implemented the step to download the images on Android. It’s working wonderfully well. But now I need to do a method to upload an image to a php server. I thought of converting to Base64 and…
-
1
votes2
answers430
viewsA: Problems with a Java Linked List object
To print a list in Java you have to go through it. Here is an example: for (String nome : lista){ System.out.println(nome); } The issue of printing the list will be resolved. But as the friend said…
javaanswered Rafael Silva 944 -
1
votes1
answer53
viewsQ: Pause an Asynctask until a task is completed
In my Asynctask I urge 4 new objects, only I have to stay in it until all objects are brought in. Follow the code: @Override protected Void doInBackground(Void... voids) { new…
-
6
votes4
answers364
viewsQ: Different methods of creating an object
What is the difference between these two types of creation/instantiation of an object? Usuario usuario = new Usuario(); usuario.listar(); new Usuario().listar();…
-
1
votes1
answer51
viewsQ: Leave some data from a Java interface not required
I use interfaces to make the callback on android. public interface CallbackUsuario { void resultadoSalvar(boolean b); void resultadoTrazer(Usuario u); void resultadoListar(List<Usuario>…
-
0
votes1
answer92
viewsA: Webservice php without using Soap?
Use JSON as a return... There on Android you receive with the aid of some library and create the objects using Gson Simple example in php that returns a JSON array: $result =…
-
1
votes3
answers318
viewsA: Change the format of a date(time) in a String
One way would be to convert toString to and break this string using split String string = "11:12:13"; String[] partes = string.split(":"); partes[0]; // 11 partes[1]; // 12 partes[2]; // 13…
-
3
votes1
answer731
viewsQ: Return data obtained in Onresponse
How do I make the return of this String rest? If I give the Return there it does not accept... and if and at the end of the method and use an auxiliary variable runs the risk of returning a null.…
-
0
votes0
answers54
viewsQ: Doubts structure of a crud on Android
I have the following classes: Client, Clientedao and DAO. In the Client template I have attributes and gets/sets. In Clientthe I have the methods save(), change(), ... ie the crud. This class…