Questions tagged as 'java'

1
answer

Error xmlns jsf, settings?

I'm getting the following error when trying to compile an xhtml page, I'm using the xmlns's below: Elements with namespace link may not have attributes in namespace link . Namespace link is intended for otherwise non-JSF-aware markup, su...
asked by 10.03.2018 / 20:39
3
answers

Save state when returning to an activity

I have a registration activity with 4 fields: 1 editText and 3 Spinners. At the click of a button the data filled in these fields are registered in the database and lead to another activity with an imageview of confirmation, which when passing 2...
asked by 11.03.2018 / 03:34
2
answers

comparing a variable with a vector or list

Usually to perform a conditional using a vector or a list and it is necessary to perform a for and perform the if line by line in this way. //sendo item uma string e listaItens um List<String> for(String lista: listaItens){ if(item.e...
asked by 02.03.2018 / 15:59
1
answer

Android - How to end / end an Activity?

How do I close, finish, end a Activity , after executing a method? In my project, I have two Activitys: MainActivity EditorActivity (Performs some simple tasks) I would like to end it, after calling the last method that complet...
asked by 24.02.2018 / 20:03
1
answer

What is the best way to display only two houses in a float in java

I'm creating a simple application in android studio, where I make a split and present its result in an EditText, however I'd like to present only two decimal places, what's the best way to do that?     
asked by 24.02.2018 / 22:04
2
answers

How to simplify the clicks on buttons in Java for Android?

I'm starting to have many buttons in the same Activity and however simple they are, the code is getting big, and it gets even bigger. I wonder if you have a way to simplify by reducing the number of lines: For example to open an activity t...
asked by 25.02.2018 / 18:42
1
answer

Error executing JSF project by eclipse [closed]

Good night, I'm trying to run a project in eclipse, but tomcat is throwing me the following exception. Does anyone know what it can be? fev 25, 2018 8:57:57 PM org.apache.tomcat.util.digester.SetPropertiesRule begin ADVERTÊNCIA: [SetProperties...
asked by 26.02.2018 / 00:59
1
answer

Using executor on android

I'm trying to use an executor to write data to the bank using threads. When instantiating an Executor Service class object and retrieving an instance of Executors.newSingleThreadExecutor (); it returns the error that is not finding the instance...
asked by 24.02.2018 / 18:33
1
answer

Firebase - Because it does not execute the code of addOnCompleteListener

How does the addOnCompleteListener work, is it not a listener that will be called when the signInWithEmailAndPassowrd operation is executed? It enters a correct login and password and I click on the button it arrives until the task.addOnComplete...
asked by 24.02.2018 / 15:36
1
answer

Create spinner with dynamic values

I'm trying to create a spinner with dynamic values. It is giving an error when I try to set the adapter in spinner , below is the error and my code. java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget...
asked by 21.03.2018 / 18:32