Skip to content

A repository for all extensions which I use on a daily basis

License

Notifications You must be signed in to change notification settings

trinadhthatakula/Extensions-kt

Repository files navigation

Extensions-kt

A repository for all extensions which I use on a daily basis, this repo is to help developers in building apps much faster by providing frequently used code snippets in one place Feel Free to contribute

kotlin version => 2.0.0

What's inside:

Bitmap Extensions: BitmapX.kt

  1. Save a Bitmap to File
  2. Save a Bitmap to File Path
  3. Get Bitmap of a View
  4. Get ScreenShot of a view with callback
  5. Save a View to a file as an Image
  6. Get Bitmap from URI
  7. Get dominating color in a Bitmap
  8. Rotate a Bitmap by it's orientation based on Exif Data
  9. Scale a Bitmap while preserving it's aspect ratio
  10. Copy a file using it's URI
  11. Copy a File to another location by using File object from Java IO
  12. Convert a vector xml file to bitmap

CameraX Extensions: CameraX.kt

  1. Initialize CameraController using given PreviewView to show Camera Feed
  2. Initialize CameraController and PreviewView and return them as callback for compose
  3. Initalize CameraController using provided PreviewView to Show Camera Feed for Compose
  4. Get Camera Provider from context
  5. Create ImageCapture UseCase
  6. Create VideoCapture UseCase

Context Extensions: ContextX.kt

  1. Hide soft keyboard
  2. Get Theme Color Using attr name
  3. Get Resource URI of any res id
  4. Get Res ID from it's name - not recommended to use
  5. Get Drawable ID from it's name - not recommended to use
  6. Get App Icon of any other installed app - requires little setUp
  7. Get LayoutInflator form Context
  8. Get InputMethodManager form context
  9. Get Drawable from ID
  10. Get Color Compat from ID

Other Extensions: Extensions.kt

  1. Format an Int vale to USD like 1000000 to 1,000,000
  2. Format an Int value to INR like 1000000 to 10,00,000
  3. Check if a PDF is Password Protected
  4. Convert Int to DP or PX
  5. Convert Dp to Px
  6. Get ScreenHeight or ScreenWidth of the Device
  7. Copy a String to Clipboard
  8. Perform basic touch at a point with x,y as coordinates
  9. Share a String

Composables:

  1. Lottie Raw Animator
  2. Custom Pill Shape Tab Indicator 💊
  3. Horizontal Calendar view
  4. Compose Image Picker in BottomSheet

About

A repository for all extensions which I use on a daily basis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published