Open in app

Sign in

Write

Sign in

warunee khammak
warunee khammak

2 Followers

Home

About

Nov 10

How to check if the current activity/view has a dialog in front

The primary objective of the blog post is to provide developers with a reliable method for checking whether a dialog is currently in the foreground, covering scenarios where the user interface might be obscured by a pop-up dialog. Solution 1: Using onWindowFocusChanged override fun onWindowFocusChanged(hasWindowFocus: Boolean) {…

2 min read

How to check if the current activity/view has a dialog in front
How to check if the current activity/view has a dialog in front

2 min read


Jun 8, 2022

Add spacing at the start and the end of the list with ItemDecoration

adjust space at the start and/or end of RecyclerView; the space is not the same as inside 16 [first] [item] 12 [item] 12 [item] 12 [item] [end] 16 set layout_marginStart=“12dp” class HorizontalItemDecoration( context: Context, showFirstDivider: Boolean = false, showLastDivider: Boolean = false, spaceDp: Int = 0 ) : RecyclerView.ItemDecoration() create…

Kotlin

2 min read

Kotlin

2 min read


Mar 17, 2022

[Android] Set of Conditions with Koin

create functions that validate animal species create an interface to handle interface AnimalHandler { /*** * @return true end loop * @return false continue loop */ fun validate(legs: Int): Boolean } 2. create a class to handle return boolean after validating (loop of condition) class AnimalSpeciesHandler( val…

Kotlin

2 min read

Kotlin

2 min read


Mar 26, 2021

[Android] Edittext Filters

with InputFilter โจทย์ : สร้างกล่องรับข้อความที่ไม่สามารถกรอก #&-!@ ได้ และมีความยาวตัวอักษรทั้งหมดอยู่ที่ 50 ตัวอักษร <EditText android:id="@+id/myEditText" android:layout_width="match_parent" android:layout_height="wrap_content" ..... android:inputType="textVisiblePassword" android:maxLength="50" /> สร้างกล่องข้อความโดยกำหนด [maxLength] เป็นความยาวที่ต้องการ จากนั้นมากำหนดข้อความที่ไม่สามารถกรอกได้

Android

1 min read

Android

1 min read


Jan 29, 2021

[Offline and Free] Recognize Text with ML Kit

the new standalone ML Kit SDK, which you can use with or without Firebase. text recognize (FirebaseVisionText) Extract text from blocks of recognized text implementation 'com.google.firebase:firebase-ml-vision:24.0.3' AndroidManifest.xml <meta-data android:name="com.google.firebase.ml.vision.DEPENDENCIES" android:value="ocr" /> getImage *read more* Bitmap bitmap = BitmapFactory .decodeResource(getResources(), R.drawable.my_img); …

Android

1 min read

Android

1 min read


Aug 24, 2020

OneTimePasswordAlgorithm-HOTP

HOTP: An HMAC-Based One-Time Password Algorithm *RFC 4226,HOTP Algorithm public class OneTimePasswordAlgorithm { public OneTimePasswordAlgorithm() { } } private static final int[] doubleDigits = { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 }; public static int calcChecksum(long num, int digits) { boolean doubleDigit =…

1 min read

1 min read

warunee khammak

warunee khammak

2 Followers
Following
  • Julián Ezequiel Picó

    Julián Ezequiel Picó

  • Brandon Morelli

    Brandon Morelli

See all (6)

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams