Questions tagged as 'android'

1
answer

Change textview color using switch

I'd like to know how to change the color of a texview using a switch . When selecting Switch , the word on the side stands out with another color in Android Studio. XML Code: <?xml version="1.0" encoding="utf-8"?> <android.s...
asked by 25.08.2018 / 14:39
1
answer

How to prioritize the wifi connection of the device even without internet?

I have an application (Android / iOS) that runs on a local wifi network (which has no internet). This wifi network does not have internet, devices prioritize 3G / 4G, so my application (local API) does not work. I have tried to find out if...
asked by 29.08.2018 / 15:12
1
answer

Close Activity if Idle

I have an application and need to Activity close automatically if idle, ie if the user does not touch the screen for 30 seconds, Activity automatically closes. While the user is using (touching) Activity , it will remain open...
asked by 03.08.2018 / 16:01
1
answer

How to use Select

I was able to save information to my SQLite database, but I can not call them. I'm trying using the following method: private void verPessoas() { ArrayList<RespostasAguaCasa> pessoas = new Read().getLista(); for (int i = 0; i...
asked by 10.06.2018 / 22:25
1
answer

Access list from within a ViewHolder in Kotlin

I need to access a list that is in the Adapter, however, I need to access being in a ViewHolder, I know that with Java it would only refer to the list, but in Kotlin the list is not recognized, class SearchFilterAdapter(private val filterList:...
asked by 25.05.2018 / 21:38
1
answer

Get element in ArrayList

I'm having a problem with the line: lista p = lista.get(i); You do not want to get the element. Look at the method below: private void verPessoas() { ArrayList<RespostasAguaCasa> lista = new Read().getLista(); fo...
asked by 26.05.2018 / 20:50
1
answer

The operator + is undefined for the argument type (s) CharSequence, int

I am trying to concatenate a text in% with% with% with%, but java warns that it is not possible to do this by saying:    The operator + is undefined for the argument type (s) CharSequence, int I have already tried to remove the casting...
asked by 09.07.2018 / 19:58
1
answer

Is it possible to use a Strings.xml specific to the Android version?

I applied a different color to certain words within some TextViews with the% TAG of%. I was able to get to this result after an internet search. The problem is that this feature only works for newer versions of Android, in older versions the...
asked by 21.07.2018 / 00:54
2
answers

Save data in an Activity when changing Activity

The program is a counter, by clicking the + button it adds +1 to the cont1 variable ... cont2 ..., I want it when I click on the report and I go back to this page, the data I added to the variable to be there Always when I click on the report an...
asked by 12.05.2018 / 23:02
1
answer

Add a vowel at a time in a TextView

I have 5 buttons that emulate vowels, how does each button add a vowel at a time to a viewer, set to TextView ?     
asked by 13.05.2018 / 12:31