Questions tagged as 'java'

2
answers

NullPointerException when creating a View on Android

I'm creating a Activity on Android, whose code is here , and I'm getting a NullPointerException near the line final TextView txtResult = new TextView(this); I got the following stack dump: 05-07 09:12:57.180: E/AndroidRunti...
asked by 07.05.2014 / 15:44
1
answer

Design patterns in Spring Boot projects

In the last 12 months I've worked and studied to learn how to create REST APIs with Spring boot, before that I worked with php MVC programming to create web systems and now in my "migration" to Java using Spring I'm having doubts / Difficulty to...
asked by 20.11.2018 / 20:55
1
answer

Error trying to execute firebase forgot-password

I'm doing the firebase's forgot password screen and it's giving an error when I put the .sendPasswordResetEmail. This is the version of my firebase: implementation 'com.google.firebase:firebase-core:11.8.0' implementation 'com.google.fireba...
asked by 28.11.2018 / 19:36
1
answer

Android - How to detect which fragment is current?

Hello, I have an application that uses the fragments system and a FloatActionButton, in one of the fragments I have an ad banner just below the FloatActionButton, I did the form below but it does not work with the fragments on the stack, is there...
asked by 26.09.2018 / 12:56
3
answers

Using a hashMap

I have a hashMap and inside it I have an ArrayList. How do I know if an element has this list through hashMap? List<Carteira> carteiras = ArrayList<Carteira>(); carteiras.add(carteira1); carteiras.add(carteira2); Map<String,...
asked by 11.03.2014 / 01:52
1
answer

Read text file via HTTP

I'm creating an Android app with Android Studio and am having trouble reading a text file that is hosted on the Internet. Whenever I try to execute the checkVersion () method it returns the following error: Themessageisemptybecausenet.getMe...
asked by 09.03.2014 / 02:01
1
answer

Add and remove percentage

On a certain screen I get a value and add 10% over that value. 100,00 + 10% = 110,00 I save the final value (110.00). I'm having a hard time getting the final value (110.00) and taking the 10%. 110.00 - 10% = 99.00 and in real I wanted to r...
asked by 08.03.2014 / 06:33
2
answers

The method openOrCreateDatabase (String, int, null) is undefined for the type DatabaseData

I'm having trouble creating a class that created and manipulated the database! But in criar() method gave a problem saying that    "The method openOrCreateDatabase (String, int, null) is undefined for   the type DatabaseData ". Doe...
asked by 03.03.2014 / 19:01
1
answer

Redirection of sum result in JSP servlet

I need to show the result of a sum in a redirected page, I tried a "setAttribute" after the "Redirect" but it does not work. The sum value would have to go to an "input" on the next page, or a simple " <h1> ". The part of the "reques...
asked by 17.09.2018 / 23:22
1
answer

How do I delay or cause a wait on Android?

I have a for where it scans a String vector, sending command increment increment. for(int i=0; i < msg.size(); i++) { enviarComando(msg.get(i)); } When he sends, I want him to wait 1 second for each shipment. I tri...
asked by 25.08.2018 / 18:57