All Projects → franmontiel → AttributionPresenter

franmontiel / AttributionPresenter

Licence: Apache-2.0 license
An Android library to easily display attribution information of open source libraries.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to AttributionPresenter

Base
🍁 Base是针对于Android开发封装好一些常用的基类,主要包括通用的Adapter、Activity、Fragment、Dialog等、和一些常用的Util类,只为更简单。
Stars: ✭ 249 (+429.79%)
Mutual labels:  adapter, dialog
Licenser
An android library to display the licenses of your application libraries in a easy way.
Stars: ✭ 75 (+59.57%)
Mutual labels:  dialog, licenses
alert
Cross-platform, isomorphic alert, for Node and browser (previously alert-node)
Stars: ✭ 27 (-42.55%)
Mutual labels:  dialog
few shot dialogue generation
Dialogue Knowledge Transfer Networks (DiKTNet)
Stars: ✭ 24 (-48.94%)
Mutual labels:  dialog
ioBroker.zwave2
Z-Wave for ioBroker. Better. Faster. Stronger.
Stars: ✭ 22 (-53.19%)
Mutual labels:  adapter
vue-modal
Reusable Modal component, supports own custom HTML, text and classes.
Stars: ✭ 29 (-38.3%)
Mutual labels:  dialog
yii2-inertia
The Yii 2 server-side adapter for Inertia.js.
Stars: ✭ 52 (+10.64%)
Mutual labels:  adapter
MultiTypeAdapter
RecyclerView通用多类型适配器MultiTypeAdapter,以布局文件为单位更细粒度的条目复用。
Stars: ✭ 18 (-61.7%)
Mutual labels:  adapter
flutter page tracker
flutter埋点、弹窗埋点、页面埋点事件捕获框架,支持普通页面的页面曝光事件(PageView),页面离开事件(PageExit)。支持在TabView和PageView组件中发送页面曝光和页面离开
Stars: ✭ 103 (+119.15%)
Mutual labels:  dialog
fusion
An Easy-to-use Kotlin based Customizable Modules Collection with Material Layouts by BlackBeared.
Stars: ✭ 39 (-17.02%)
Mutual labels:  dialog
react-redux-modals
This repo created for Medium.com: React/Redux: Modals and Dialogs
Stars: ✭ 30 (-36.17%)
Mutual labels:  dialog
Variational-Transformer
Variational Transformers for Diverse Response Generation
Stars: ✭ 79 (+68.09%)
Mutual labels:  dialog
poreplex
A versatile sequenced read processor for nanopore direct RNA sequencing
Stars: ✭ 74 (+57.45%)
Mutual labels:  adapter
DEMOS TO MySelf Android
自己平时的一些积累,相当于自己的一个demo库,比较杂,后续会一个一个整理出来
Stars: ✭ 36 (-23.4%)
Mutual labels:  dialog
LSDialogViewController
Custom Dialog for iOS written in Swift
Stars: ✭ 74 (+57.45%)
Mutual labels:  dialog
FabDialog
🎈 Fab into Dialog Animation on Android
Stars: ✭ 36 (-23.4%)
Mutual labels:  dialog
eslint-plugin-license-header
Rules to validate the presence of license headers in source files.
Stars: ✭ 21 (-55.32%)
Mutual labels:  licenses
Modular2Recycler
Modular²Recycler is a RecyclerView.Adapter that is modular squared.
Stars: ✭ 72 (+53.19%)
Mutual labels:  adapter
sweet-modal-vue
The sweetest library to happen to modals.
Stars: ✭ 762 (+1521.28%)
Mutual labels:  dialog
vue-modal
A customizable, stackable, and lightweight modal component for Vue.
Stars: ✭ 96 (+104.26%)
Mutual labels:  dialog

AttributionPresenter

An Android library to easily display attribution information of open source libraries.

AttributionPresenter Dialog AttributionPresenter Dark Themed List

Download

Step 1. Add the JitPack repository in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
        compile 'com.github.franmontiel:AttributionPresenter:1.0.1'
}   

Usage

Create an instance of AttributionPresenter using the Builder:

AttributionPresenter attributionPresenter = new AttributionPresenter.Builder(context)
                .addAttributions(
                        new Attribution.Builder("AttributionPresenter")
                                .addCopyrightNotice("Copyright 2017 Francisco José Montiel Navarro")
                                .addLicense(License.APACHE)
                                .setWebsite("https://github.com/franmontiel/AttributionPresenter")
                                .build()
                )
                .addAttributions(
                        Library.BUTTER_KNIFE,
                        Library.GLIDE,
                        Library.DAGGER_2,
                        Library.GSON,
                        Library.REALM)
                .build();

Then you can directly show a dialog with the attributions:

attributionPresenter.showDialog("Open Source Libraries");

Or get an adapter to use the list of attributions in a ListView:

attributionPresenter.getAdapter();

The default behavior when the user clicks on an attribution item or on a license name is to open the browser with the website or license text. This behavior can be changed by setting the appropriate listeners in the Builder.

Styling

The default style will adapt to Light and Dark themes automatically but you can always change the style of the attribution items:

  • Overriding the default styles in your styles.xml.
   <style name="AttributionName" parent="TextAppearance.AppCompat">
       <item name="android:textColor">?attr/colorAccent</item>
       <item name="android:textSize">16sp</item>
   </style>

   <style name="AttributionCopyright" parent="TextAppearance.AppCompat">
       <item name="android:textColor">?android:attr/textColorPrimary</item>
   </style>

   <style name="AttributionLicense" parent="TextAppearance.AppCompat">
       <item name="android:textColor">?android:attr/textColorSecondary</item>
   </style>
  • Or providing your own layouts for the item and/or license views using the Builder.

License

Copyright 2017 Francisco José Montiel Navarro

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].