Skip to main content

Posts

Android ref links

  Library reference resources: MVVM Architecture :  https://developer.android.com/jetpack/guide Hilt:  https://developer.android.com/training/dependency-injection/hilt-android Coroutines:  https://developer.android.com/kotlin/coroutines Retrofit:  https://square.github.io/retrofit/ Moshi:  https://github.com/square/moshi Coil:  https://coil-kt.github.io/coil/ Leak Canary:  https://square.github.io/leakcanary/ Concept reference resources: Repository Codelab:  https://developer.android.com/codelabs/kotlin-android-training-repository Room and Coroutines Codelab:  https://developer.android.com/codelabs/kotlin-android-training-room-database Room and Flow Codelab:  https://developer.android.com/codelabs/basic-android-kotlin-training-intro-room-flow Hilt Codelab:  https://developer.android.com/codelabs/android-hilt Navigation Codelab:  https://developer.android.com/codelabs/jetpack-compose-navigation Theming Codelab:  https://developer.android.com/codelabs/jetpack-compose-theming Basic Layout
Recent posts

Git - quick ref

This blog post from  Daniel Abrahamberg  explains different commands to deal with git commits.    https://www.abrahamberg.com/blog/git-remove-commits-from-branch-after-push-reset-revert-or-rebase/

Android onTouch or onClick

  The decision to use either   onTouch   or   onClick   in an Android application depends on the specific requirements of the application and the behavior that the developer is trying to achieve. onClick  is called when the user taps a view, and is similar to a button press in a traditional desktop interface.  onClick  provides simple click detection, but it doesn't allow for more complex gestures like swipes and pinches. onTouch , on the other hand, provides more detailed information about the touch event and can detect complex gestures like swipes and pinches.  onTouch  gives you a  MotionEvent  which contains information about the touch event, including the position of the touch, the time of the touch, and the action that occurred. If you need to detect simple click events, then  onClick  is sufficient. However, if you need to detect more complex gestures, like swipes and pinches, then  onTouch is a better choice. Also, you can use both  onTouch  and  onClick  together if necess