Înapoi la articole →

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 200
  1. You may have heard that “No try/catch inside Flow” or “Only use catch() operator”.

  2. What is a Coroutine?

    The first question we should ask when learning Kotlin Coroutine is: what is a Coroutine after all?

  3. The title of this episode is called “Side effects”, but in my opinion, it’s all about how to move side-effects out of the function and make the function composable.

  4. When I was very young, like in primary school, I got a cassette of anime songs, I was so shocked and immediately fallen in love with.

  5. I’m starting a new series, mostly just me taking notes while I go through the PointFree videos.

  6. Bites of Compose 16

    In previous post we talked about how to do animation in Compose using animateXXXAsState() function.

  7. Bites of Compose 15

    Let’s take a look at the simplest way to implement animation in Compose, which is using animateXXXAsState() set of functions.

  8. Bites of Compose 14

    In previous post, we discussed the mental model of multiple LayoutModifiers.

  9. Bites of Compose 13

    When we have multiple LayoutModifiers, how do we think about them?

  10. Bites of Compose 12

    LayoutModifier is a very important type of Modifier in Compose.

  11. Bites of Compose 11

    Let’s see an example of how to use LookAheadLayout to implement shared view transition animation.

  12. Bites of Compose 10

    Let’s see an example of how to do custom layout in compose using Layout().

  13. Bites of Compose 9

    Let’s see an example of using the Android’s native Canvas in Compose.

  14. Bites of Compose 8

    Today’s topic is rememberCoroutineScope.

  15. Bites of Compose 7

    Let’s talk about side effects in Compose.

  16. Bites of Compose 6

    In previous post we talked about the companion object Modifier and how it’s implementing the interface Modifier.

  17. Bites of Compose 5

    Let’s talk about Modifier.

  18. Bites of Compose 4

    This time we are focusing on derivedStateOf and how it is different from remember.

  19. Bites of Compose 3

    Let’s do a bit of recap first.

  20. Bites of Compose 2

    Situation 1 Take a look at the Composable below, what will happen if the button is clicked?

  21. Bites of Compose 1

    I’m planning to write a series of short articles about Android’s Jetpack Compose UI framework.

  22. Demystify RxJava (2)

    In this article, we focus on how the dispose system works in RxJava.

  23. Demystify RxJava (1)

    Let’s see what makes RxJava tick.

  24. It all started from a message sent by my cousin in our family group chat one day.

  25. 5.3 Separating program evaluation from description This is the title of Chapter 5.3 from the book Functional Programming in Kotlin.

  26. I’m learning how the nested scrolling machanism works on Android, but couldn’t really find any in-depth material.

  27. How the view system in Android handles touch events?

  28. LiveData is convenient, powerful and super easy to use.

  29. Let’s understand more about Android view’s measure and layout process, and have some fun along the way.

  30. Yes, there is documentation and tons of sample apps out there.

  31. It is quite common in Android that we need some expandable widget to show and hide information.

  32. How by Lazy Works

    by lazy is implemented by using the “property delegation” in Kotlin.

  33. Compile time constant const val NAME = "Guowei" fun main() { tv.text = NAME } After compile it will (almost) look like this: // Imaginary code fun main() { tv.text = "Guowei" } inline function We can do similar things to functions, by adding keyword inlin…

  34. I was bored at night so decided to peek into the guts of how Android’s View Binding works.

  35. Rant alert I’ve been having this idea for a while, and when having dinner with my other programmer friend yesterday, I jokingly said that “Have you noticed there is a very popular programming paradigm that’s been adopted everywhere but no one is aware of…

  36. In this post let’s take a deeper look at some of the more advanced uses of ObjectAnimator.

  37. In this post let’s look at how to do this cool animation using ObjectAnimator.

  38. Let’s look at how to use camera in canvas transformation.

  39. In this post I want to go into details on canvas transformations, especially if we want to combine them.

  40. Let’s use Xfermode to draw a circled avatar.

  41. In this tutorial let’s see how to draw a piechart. class PieChart @JvmOverloads constructor( context: Context, attrs: AttributeSet?

  42. Today let’s draw a dashboard meter.

  43. Do you think Computer Science equals building websites and mobile apps?

  44. We often hear 3 words: app bar, action bar and tool bar.

  45. Here is one clean solution of how to combine Dagger + ViewModel + SavedStateHandle.

  46. Previously, we created a centralized ViewModelFactory which can create all ViewModels in the app: class ViewModelFactory @Inject constructor( private val myViewModelProvider: Provider<MyViewModel>, private val myViewModel2Provider: Provider<MyViewModel2>…

  47. It is a bit cumbersome to create a Factory for each ViewModel we have.

  48. The main advantage of using ViewModel is: it can survive configuration change.

  49. Let’s take a look at the ViewMvcFactory: class ViewMvcFactory @Inject constructor( private val layoutInflaterProvider: LayoutInflater, private val imageLoaderProvider: ImageLoader ) One thing worth paying attention is that this is a factory.

  50. This is a simple one.