Questions tagged as 'java'

1
answer

Get data from a JSON array and add it to a list in Java WEB

I have a list in JSON: {"_status":"sucesso","_dados":{"situacao":"PROCESSADO","mensagem":"Consulta realizada com sucesso","processados":0,"titulos":[],"titulosNaoConciliados":[{"Ocorrencias":[],"CodigosOcorrencias":[],"CodigoMovimento":"06","...
asked by 04.07.2018 / 20:30
1
answer

Change the Android App icon

I'm developing an app in Android Studio and while running the app on my smartphone, the icon that appears is Android's own. How do I change this icon for one I have on my computer?     
asked by 26.01.2018 / 02:10
1
answer

BottomNavigationView does not work on first click

I have a problem with my advance menu, it does not work when I click the first time, it is necessary to double click to perform the action bottomNavigationView.setOnNavigationItemReselectedListener(new BottomNavigationView.OnNavigationItemRese...
asked by 13.12.2017 / 11:12
2
answers

NullPointerException while getting latitude and longitude

I'm developing a mobile app with Android Studio that aims to get the latitude and longitude information and use the Google Geocoder service to return the address of the geographic position. However, I am not able to capture the latitude and long...
asked by 15.12.2017 / 15:03
1
answer

IndexOf does not work in Arrays?

I have the following code that holds an array with 7 values, each for each day of the week. then I have to create a function that sums these 7 values (successfully completed), says what is the largest value of this Array (successfully completed)...
asked by 29.11.2017 / 19:23
1
answer

Txt displays duplicate information

What this application does: the user has to choose the right answer to the question. I just put a question for now. Once you have save the answer (this is within a .txt) it can see result . And here's the problem: by clicking on see resu...
asked by 29.12.2017 / 16:29
1
answer

Popular combobox within the jtable with database, how to proceed?

Currently I populate a normal combobox this way: this.CadperfilLinha.removeAllItems(); try { Class.forName(Auxiliar.AcessoBanco.getDriver()); Connection con = DriverManager.getConnection(Auxiliar.AcessoBanco.getUrl(), Auxiliar.AcessoBa...
asked by 08.01.2018 / 13:38
1
answer

getText () returns null when trying to read the value of typed in an EditText

I have an EditText field and I want to save the Text in it by pressing a button I tried to do it using the following code but the string remains as null public void Botao (View view) { setContentView(R.layout.content_main_menu);...
asked by 12.01.2018 / 23:15
2
answers

NetworkOnMainThreadException error while retrieving device's local IP [duplicate]

String netAddress = "000.000.000.000"; try { netAddress = InetAddress.getLocalHost().getHostAddress(); } catch (Exception e1) { e1.printStackTrace(); } ipLocal.s...
asked by 23.04.2018 / 01:13
1
answer

I can not change an attribute of my array

@EDIT Introducing a minimal example, as requested: MAIN package teste; public class TESTE { public static void main(String[] args) { Tabuleiro cenario = new Tabuleiro(1); cenario.setVisibilidade(); } } ABSTRA...
asked by 11.06.2018 / 15:09