All Questions
70
questions
0
votes
1
answer
3k
views
Kotlin text validation
I'm new to Kotlin, not so new to Java and Android development. But willing and trying to ...
3
votes
0
answers
266
views
Search GitHub users when text field changes in Kotlin Android app
Problem: Search for users by their name using the GitHub API (sorted by the number of followers) and display the results in a RecyclerView.
Implementation: Hitting the GitHub API every time when user ...
0
votes
1
answer
2k
views
Remove repetitive code for multiple spinners using one listener
I managed to setup multiple spinners using one listener but there is a lot of repetition in the code.
My full onItemSelected method:
...
0
votes
1
answer
2k
views
Loop to check isNullOrEmpty then setVisibility & setText
My code below is working fine but I know it can be done more efficiently using a loop.
I'm checking the VAL (such as description, ingredient2, etc.) which are Strings from my SQL lite Db to see if ...
3
votes
2
answers
151
views
Trying to Store EditText Values in SharedPrefs using a Single addTextChangedListener
The code is completely functional but I'd rather not call two functions when I know it can be done more efficiently. My goal is to store EditText values in SharedPrefs using a single ...
4
votes
2
answers
543
views
Storing realm objects using Kotlin extensions
I am a Java Android Developer and I'm approaching Kotlin.
I have defined the following class:
open class Player : RealmObject() {
...
}
And I defined the ...
4
votes
0
answers
287
views
Trying to avoid null types using lazy and lateinit Kotlin
I am using Kotlin from quite some time now, but I could not able to achieve not-null types for all the properties in Kotlin.
After what I learned by watching Kotlin in Google IO and a bit of research,...
3
votes
0
answers
153
views
BDD on Android with Kotlin
I am considering an approach fo BDD tests on Android.
The sample app — a simple messenger — has been made in Kotlin, so will be the tests.
I ended up with something like this :
...
5
votes
2
answers
3k
views
Java/Kotlin JSON parsing improvement
I consume an API which gives me this type of JSON:
...
2
votes
1
answer
6k
views
Counter with increment and decrement buttons
For my first Kotlin project, I'm implementing the Redux pattern with simple Increment and Decrement buttons and a text view to display the current value.
My main questions have to do with Kotlin and ...