Questions tagged as 'java'

1
answer

Read in another activity a variable that is updated in MainActivity

I have a function that runs every second. This function sends a request for information via socket to a device. This information is received in AsyncTask which does the calculations and updates some variables that are in MainActivity...
asked by 17.01.2017 / 15:11
1
answer

How to block my app if there is no internet [duplicate]

I'm creating an application that needs internet,  If this person's cell phone is without internet, the application would not start because it would only open if you were on the internet. How can someone help you?     
asked by 18.08.2017 / 22:10
1
answer

How to insert icons in JSF?

In a registration form I have to insert edit and delete icons in a form made in JSF. <h:commandLink action="#{clienteController.editar}">Editar     
asked by 29.09.2017 / 18:41
1
answer

Options menu with setOnItemClickListener

I have a listview , and with setOnItemClickListener and / or setOnItemLongClickListener I delete the registry. I would like to know how to open a janela (type a modal, which opens the window and dims the background)...
asked by 11.10.2017 / 15:48
3
answers

Make request in a defined time interval

My application should update a list of data coming from the server every 5 minutes. Using Retrofit for HTTP request, what is the best way to do this?     
asked by 03.10.2016 / 04:39
1
answer

How to do this relief when hovering on a JLabel?

The board is 500x500 and each square of it is 50px, so the variables NovaPosicaoX and Y always take the border of the square where the mouse pointer is. The problem is that the relief only works in the squares of the window bord...
asked by 29.12.2016 / 18:30
3
answers

How to insert markers (marker) on a map in another fragment?

I'm developing an Android app where you enter a list of courier tasks (get something in point A and take it to the point B ) and these points are shown on a map App has two snippets: ReclyclerView containing the ta...
asked by 08.01.2017 / 18:31
2
answers

How to have a WebView in full screen?

My specific question: How do I open a% s of full screen% in Android Studio? Change Theme in Manifest? Change Theme in XML? Force a JAVA script? Change the view's borders? Change code in Style? All these attempts quoted above have been thor...
asked by 12.01.2017 / 23:19
1
answer

Error reference Firebase

I'm developing an application in Android Studio and using Firebase as a bank, but after finalizing the project structure when I went to test it it has an Android Strudio reference error with Firebase. I can not solve the problem, can anyone figu...
asked by 16.01.2017 / 22:18
1
answer

Is it possible to activate the context menu of the Operating System in swing application?

Some time ago I realized that it is not possible to call the context menu of the operating system in swing components, although it is possible to perform standard keyboard actions (such as copying, pasting, cutting, selecting) on these component...
asked by 11.01.2017 / 13:22