Home

Awesome

🛑 THIS REPOSITORY IS OFFICIALLY NO LONGER UNDER MAINTENANCE since 10/02/2022 🛑

notils CI status Download from Bintray Apache 2.0 Licence

Never again need a .utils. package yur scurvy sea dogs!

Notils comes in two modules - notils-java contains classes that don't depend on anything from the Android SDK, while notils-android contains classes that do.

Description

notils contains a set of common classes that we use in our projects:

Adding to your project

To start using this library, add these lines to the build.gradle of your project:

repositories {
    jcenter()
}

dependencies {
    compile 'com.novoda:notils-java:3.1.5'
    compile 'com.novoda:notils-android:3.1.5'
}

Simple usage

Here are a few examples.

UserFragment userFragment = Fragments.findFragmentById(fragmentmanager, R.id.userFragment);
switch (menuOptionId) {
    case R.id.menu_take_picture:
        // Start the camera...
    break;
    case R.id.menu_from_gallery:
        // Open the gallery...
    break;
    default:
        throw new DeveloperError("Unhandled case in switch statement!");
}
Toaster toaster = new Toaster(context);
toaster.popToast("Good morning!"); // Short toast
toaster.popBurntToast("Good night!"); // Long toast
toaster.dropInBath(); // Cancells all active toasts this toaster created

Links

Here are a list of useful links: