• Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lightweight "about screen" library to allow quick but customizable attribution in Android apps.

Attribouter

Attribouter

Attribouter is a lightweight "about screen" for Android apps, built for developers to easily credit a project's contributors & dependencies while matching the style of their app. It ships with the ability to fetch metadata directly from GitHub, GitLab, or Gitea (see: git-rest-wrapper), allowing contributors and licenses to be updated or modified without explicit configuration.

JitPack Build Status Discord Liberapay Documentation

Screenshots

Contributors Contributor Licenses License Night Theme
img img img img img

APK

A demo apk of the sample project can be downloaded here.

Usage

This library is published on JitPack, which you can add to your project by copying the following to your root build.gradle at the end of "repositories".

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

To add the dependency, copy this line into your app module's build.gradle file.

implementation 'me.jfenn:Attribouter:0.1.8'

Starting an Activity

This is pretty simple.

attribouterActivity {
    withFile(R.xml.attribouter)
    withTheme(R.style.AttribouterTheme_DayNight)
    withGitHubToken("abc123")
}
Java

Attribouter.from(context)
    .withFile(R.xml.attribouter)
    .withTheme(R.style.AttribouterTheme_DayNight)
    .withGitHubToken("abc123")
    .show();

Creating a Fragment

This is also pretty simple.

val fragment = attribouterFragment {
    withFile(R.xml.attribouter)
    withTheme(R.style.AttribouterTheme_DayNight)
    withGitHubToken("abc123")
}
Java

Attribouter.from(context)
    .withFile(R.xml.attribouter)
    .withTheme(R.style.AttribouterTheme_DayNight)
    .withGitHubToken("abc123")
    .show();

When using the fragment with R.style.AttribouterTheme_DayNight (the default theme value), be sure that your activity also uses a dark theme in the -night configuration, or you will have problems with text contrast (the fragment does not have a background, so the parent activity's window background will be drawn behind it). You can also call withTheme(R.style.AttribouterTheme) (light) or withTheme(R.style.AttribouterTheme_Dark) to change this behavior.

Things to Note

Request Limits

This library does not use an auth key for any REST APIs by default. It does cache data to avoid crossing GitHub's rate limits, but if your project has more than a few contributors and libraries or you want it to have access to a private repository, you will need to provide an auth token by calling withGitHubToken(token) on your instance of Attribouter. For GitLab/Gitea instances, tokens can be provided per-hostname - for example, withToken("code.horrific.dev", token).

Be careful not to include these token with your source code. There are other methods of providing your token at build-time, such as using a BuildConfig field with an environment variable, that can prevent this from being an issue. These tokens aren't especially dangerous without any scopes/permissions, but GitHub will automatically deactivate them if they show up in any commits/files on their services, which could cause problems for Attribouter.

Configuration

By default, Attribouter will use the configuration file at res/xml/attribouter.xml. You can either name your configuration file "attribouter.xml" to override the resource, or name it differently and call withFile(R.xml.[name]) on your instance of Attribouter instead.

The configuration file consists of a single root element, <about>, with many child elements that can be placed any amount of times in any order, the same as views in a layout file. These elements, called "wedges" in this library for no apparent reason, are created by Attribouter and added to the page in the order and hierarchy that they are defined in. To create your configuration file, you can either use the file from the sample project as a template or use the documentation to write your own.

Proguard / Minification

For those using the R8 compiler, Attribouter's proguard rules should be conveniently bundled with the library already - otherwise, you will need to add them to your app's proguard-rules.pro file yourself to prevent running into any issues with minifyEnabled and the like.

Unfortunately, Attribouter still doesn't behave well with shrinkResources, as the compiler cannot detect references from Attribouter's config file and will exclude them from compilation. There is a workaround to this, however - create a <resources> tag somewhere in your project, and specify tools:keep="@{resource}" for all of the strings and drawables referenced by your config file. For all of Attribouter's own resources, this has already been done - and if you are not referencing any other resources in your configuration, then there shouldn't be an issue.

Used in

If you're using Attribouter in your project, feel free to reach out / make a PR to add it to this list!

How to Contribute

I try to maintain my libraries to meet the needs of all their users - so, to that extent, most contributions will be accepted so long as they represent some kind of functional improvement. I'd much prefer to work together and resolve an issue than turn any genuine effort away. To that end, if you need help with this process, have any questions or confusion, or want to get feedback before a contribution, please don't hesitate to get in touch. (either discord or email work fine)

This repository has two persistent branches: main and develop - of the two, most pull requests should be made to the latter. main will always contain the source code of the current stable release, so any new changes should be merged into develop first. The exception to this is any changes to metadata: the README, documentation, code of conduct, etc. - since these don't affect the compiled program, it makes sense to merge these into main immediately, unless they are tied to a change in functionality (changes in a new version of the library, for example).

Example contributions

  • Development: Developers can help Alarmio by fixing bugs, implementing features, or helping to debug & research new issues. I'm hoping to write a complete guide to this process in the future - for now, please refer to CONTRIBUTING.md.
  • Design: Attribouter should be intuitive and accessible to a wide variety of users - suggestions to improve certain interfaces are always welcome. This includes compatibility with screen readers, problems with contrast / color blindness, and the sizing/positioning of touch targets in the UI - many of which are shamefully untested in its present state.
  • Localization: If Attribouter doesn't have support for your fluent language(s), please consider translating it! Most in-app text is stored in strings.xml - this file should be copied to ../values-{lang}/strings.xml when translated. (this is an absurdly concise explanation - if this isn't clear, simply sending us translations in a new issue or email is perfectly fine!)
  • Documentation: Writing guides and explanations of how Attribouter works, how to use it, and how to contribute to it can go a long way to ensuring its usefulness and stability in the future. Whether this involves an update to the README, a tutorial for users and contributors, or adding Javadocs & comments to undocumented parts of the codebase - anything is valid!

Acknowledgements

Huge thanks to everyone that's helped with this library, directly or otherwise!

Also, mega props to Kevin Aguilar and 221 Pixels for helping improve the library's design & interface.

Development

Design

More Repositories

1

Alarmio

A simple alarm clock focused on design, readability, and internet radio.
Java
338
star
2

ColorPickerDialog

A simple dialog making it quick and easy to add color picking functionality to any app.
Java
137
star
3

ScreenshotMaker

A small java applet to generate uniform Play Store screenshots with titles and descriptions.
Java
130
star
4

Status

A no-root status bar replacement for Android.
Java
127
star
5

Metronome-Android

A lightweight, well designed metronome app for Android.
Java
111
star
6

Pasta-for-Spotify

A material design Spotify client for Android
Java
110
star
7

Pasta-Music

(unmaintained) A material design music player for Android, based off Pasta for Spotify
Java
106
star
8

SlideActionView

An Android view which provides a nice slide-to-left/right interaction.
Java
70
star
9

SignalStrengths

A library and sample application with the purpose of getting an accurate signal strength on different Android phones.
Java
53
star
10

MediaNotification

Slightly unstable attempt to replace all media notifications with Android O styled copies.
Java
45
star
11

Asteroid

A simple Android game based on avoiding incoming asteroids
Java
41
star
12

AdaptiveIconView

A library to allow easy implementation of pre-Oreo adaptive icon support in Android launchers.
Java
29
star
13

Crasher

An easy to use crash reporting library for Android.
Java
29
star
14

Cleaner

The only storage saving app that actually works! :D
Java
28
star
15

Calculator

(unmaintained) An attempt to make a decent calculator capable of complex functions without sacrificing design.
Java
27
star
16

Feedage

A basic "news reader" that sorts posts from various RSS feeds into categories.
Java
23
star
17

WearColorPicker

A lightweight color picker library for Android Wear.
Java
23
star
18

PaletteGetter

A library that can get the color scheme of any app.
Java
21
star
19

declarativ

A declarative HTML rendering library that is definitely not JSX.
TypeScript
20
star
20

RadialLayout

A scrollable-ish view that arranges images in circles extending from the center of the screen.
Java
19
star
21

mdjavadoc

A script that generates markdown javadocs for use in Jekyll and GitHub Pages.
JavaScript
18
star
22

fennifith.github.io

My personal website.
SCSS
16
star
23

Tooltips

(unmaintained) A small tooltips library for Android based on Material Design.
Java
15
star
24

TimeDatePicker

A simple Android library containing several time/date pickers and dialogs.
Java
15
star
25

Scrurl

Scrolling urls, a.k.a. the second worst website I've ever made.
HTML
15
star
26

Asciimg

A command line tool to display images in ASCII.
JavaScript
14
star
27

Cronhub-Monitor

A native CronHub notification client for Android.
Java
14
star
28

Bagels

A live wallpaper that blurs the screen after a period of time without any actions.
Java
14
star
29

Rocket

(unmaintained) A basic tap-to-fly game experimenting with view animation.
Java
13
star
30

APReader

A small app that displays Android Police articles without waiting for the website to load.
Java
10
star
31

WearLocker

A basic lock screen that prevents accidental touches on Android Wear 2.0.
Java
10
star
32

SunriseSunsetView

A lightweight Android view used for displaying and/or editing sunrise and sunset times.
Java
9
star
33

Wallpapers

(unmaintained) A material design wallpaper dashboard template
Java
9
star
34

AndroidUtils

A bunch of util classes that I use in almost every project I write.
Kotlin
9
star
35

MonkeyTester

Determines whether a user is a monkey, a goat, or both, based on values obtained from android's ActivityManager and UserManager.
Java
9
star
36

ExceptionalTraveler

An implementation of the Traveling Salesperson Problem using the fundamentals of Exceptional Programming.
Java
8
star
37

PortAuthorityFeedbackReporter

A small application to make it easier for riders to report issues to the Pittsburgh Port Authority bus system.
Java
8
star
38

Monochrome

A monochromatic pixelated adventure game.
Java
7
star
39

FelixLauncher

(unmaintained) Dark-themed launcher that supposedly saves a lot of battery.
Java
6
star
40

AAH

A basic cmdline program for Linux to help me do basic things I should already know. Ex: "AAH drive mount"
Go
6
star
41

Paper-Tales

A modified version of Fornax that gets its content from Wordpress articles.
Java
5
star
42

ChargeScreen

(Unmaintained) An annoying screen that pops up when you plug your phone in.
Java
5
star
43

dotfiles

My "generic Linux distro" dotfiles. Used to sync stuff between laptops and not much else.
Shell
4
star
44

bugiver

A small website that gives you an issue to fix when there is nothing to do.
HTML
4
star
45

Blackboard

(unstable) An HTML scraping, JavaScript injecting, spaghettificating, massive heap of Blackboard parsing mobile client.
Java
3
star
46

Robotics

Documentation of stuff done in my robotics class.
C
2
star
47

photos

A collection of my photography, published under the Creative Commons License.
HTML
2
star
48

styles

A collection of all my CSS styles, organized and documented.
HTML
2
star
49

HackNA-Notes

A small sample project created for a workshop at HackNA.
Java
2
star
50

discord-github-thing-doer

A Discord bot that automates github-related tasks for my server.
JavaScript
1
star
51

Music

A collection of my piano compositions and other music-related projects.
HTML
1
star
52

music-automata-api

An Rx-based interface for programming musical automata in JavaScript. (WIP)
JavaScript
1
star
53

pixularautomaton

A basic cellular automaton that makes pretty animations from images.
HTML
1
star
54

MarkdownToJupyter

NodeJS script to execute & convert code blocks in markdown files to a JupyterLab Notebook.
JavaScript
1
star