https://kotlinlang.org
Join Slack
Is there any way to make the clickable region larger than the icon without making the icon size bigg...
s

Sergey Y.

about 5 years ago
Is there any way to make the clickable region larger than the icon without making the icon size bigger? I want to achieve a borderless ripple effect and easier clicking. Maybe some modifier? Is there an analogy to the 
selectableItemBackgroundBorderless
 attribute? Thanks.
s
f
+5
  • 7
  • 24
  • 1211
Does anybody here use KotlinxSerialization with Retrofit?
c

Chetan Tuteja

over 4 years ago
Does anybody here use KotlinxSerialization with Retrofit?
c
w
  • 2
  • 9
  • 1210
EDIT: I solved this I’m writing a test for a class handling a 3rd party analytics library. The class...
p

Peter Farlow

over 3 years ago
EDIT: I solved this I’m writing a test for a class handling a 3rd party analytics library. The class under test needs to handler an
Analytics
object, but unfortunately
mockk<Analytics>()
cannot create a mock because of a static android Handler in that class:
public class Analytics { // this is 3rd party code I can't change

  static final Handler HANDLER =
      new Handler(Looper.getMainLooper()) {
        @Override
        public void handleMessage(Message msg) {
          throw new AssertionError("Unknown handler message received: " + msg.what);
        }
      };
// rest of class here
}
I tried using both
mockk<Analytics>()
and adding
mockkConstructor(Handler::class)
but that didn’t work. Any suggestions?
p
m
  • 2
  • 8
  • 1208
Which is the best architecture to work with compose-desktop? maybe MVC or MVP are better than MVVM t...
p

Pablo

almost 3 years ago
Which is the best architecture to work with compose-desktop? maybe MVC or MVP are better than MVVM this time?
p
p
+3
  • 5
  • 53
  • 1207
what's the right way to change the TopAppBar title (or any other prop for that matter) dynamically f...
o

oday

almost 2 years ago
what's the right way to change the TopAppBar title (or any other prop for that matter) dynamically from each screen? So right now I have 1 Scaffold which use and inside is the NavHost, passed to each
composable
inside is
scaffoldState
where I go
scaffoldstate.value.title = { Text("Screen A" }
and the primary Scaffold just populates its own topAppBar with MyAppBar(title = scaffoldState.title) but this causes a lot of jank when switching between bottom bar destinations and sometimes one screen ends up with the title of the other and it's just bad having 2 Scaffolds causes a visual effect where you can see them being swapped out, Now In Android does it really well but the code is so convoluted I couldn't really pin down even where the switch was happening
o
y
f
  • 3
  • 16
  • 1207
How to prevent autoscroll on LazyColumn update if item index 0 is not visible?
k

K Merle

over 3 years ago
How to prevent autoscroll on LazyColumn update if item index 0 is not visible?
k
f
+3
  • 5
  • 13
  • 1202
I wish the trailing-comma rule defaulted to adding a redundant trailing comma. It makes it easier to...
e

Emil Kantis

about 3 years ago
I wish the trailing-comma rule defaulted to adding a redundant trailing comma. It makes it easier to add items later on, and such changes only shows a diff on the actual changed line. Basically just benefits of having the comma there. 🙂
e
s
p
  • 3
  • 9
  • 1199
How do I make my page always in the center with the new `HorizontalPager` (foundation)? it is align...
d

Daniele Segato

almost 2 years ago
How do I make my page always in the center with the new
HorizontalPager
(foundation)? it is aligning the current item always on the left, I want it always in the center see screenshot, code in thread
d
r
  • 2
  • 6
  • 1197
how can I use kotlin-reflect to get all subclasses of an abstract base class? the base class is NOT ...
p

Peter Ertl

almost 5 years ago
how can I use kotlin-reflect to get all subclasses of an abstract base class? the base class is NOT sealed
p
m
t
  • 3
  • 34
  • 1191
What's the best way to generate an .aar file from a multiplatform build.gradle file? My iOS targets ...
s

Sylvain Patenaude

over 5 years ago
What's the best way to generate an .aar file from a multiplatform build.gradle file? My iOS targets generate .framework outputs, but I would now like to wrap my android target jar file in an .aar file. Thanks in advance.
s
k
  • 2
  • 33
  • 1191
Previous282930Next

kotlinlang

A modern programming language that makes developers happier.

Powered by