Questions tagged as 'android'

1
answer

How to keep text from a TextView after the App close

Well, I'm new to Android, but I'd like to know how I can keep / store the information in a TextView, so it will not be deleted when I close the application. public class Activity extends AppCompatActivity { Calendar c = Calendar.ge...
asked by 11.08.2017 / 19:00
1
answer

Random numbers repeating

Well guys, it's this: I have a method that generates random numbers, and in the activity I try not to repeat those numbers, but it happens that they repeat themselves. What am I doing wrong? Method: private int numeroAleatorio() { int n...
asked by 13.11.2017 / 17:00
1
answer

Problem in making TextView display value updated

I'm doing a simple application, it's just a counter, with two buttons, "+" and "-", which consists of displaying an initial value of 0, and if I click on any of the buttons, the value displayed on the screen will be increased, or decremented, ac...
asked by 28.07.2017 / 05:18
1
answer

How to check if a button is visible?

I wonder if it's possible to use a condition operator such as if for example to check if a button is visible or not. If so how can I implement it? I made a few attempts using is.Enable but I did not succeed.     
asked by 21.10.2017 / 23:15
1
answer

Create popup with Rg.Plugins.Popup

Does anyone know of any tutorial to create popup in xamarin.forms using this plugin, Rg.Plugins.Popup? I need to create a popup and inside it a textbox or textarea with two buttons (Ok and Cancel).     
asked by 25.10.2017 / 11:53
1
answer

How to pass phrases to a variable and then show randomly

Well, I started programming yesterday in React Native and I still do not understand very well how to do things .... I need to pass a series of sentences to multiple variables, each variable a phrase, and then present them in a way random. onPla...
asked by 17.05.2017 / 10:37
1
answer

Error in the comparison between an EditText and a String

I'm trying to compare the text entered in an EditText with an item in my ArrayList, but the condition is never true. int aux=-1; for (int i = 0; i < lista2.size(); i++) { if (edContato.getText().equals(lista2.get(i))){ aux = i;...
asked by 06.05.2017 / 23:19
2
answers

When I put the \\ b in the pattern.compiler it returns the find as false

When I put \ b in pattern.compiler it returns matcher.find as false, because it can not find a pattern just because of \ b. Following the code I use: final Pattern py = Pattern.compile("\b(print|True|False|int|str|float|bool)\...
asked by 06.10.2017 / 14:25
1
answer

Limit recording time (MediaRecorder)

Hello, as the title says I want to limit the recording of my code: private void startRecording() { mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorde...
asked by 16.07.2017 / 23:02
1
answer

Why do some actions give error if I do not specify View as parameter in Android?

I'm creating a test app with the basic knowledge I got on android since previously I was a java programmer. All of the tutorials I searched for put the View class as the default parameter in their methods, but no one explained why, and hj...
asked by 09.06.2017 / 04:15