Skip to content

Instantly share code, notes, and snippets.

View Adapter.kt
import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
class MyAdapter(
) : ListAdapter<Any, MyAdapter.MyViewHolder>(
DiffCallBack()
View paths.xml
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path
name="external"
path="." />
<external-files-path
name="external_files"
path="." />
<cache-path
name="cache"
View RoomDatabaseUtill.kt
import androidx.room.TypeConverter
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.wondersoftware.mastapp.business.datasource.cache.theme.ThemeEntity
import java.lang.reflect.Type
import java.util.*
class DataTypeConverter {
private val gson = Gson()
View DispatcherModule.kt
import android.app.Application
import android.content.Context
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainCoroutineDispatcher
@ravisorathiya
ravisorathiya / FFMpegConfig.kt
Created Nov 25, 2021
FFmpeg Congiration checking compatabilty of device
View FFMpegConfig.kt
package com.example.fastsaveapp.ffmpeg
import android.content.Context
import com.example.fastsaveapp.logger
import com.github.hiteshsondhi88.libffmpeg.FFmpeg
import com.github.hiteshsondhi88.libffmpeg.LoadBinaryResponseHandler
import com.github.hiteshsondhi88.libffmpeg.exceptions.FFmpegNotSupportedException
object FFMpegConfig {