Speed up your Android development

Related tags

Utility caffeine
Overview

Caffeine

Speed up your Android development!

Android Arsenal Codacy JitPack

A collection of utility classes that help make Android development faster (and safer!)

Examples

No more unsafe type casting scattered throughout your code:

TextView x = ViewUtils.findViewById(this, R.id.my_text)
ImageView y = ViewUtils.findViewById(this, R.id.my_image)
LinearLayout z = ViewUtils.findViewById(this, R.id.my_layout)

Some handy 1-liners:

ActivityUtils.launchActivity(this, SomeNewActivity.class);
DialogUtils.quickDialog(this, "Some awesome message");
ToastUtils.quickToast(this, "Some toast message");

And much more!

Adding to your application

Simply add Caffeine as a gradle dependency. Distribution is done through jitpack.io.

See https://jitpack.io/#percolate/caffeine for instructions

Running Tests

./gradlew clean test:connectedAndroidTest

License

Open source. Distributed under the BSD 3 license. See LICENSE.txt for details.

Comments
  • quickToast issue

    quickToast issue

    Hey Percolate,

    I was wondering when using quickToast, if longLength is true, where does longLength get thrown to? Logically I'm thinking Toast.LENGTH, but please correct me if I'm wrong. I'm just trying to debug this one tiny issue here, but other than this, flawless software. Thanks Percolate.

    -Montana

    opened by Montana 1
  • Check Activity state before displaying Dialogs

    Check Activity state before displaying Dialogs

    This PR adds a Activity#isFinishing()) check before showing Dialogs. This is added to avoid potential "android.os.BinderProxy... is not valid; is your activity running?" errors from occurring.

    opened by brentwatson 0
  • New utils classes

    New utils classes

    Added 2 new Utility classes:

    • IntentUtils: Utility methods for starting various kinds of system Intents.
    • ClipboardUtils: Utility methods for using the device clipboard.
    opened by brentwatson 0
  • Convert caffeine to use jitpack for distribution

    Convert caffeine to use jitpack for distribution

    Change caffeine library from using sonatype for maven distribution to using jitpack.io.

    Tested using commit hash and jitpack build pulls in properly:

    compile 'com.github.percolate:caffeine:7465c6561443b940ef27c2847c347678d0e7999d'

    Also removed all *.iml files from repo.

    opened by brentwatson 0
  • Upgraded gradle plugin, build tools and update to API 23

    Upgraded gradle plugin, build tools and update to API 23

    What changed?

    The Gradle plugin was used to 1.5.0. The build tools were updated 23.0.2. The compile SDK and target SDK versions were updated to 23. Upgrading these things required some modifications to caffeine/build.gradle. The line apply from: 'maven_push.gradle' was removed due to the issue - Error:No such property: GROUP for class: org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer.

    Review

    @brentwatson Please review the PR.

    opened by msya 0
  • Use android resource annotations

    Use android resource annotations

    • @StringRes, @LayoutRes etc should be used throughout.
    • Extend methods to accept res ids where views / strings are currently required:
      • ViewUtils.hideView(view, R.id.my_layout);
      • DialogUtils.quickDialog(context, R.string.my_string);
      • ToastUtils.quickToast(context, R.string.my_string);
      • ...
    opened by brentwatson 4
  • Minor locale-related issues with CountUtil test cases

    Minor locale-related issues with CountUtil test cases

    This is a minor issue, but CountUtil test cases will fail on systems with a locale that uses different punctuation for numbers. For instance, any German locale renders numbers like this: 123.456.789,10. This is different from the English locale (123,456,789.10).

    Thus, testGetFormattedCount* test cases will fail with error messages such as junit.framework.ComparisonFailure: expected:<1[.]2k> but was:<1[,]2k>.

    opened by MrManny 0
Releases(0.4.7)
Owner
Percolate
Percolate
Collection of source codes, utilities, templates and snippets for Android development.

Android Templates and Utilities [DEPRECATED] Android Templates and Utilities are deprecated. I started with this project in 2012. Android ecosystem ha

Petr Nohejl 1.1k Nov 30, 2022
Various useful utilities for Android apps development

Android Commons Various useful utilities for Android apps development. API documentation provided as Javadoc. Usage Add dependency to your build.gradl

Alex Vasilkov 112 Nov 14, 2022
A collection of Android libraries for simplifying development

Andromeda A collection of Android libraries for simplifying development Usage Andromeda uses Jitpack for distribution, the following gradle dependency

Kyle Corry 11 Dec 6, 2022
KDoctor - A command-line tool that helps to set up the environment for Kotlin Multiplatform Mobile app development

KDoctor is a command-line tool that helps to set up the environment for Kotlin Multiplatform Mobile app development.

Kotlin 331 Dec 29, 2022
Android Shared preference wrapper than encrypts the values of Shared Preferences. It's not bullet proof security but rather a quick win for incrementally making your android app more secure.

Secure-preferences - Deprecated Please use EncryptedSharedPreferences from androidx.security in preferenced to secure-preference. (There are no active

Scott Alexander-Bown 1.5k Dec 24, 2022
Android library to easily serialize and cache your objects to disk using key/value pairs.

Deprecated This project is no longer maintained. No new issues or pull requests will be accepted. You can still use the source or fork the project to

Anup Cowkur 667 Dec 22, 2022
[] Define and render UI specs on top of your Android UI

dspec A simple way to define and render UI specs on top of your Android UI. Usage Enclose the target UI with a DesignSpecFrameLayout, usually the root

Lucas Rocha 561 Dec 16, 2022
Small Android library to help you incorporate MVP, Passive View and Presentation Model patterns in your app

DroidMVP About DroidMVP is a small Android library to help you incorporate the MVP pattern along with Passive View and Presentation Model (yes, those

Andrzej Chmielewski 225 Nov 29, 2022
Utility for detecting and notifying when your Android app goes background / becomes foreground

Foredroid Utility for detecting and notifying when your Android app goes background / becomes foreground. API-level 14+. Usage: Initialise Foreground

Steve Liles 151 Nov 29, 2022
Secure Preference Manager for android. It uses various Encryption to protect your application's Shared Preferences.

Secure-Pref-Manager ##Secure Preference Manager is a simple Library to help you protect your Shared Preferences. Secure Preference Manager for android

Prashant Solanki 72 Nov 25, 2022
adds an option to the Android Sharesheet that allows you to save files to your device.

Save On Device adds an option to the Android Sharesheet that allows you to save files to your device. Download Get the app from the Google Play Store

null 24 Nov 29, 2022
A library to quickly and easily enable multiple monitoring & support platforms for your mobile apps

You have a small team. Setting up crash reporting tools, event tracking tools, and log management services is not what you want to spend your hours do

Percolate 65 Aug 8, 2022
SharedPreference Library to save all types including your custom types and observe them if need be.

A SharedPreference Library that can be used to store all types including your custom classes and observe them too if needed.

Ehma Ugbogo 18 Nov 10, 2021
High level parsing to ensure your input is in the right shape and satisfies all constraints that business logic requires.

Parsix High level parsing to ensure your input is in the right shape and satisfies all constraints that business logic requires. It is highly inspired

null 190 Oct 16, 2022
TSBattery a new way to save your battery avoid cancer apps hacker it.

TSBattery TSBattery a new way to save your battery avoid cancer apps hacker it. TSBattery 是一个旨在使 QQ、TIM 变得更省电的开源 Xposed 模块 Get startted 此模块支持原生 Xposed

Fankesyooni 375 Jan 2, 2023
compaKTset is a small library aimed at providing you with the most memory efficient Set implementation for any particular data type of your choosing.

compaKTset is a small library aimed at providing you with the most memory efficient Set implementation for any particular data type of your choosing.

Ignat Beresnev 3 Nov 16, 2021
Tell you how to manage your blackhorse

Tell you how to manage your blackhorse

Andong LIAO 19 Nov 9, 2022
PhotoSync - app to backup photos to your own computer

PeopleInSpace Minimal Kotlin Multiplatform project with SwiftUI, Jetpack Compose

Kyle McBurnett 0 Jan 2, 2022
Simple Mobile Tools 172 Dec 26, 2022