Skip to content

Instantly share code, notes, and snippets.

@Kdsaid
Kdsaid / AndroidNavigationComponentDialogFragment
Created November 11, 2023 13:51 — forked from utkukutlu/AndroidNavigationComponentDialogFragment
android navigation component add fragment instead of replace
Android Navigation Component Dialog Fragment
<style name="TopSheet_DialogAnimation">
  <item name="android:windowEnterAnimation">@anim/slide_out_from_top</item>
  <item name="android:windowExitAnimation">@anim/slide_back_to_top</item>
</style>

slide_out_from_top

/**
* Default implementation of [LocaleHelperKt].
*/
class DefaultLocaleHelper private constructor(context: Context) : BaseLocaleHelper(context) {
companion object {
/* Mark the instance as Volatile*/
@Volatile
private var instance: LocaleHelperKt? = null
private var LOCK: Any = Any()
@Kdsaid
Kdsaid / CompoundDrawableClickListener.java
Created July 25, 2022 22:01 — forked from amaksoft/CompoundDrawableClickListener.java
Handling TextView compound drawables touch and click events
/*
* Copyright 2017, Andrey Makeev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Kdsaid
Kdsaid / MainActivity.kt
Created April 9, 2021 23:33 — forked from mohamedmzd0/MainActivity.kt
WebView , camera and mic permssion
import android.Manifest
import android.annotation.TargetApi
import android.app.Activity
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.content.pm.PackageManager
@Kdsaid
Kdsaid / AndroidManifest.xml
Created December 6, 2020 12:06 — forked from hugocore/AndroidManifest.xml
Android Deep Linking Activity
<activity
android:name="com.your.app.activity.ParseDeepLinkActivity"
android:alwaysRetainTaskState="true"
android:launchMode="singleTask"
android:noHistory="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter android:autoVerify="true">
<data android:scheme="http" android:host="yourdomain.com" />
<data android:scheme="https" android:host="yourdomain.com" />
@Kdsaid
Kdsaid / CountDownTime.java
Created April 29, 2020 16:45 — forked from chemickypes/CountDownTime.java
CountDownTimer suing RXJava 2
import java.util.concurrent.TimeUnit;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* Created by Angelo Moroni on 27/04/17.
*/