Skip to main content

All Questions

Tagged with
3 votes
1 answer
776 views

Kotlin shared preferences

So I've written a class for storing user/device specific settings, but I've written the Kotlin pretty much like I would in Java: ...
Ian Newson's user avatar
3 votes
1 answer
101 views

ViewModels for image transformations

In my project I have a chain of Fragments where each one gets a bitmap, manipulates it, then sends it to another fragment for more processing. My fragment chain looks like this: CaptureFragment -> ...
Azbyn's user avatar
  • 33
2 votes
1 answer
187 views

Kotlin Android request client

As part of an android app, I've written a simple wrapper that makes requests to an api and fetches stuff. ...
nz_21's user avatar
  • 1,041
2 votes
1 answer
62 views

Data class where i need to set values for different fields at different times

I am creating a request for an api using below class- ...
Android Developer's user avatar
1 vote
1 answer
356 views

Android RecyclerView Popop Activity - 5 second popup time

So I've been working on a RecyclerView recently that's in a popup, and it takes a few seconds to popup with around 100 items. I want to make this faster, so any improvements on my code is appreciated :...
Rafay Kalim's user avatar
3 votes
1 answer
2k views

Android LiveData Shared between activities by Application Session

I'm developing an app that use socket to receive messages from a chat. I'm using an MVP approach and I store the data in a Singleton class named DataBridge like ...
user2257222's user avatar
6 votes
0 answers
199 views

Converting between cooking measurements

I've made an Android app that converts between cooking measurements, taking into account the type of product you use (that way it can convert between mass and volume by using the density). What are ...
Jeroen Vannevel's user avatar
3 votes
0 answers
71 views

Listing YouTube videos using API with RxJava

I am new to RxJava and have the following code which I use to search YouTube videos via the API and ultimately display them in a list. ...
Adam's user avatar
  • 321
1 vote
1 answer
2k views

Destroy Singleton pattern in kotlin

I am practicing Singleton pattern in kotlin. It is a quiz app which has question tile with four options and one correctIndex. McqOldActivity.classs ...
Zar E Ahmer's user avatar
4 votes
0 answers
907 views

Wrap location API in coroutines

In my app I need to query location and scan wifi periodically. To conserve power I need to change the rate dynamically, depending on the distance to the target. Also I want to wait for both ...
leonardkraemer's user avatar
3 votes
0 answers
448 views

Timer application in MVP

I create simple Android timer application and I try to use MVP design pattern. I read some tutorials and after that I started writing code. My code is working correctly and as intended. There is ...
ostojan's user avatar
  • 151
0 votes
1 answer
56 views

Simple Registration Form. I would like to get rid of code duplications

I don't like my current code, because of duplications. What's the best way to leverage Kotlin to make it more concise. I have simple registration form ...
jakub's user avatar
  • 101
1 vote
0 answers
2k views

LiveData, MVVM and Repository Pattern

Is this a good approach or I've just found a nasty workaround? I'm using MediatorLiveData class because seems useful to update the source of a ...
Ricardo's user avatar
  • 111
2 votes
1 answer
380 views

Kotlin reflection to generate one class from class similar with similar properties

This code is intended to generate a class (domain) from a class with class with similar/identical properties (api). Motivation is to speed development time when using clean architecture. ...
Martin's user avatar
  • 306
3 votes
0 answers
821 views

Endless scroll in kotlin (android)

This is the code of my function to endless scrolling. It's a good practice to bind new disposable in onscroll listener? What do you think about my code? ...
KarolDevz's user avatar

15 30 50 per page