Best android open-source packages and libraries.

Youtils

"youtils" is a comprehensive Android library that encompasses a wide range of Kotlin utility extension functions, catering to various aspects of Android. Designed to simplify app development, this all-in-one toolkit empowers developers to enhance their productivity and create exceptional Android applications seamlessly.
Updated 8 months ago

YouTils

Simplify Android App Development with Kotlin Utility Extension Functions

Overview

YouTils is a powerful Android library designed to streamline and simplify app development for Kotlin developers. It provides a collection of utility extension functions for various components commonly used in Android apps. With YouTils, you can perform complex operations effortlessly, saving time and effort during the development process.

Features

  • Extension functions for View, ImageView, TextView, EditText, Bundle, Fragment, Context, numbers, date time, and calendar operations.
  • Simplify complex tasks and reduce boilerplate code.
  • Improve code readability and maintainability.
  • Comprehensive documentation for easy integration.

Getting Started

Installation

To use YouTils in your Android project, follow these steps:

  1. Add the following repository to your settings.gradle file:

    settings.gradle

    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            google()
            mavenCentral()
            maven { url 'https://jitpack.io' } // Add this line
        }
    }
  2. Add the dependency to your app-level build.gradle file:

    dependencies {
        implementation 'com.prabhatpandey:youtils:1.1.0'
    }

Usage

YouTils offers an array of utility functions that can be easily accessed via Kotlin extension functions. Here's a quick example:

// Import the YouTils extensions
import dev.prabhatpandey.youtils.views.view.hide
import dev.prabhatpandey.youtils.views.view.showIf

class MyActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        // Use YouTils extension functions
        val textView = findViewById<TextView>(R.id.textView)
        
        // change the visibility of the textview to gone
        textView.hide()

        // change the visibility based on condition
        val isLoading = false
        textView.showIf(isLoading)
    }
}

Documentation

You can find the documentation here

Contributions

Contributions to YouTils are more than welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on GitHub.

License

YouTils is released under the MIT License.


Thank you for using YouTils! We hope this library makes your Android app development journey smoother and more enjoyable. If you encounter any problems or have any questions, please don't hesitate to reach out to us.

Happy coding!

Prabhat Pandey

Tags utils