Utilities I wish Android had but doesn't

Related tags

Utility wishlist
Overview

wishlist Build Status

Library of helpers and utilities that I wish were included in the Android SDK but aren't.

If you think something in this library is already handled in a better way by Android please open an issue.

This library is available from Maven Central:

<dependency>
  <groupId>com.github.kevinsawicki</groupId>
  <artifactId>wishlist</artifactId>
  <version>0.9</version>
  <type>apklib</type>
</dependency>

License

Comments
  • Cannot Find Appropriate Platform Level

    Cannot Find Appropriate Platform Level

    Hi Kevin, on the Android Bootstrap project, we have the following issue: https://github.com/donnfelker/android-bootstrap/issues/25

    Unfortunately this seems to still be prevalent in the latest version of IntellIiJ and I'm not sure whats causing it. Do you have any idea why this library might be doing this? In All of the projects I use wishlist I have to perform the same hack that I provided in the comments today.

    Any idea? Are we using Wishlist incorrectly or including it incorrectly?

    opened by donnfelker 4
  • Facilitate subclasses of SingleTypeAdapter that wish to implement android.widget.Filterable

    Facilitate subclasses of SingleTypeAdapter that wish to implement android.widget.Filterable

    This exposes a new method, getItems() as protected. Primarily, this allows subclasses to implement android.widget.Filterable more cleanly. The subclass can cache a list of all items. Please let me know if I'm missing something and there's a better way to do this.

    I didn't apply this change to any other adapters.

    opened by jondwillis 3
  • Adapter updateItem

    Adapter updateItem

    There is now way to update an item after it is added to the adapter. An I cannot update items because it is private. So there should be some method like updateItem( position, item)

    opened by SemihAkar 2
  • Increase Hit Rect & Transform to Density Pixel

    Increase Hit Rect & Transform to Density Pixel

    Just added a couple of helper methods to the ViewUtils class. Apologies for the lack of tests. Just wanted to share what I'm using right now. If time permits I'll come back and add some tests.

    • transformToDensityPixel: Transforms a regular pixel to its density pixel equivalent. Great for when you need to adjust a View visually at runtime.
    • increaseHitRectBy: Increases the hit rect of a given view by the amount provided. The amount is in regular pixels and is transformed into density pixels using transformToDensityPixel. This is very useful for when you have small or tiny icons on the screen that are hard to tap on (or darn near impossible to tap on). Simply increase the hit rect of the view and then your UX gets a ++. :smiley:

    Feel free to accept at your liesure, I just wanted to share something I found useful for my current project.

    Cheers

    opened by donnfelker 2
  • Adding Support to change text on positive and negative buttons in light dialog

    Adding Support to change text on positive and negative buttons in light dialog

    At times my clients need the ability to change the text on the button dynamically (re: AB Testing) and we can't do that as the values are coming from an API endpoint. Therefore I need the ability to set the button text via a simple CharSequence. This pull implements that.

    opened by donnfelker 2
  • Update parent pom and maven-android to include sdk information in the apklib

    Update parent pom and maven-android to include sdk information in the apklib

    Update parent pom and maven-android to include sdk information in the apklib. This will correct some issues with including the apklib in Intellij.

    I've also fixed some tests in there usages of roboelectric.

    opened by peterschwarz 1
  • Bump junit from 4.10 to 4.13.1 in /lib

    Bump junit from 4.10 to 4.13.1 in /lib

    Bumps junit from 4.10 to 4.13.1.

    Release notes

    Sourced from junit's releases.

    JUnit 4.13.1

    Please refer to the release notes for details.

    JUnit 4.13

    Please refer to the release notes for details.

    JUnit 4.13 RC 2

    Please refer to the release notes for details.

    JUnit 4.13 RC 1

    Please refer to the release notes for details.

    JUnit 4.13 Beta 3

    Please refer to the release notes for details.

    JUnit 4.13 Beta 2

    Please refer to the release notes for details.

    JUnit 4.13 Beta 1

    Please refer to the release notes for details.

    JUnit 4.12

    Please refer to the release notes for details.

    JUnit 4.12 Beta 3

    Please refer to the release notes for details.

    JUnit 4.12 Beta 2

    No release notes provided.

    JUnit 4.12 Beta 1

    No release notes provided.

    JUnit 4.11

    No release notes provided.

    Commits
    • 1b683f4 [maven-release-plugin] prepare release r4.13.1
    • ce6ce3a Draft 4.13.1 release notes
    • c29dd82 Change version to 4.13.1-SNAPSHOT
    • 1d17486 Add a link to assertThrows in exception testing
    • 543905d Use separate line for annotation in Javadoc
    • 510e906 Add sub headlines to class Javadoc
    • 610155b Merge pull request from GHSA-269g-pwp5-87pp
    • b6cfd1e Explicitly wrap float parameter for consistency (#1671)
    • a5d205c Fix GitHub link in FAQ (#1672)
    • 3a5c6b4 Deprecated since jdk9 replacing constructor instance of Double and Float (#1660)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Android Bootstrap

    Android Bootstrap

    Hi, 2 days ago this library started to show this issue: on android studio package com.github.kevinsawicki.wishlist does not exist My gradle (compile 'com.github.kevinsawicki:wishlist:0.9') configuration didn't change, so I'm assuming that something has changed on the maven repository, any idea how to solve this problem?

    opened by ikermart 3
  • bug

    bug

    SingleTypeAdapter.java

    @Override public long getItemId(final int position) { return items[position].hashCode(); } items[position].hashCode() may be is a minus,instead it:

    @Override public long getItemId(final int position) { return position; }

    opened by JakeWoki 1
  • I have a compile  error,

    I have a compile error,

    [ERROR] \AndroidWorkSpace\android-master\app\target\unpack\apklibs\com.github.kevinsawicki_wishlist_apklib_0.9\src\com\github\kevinsawicki\wishlist\TypeAdapter.java:[117,23] type parameters of V cannot be determined; no unique maximal instance exists for type variable V with upper bounds V,android.view.View

    [ERROR] \AndroidWorkSpace\android-master\app\target\unpack\apklibs\com.github.kevinsawicki_wishlist_apklib_0.9\src\com\github\kevinsawicki\wishlist\TypeAdapter.java:[129,23] type parameters of V cannot be determined; no unique maximal instance exists for type variable V with upper bounds V,android.view.View

    I think need cast to V before return . protected V view(final int childViewIndex) { return /*add (V) to here */ updater.view(childViewIndex); }

    opened by sam-tsai 0
  • jar

    jar

    Change packaging as jar instead of apklib so it can be easily used in gradle :)

    If you want to add resources later on I could make another PR with aar support

    opened by eveliotc 4
Owner
Kevin Sawicki
Kevin Sawicki
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
General purpose utilities and hash functions for Android and Java (aka java-common)

Essentials Essentials are a collection of general-purpose classes we found useful in many occasions. Beats standard Java API performance, e.g. LongHas

Markus Junginger 1.4k Dec 29, 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
Android library that regroup bunch of dateTime utilities

DateTimeUtils This library is a package of functions that let you manipulate objects and or java date string. it combine the most common functions use

Thunder413 98 Nov 16, 2022
General purpose utilities and hash functions for Android and Java (aka java-common)

Essentials Essentials are a collection of general-purpose classes we found useful in many occasions. Beats standard Java API performance, e.g. LongHas

Markus Junginger 1.4k Dec 29, 2022
A Telegram bot utilities that help to reduce the code amount

Flume Party A Telegram bot utilities that help to reduce code amount. Real project examples Pull Party Bot: 19% of code has been reduced. Resistance B

pool party 1 Jun 8, 2022
FractalUtils - A collection of utility functions and classes, with an emphasis on game related utilities

A collection of utility functions and classes written in Kotlin. There is some emphasis on utilities useful for games (Geometry, Random, Time, Updating, etc).

null 2 Nov 11, 2022
CreditCardHelper 🖊️ A Jetpack-Compose library providing useful credit card utilities such as card type recognition and TextField ViewTransformations

CreditCardHelper ??️ A Jetpack-Compose library providing useful credit card utilities such as card type recognition and TextField ViewTransformations

Stelios Papamichail 18 Dec 19, 2022
Little utilities for more pleasant immutable data in Kotlin

What can KopyKat do? Mutable copy Nested mutation Nested collections Mapping copyMap copy for sealed hierarchies copy from supertypes copy for type al

KopyKat 193 Dec 19, 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
Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. 📝 🎉

README SSCustomEditTextOutlineBorder Getting Started SSCustomEditTextOutLineBorder is a small kotlin library for android to support outlined (stroked)

Simform Solutions 194 Dec 30, 2022
Android library which makes it easy to handle the different obstacles while calling an API (Web Service) in Android App.

API Calling Flow API Calling Flow is a Android library which can help you to simplify handling different conditions while calling an API (Web Service)

Rohit Surwase 19 Nov 9, 2021
Gesture detector framework for multitouch handling on Android, based on Android's ScaleGestureDetector

Android Gesture Detectors Framework Introduction Since I was amazed Android has a ScaleGestureDetector since API level 8 but (still) no such thing as

null 1.1k Nov 30, 2022
Use Android as Rubber Ducky against another Android device

Use Android as Rubber Ducky against another Android device

null 1.4k Jan 9, 2023
A util for setting status bar style on Android App.

StatusBarUtil A util for setting status bar style on Android App. It can work above API 19(KitKat 4.4). 中文版点我 Sample Download StatusBarUtil-Demo Chang

Jaeger 8.8k Jan 6, 2023
A logger with a small, extensible API which provides utility on top of Android's normal Log class.

This is a logger with a small, extensible API which provides utility on top of Android's normal Log class. I copy this class into all the little apps

Jake Wharton 9.8k Dec 30, 2022
Java implementation of a Disk-based LRU cache which specifically targets Android compatibility.

Disk LRU Cache A cache that uses a bounded amount of space on a filesystem. Each cache entry has a string key and a fixed number of values. Each key m

Jake Wharton 5.7k Dec 31, 2022
a simple cache for android and java

ASimpleCache ASimpleCache 是一个为android制定的 轻量级的 开源缓存框架。轻量到只有一个java文件(由十几个类精简而来)。 1、它可以缓存什么东西? 普通的字符串、JsonObject、JsonArray、Bitmap、Drawable、序列化的java对象,和 b

Michael Yang 3.7k Dec 14, 2022