Posts by Victor Pettengill Fernandes • 301 points
11 posts
-
1
votes2
answers143
viewsA: It is possible to open Activity inside framelayout
what you are looking for are "Fragments", which you can inflate as many as you want inside an Activity
-
2
votes1
answer2933
viewsA: java.lang.Nullpointerexception: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null Object Reference
the findViewById method should be called when your view already exists, in the case of Fragment, the view is only created in the onCreateView method. Then you could do so: private EditText nomeEt;…
-
3
votes2
answers123
viewsA: Problem with If Logic with GPS on Android
was watching your if code and noticed the following. latitude >= -22.899529 && latitude <= -22.89992 This will never enter, as for the latitude to be greater than -22.899529, you would…
androidanswered Victor Pettengill Fernandes 301 -
0
votes1
answer159
viewsA: (Android Studio) Problems with Onrestart eating the main interface
I believe the problem is connected to this part of the code. setContentView(t); setContentView(R.layout.activity_exercicio1); 'Cause you’re putting as your main view the: TextView t = new…
-
0
votes1
answer143
viewsA: Android & Firebase Async tasks
It’s actually not a good practice for you to perform this type of query that you need to "wait" on the main thread. As for firebase, unfortunately (or fortunately) it does not have a synchronous…
-
1
votes1
answer204
viewsA: Listview inside a Tabview with Firebase data
What happens is that you are adding dice into your Arraylist after you have set the Adapter. Adapter does not know that you have added a new item unless you advise. For this you should call the…
-
3
votes1
answer559
viewsA: Set value in textview
I believe that it may be giving some problem of you using the @Viewbyid Annotation and then in the code is giving a findViewById. Try to remove the Annotation and tell us what happened. -- EDIT--…
androidanswered Victor Pettengill Fernandes 301 -
0
votes1
answer72
viewsA: Equal functions if
I don’t know if I got it right, but what seems to be bothering you is that break in Else if, because it for the execution of for if (option == 0) { httpConnection.getIdCatFromCadCategorias(…
-
0
votes1
answer1040
viewsA: Receive a single data from a Firebase node
Hello, FirebaseConfig.getFirebase().child("Usuarios").child(usuarioLogado); It will return the whole object of "Users", if you want to return only the "name", do so:…
-
0
votes2
answers255
viewsA: Error while receiving Firebase data
The problem is that your "News" node is not an array. What happens is that you are iterating over the node values. So @Override public void onDataChange(DataSnapshot dataSnapshot) {…
-
1
votes2
answers203
viewsA: Exit warning on Webview
In your Activity override the onBackPressed method, don’t know how to do it? It’s like this: @Override public void onBackPressed() { // Ai você precisa criar uma AlertDialog confirmarSaida(); }…