GithubHelp home page GithubHelp logo

weiqiangzheng / aboutlibraries Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikepenz/aboutlibraries

0.0 1.0 0.0 6.58 MB

AboutLibraries is a library to offer some information of libraries.

Home Page: http://mikepenz.github.io/AboutLibraries

CSS 6.76% HTML 3.74% JavaScript 7.99% Python 0.92% Ruby 0.02% Java 80.57%

aboutlibraries's Introduction

AboutLibraries Status Maven Central Android Arsenal

Join the chat at https://gitter.im/mikepenz/AboutLibraries

The AboutLibraries library allows you to easily create an used open source libraries fragment/activity within your app. As an extra feature you can also add an about this app section.

Here's a quick overview of functions it include:

  • used open source libraries
    • name, description, creator, license, version, ...
  • about this app section (optional)
  • autodetect libraries
  • many included library details
  • automatic created fragment/activity
  • feature rich builder to simply create and start the fragment / activity
  • much much more... try the sample for a quick overview.

Motivation

Most modern apps feature a "Used Library"-section, which requires information about those respective libs. As it gets annoying to always copy those strings to your app, I've developed this small helper library to provide the required information.

Migration

Get started

More...

Screenshots

Image Image

Wiki

You can find anything you search for in the wiki. (If not open an issue)

Bring me to the wiki

Include in your project

Using Maven

The AboutLibraries Library is pushed to Maven Central, so you just need to add the following dependency to your build.gradle. It seems it is also required to add the support dependencies to the application. If it works without, you should be fine too :).

implementation "com.mikepenz:aboutlibraries:6.0.9"

//required support lib modules
implementation "com.android.support:appcompat-v7:${versions.supportLib}"
implementation "com.android.support:recyclerview-v7:${versions.supportLib}"
implementation "com.android.support:support-annotations:${versions.supportLib}"
implementation "com.android.support:cardview-v7:${versions.supportLib}"

Further information and how to use it if you can't update to the newest support libs can be found in the wiki

Usage

You can use this library in a few different ways. You can create your own activity, including a custom style and just use the information, or you can use the built-in Activity or Fragment and just pass the libs you would love to include.

Upgrade Notes

If you upgrade from < 5.9.5 follow the MIGRATION GUIDE

Activity / Fragment

Fragment

LibsFragment fragment = new LibsBuilder()
        //get the fragment
        .fragment();

Activity

Code:
new LibsBuilder()
        //provide a style (optional) (LIGHT, DARK, LIGHT_DARK_TOOLBAR)
        .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
        //start the activity
        .start(this);

Small extra

For those who read the whole README here's one more thing. You can also use the AboutLibraries activity as an "about this app" screen. You ask how? Yeah pretty simple just add the following .xml file (or just the strings - the key must be the same) to your project.

<resources>
    <string name="aboutLibraries_description_showIcon">true</string>
    <string name="aboutLibraries_description_showVersion">true</string>
    <string name="aboutLibraries_description_text">Place your description here :D</string>
</resources>

or use the builder and add following:

	.withAboutIconShown(true)
	.withAboutVersionShown(true)
	.withAboutDescription("This is a small sample which can be set in the about my app description file.<br /><b>You can style this with html markup :D</b>")

ProGuard

Exclude R from ProGuard to enable the libraries auto detection

-keep class .R
-keep class **.R$* {
    <fields>;
}

In case you want to minimize your resources as much as possible use the following rules (Thanks to @rubengees and @AllanWang as discussed here: mikepenz#331)

-keepclasseswithmembers class **.R$* {
    public static final int define_*;
}

These rules will require you to add the libraries manually. (see more in the above linked issue)

Contribute

You can contribute by creating a information file for a new library, and open a pull-request at the creators Git repository. If he doesn't include the information file in his repo, or if the library isn't maintained anymore you can create a pull-request here. Find more information in the wiki Create a definition file

Already in use in following apps

(feel free to send me new projects)

Developed By

License

Copyright 2018 Mike Penz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

aboutlibraries's People

Contributors

allanwang avatar axelrindle avatar emmanuelmess avatar fabianterhorst avatar fettlaus avatar jaredsburrows avatar johnjohndoe avatar jsierawski avatar kanetik avatar kashban avatar linus-hu avatar marcolussetti avatar maresmar avatar matme avatar mikepenz avatar msf-jarvis avatar mueller-ma avatar namnodorel avatar nanopc avatar nhaarman avatar odin- avatar pddstudio avatar quadtriangle avatar rainer-lang avatar rubengees avatar thiagokimo avatar thunsaker avatar vanniktech avatar wkovacs64 avatar yerenutku avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.