Skip to content

Tag: android

cannot resolve method ‘get key’ in Pair in android?

I have a problem using functions in Android Studio, where i use the function in Pair library,here’s a snippet of my code i need a solution, thanks Answer Because there is not a #geyKey in android.util.Pair . You need use property of pair which are first and second. Here p.first will be key and p.second …

Android studio – Change string in textView

I have some stings in the styles/string.xml as below: and I have a textView and a button in my current activity. When I click the button, the text in the textView has to change (to the next sting) according to what is currently shown. That is, if the current text in textView is string1, then it should change …