Friday, 29 March 2024

Find Hours Diffrence in Kotlin

 In Kotlin, determining the difference in hours between two timestamps is a common task, especially in scenarios involving time-based calculations. By leveraging Kotlin's interoperability with Java's date and time API, achieving this functionality becomes straightforward.

Below is a concise function to compute the hour difference between two timestamps:

Find Day Diffrence in Kotlin

In Kotlin, calculating the difference between two dates in terms of days can be achieved through various approaches. One common method is utilizing the java.time.LocalDate class is available in Java, which Kotlin can seamlessly integrate with.

Here's a simple function to calculate the day difference between two dates:

Saturday, 16 September 2023

Tuesday, 27 June 2023

How to switch between hide and view password with icon

                                                            

How to show and hide password in login screen or registration screen in android.

So , Here we see  how it works with coding.

Below  is your layout file.

Monday, 26 June 2023

Loading Image and Text with Jetpack Compose

How to display image in circle shape in android with jetpack compose ,

Here is some code for display circle shape image in android using jetpack compose.





Jetpack Compose display Image view and Text view in android

Now we see how to display Image view and Text View in android using Jetpack Compose.

So , Lets start with code.

First you have to add some dependency library in your build.gradle (app module)

Saturday, 24 June 2023

Jetpack Compose Add text in android application.

Adding text in android is we were using TextView in android studio.

But using jetpack compose we don't need TextView as a deign layout.

Yes , using Jetpack Compose we can add text only with coding so lets start how its work ,


First you have to add some dependency library in your build.gradle (app module)


Find Hours Diffrence in Kotlin

  In Kotlin, determining the difference in hours between two timestamps is a common task, especially in scenarios involving time-based calcu...