当前位置: 首页 > 软件库 > 手机/移动开发 > >

android-about-page

授权协议 Readme
开发语言 Java
所属分类 手机/移动开发
软件类型 开源软件
地区 不详
投 递 者 孟茂学
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Android About Page

Create an awesome About Page for your Android App in 2 minutes

This library allows to generate beautiful About Pages with less effort, it's fully customizable and supports opening specific intent

View aboutPage = new AboutPage(this)
  .isRTL(false)
  .setCustomFont(String) // or Typeface
  .setImage(R.drawable.dummy_image)
  .addItem(versionElement)
  .addItem(adsElement)
  .addGroup("Connect with us")
  .addEmail("elmehdi.sakout@gmail.com")
  .addWebsite("https://mehdisakout.com/")
  .addFacebook("the.medy")
  .addTwitter("medyo80")
  .addYoutube("UCdPQtdWIsg7_pi4mrRu46vA")
  .addPlayStore("com.ideashower.readitlater.pro")
  .addGitHub("medyo")
  .addInstagram("medyo80")
  .create();

Setup

Available on Jcenter, Maven and JitPack

implementation 'io.github.medyo:android-about-page:2.0.0'

Usage

1. Add Description

setDescription(String)

2. Add Image

setImage(Int)

3. Add predefined Social network

The library has already some predefined social networks like :

  • Facebook
  • Twitter
  • Instagram
  • Youtube
  • PlayStore
addFacebook(String PageID)
addTwitter(String AccountID)
addYoutube(String AccountID)
addPlayStore(String PackageName)
addInstagram(String AccountID)
addGitHub(String AccountID)

4. Add Custom Element

For example app version :

Element versionElement = new Element();
versionElement.setTitle("Version 6.2");
addItem(versionElement)

5. Available attributes for Element Class

Function Description
setTitle(String) Set title of the element
setIconTint(Int) Set color of the element
setSkipTint(Boolean) Skip tinting the icon (useful when using non vector drawables)
setIconDrawable(Int) Set icon of the element
setValue(String) Set Element value like Facebook ID
setIntent(Intent) Set an intent to be called on onClickListener
setGravity(Gravity) Set a Gravity for the element
setOnClickListener(View.OnClickListener) If intent isn't suitable for you need, implement your custom behaviour by overriding the click listener

6. How to use the library in a fragment

@Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return new AboutPage(getContext())
                .isRTL(false)
                .setDescription(getString(R.string.app_description))
                .addGroup(getString(R.string.contact_group))
                .addEmail("us@example.com", "Email")
                .addGroup(getString(R.string.application_information_group))
                .addItem(new VersionElement())
                .create();
    }

snippet by nrhoffmann

7. Styling

The library supports day-night modes. The dependents may use the followingstyling attributes to create a dedicated style for AboutPage. If thedependents choose not to specify an explicit style, the library falls back tosensible defaults.

First, declare an AboutPage style in your styles.xml.

<!-- Define a global style for AboutPage in your 'styles.xml' -->
<style name="Widget.App.AboutPage" parent="about_About">
  <item name="aboutBackground">#ffffff</item>
  <item name="aboutElementIconTint">#333333</item>
  <item name="aboutSeparatorColor">#999999</item>
  <item name="aboutDescriptionTextAppearance">@style/TextAppearance.App.AboutPage.Description</item>

  <!-- similarly, you can also apply the following text appearances -->
  <item name="aboutElementTextAppearance">@style/about_elementTextAppearance.Dark</item>
  <item name="aboutGroupTextAppearance">@style/about_groupTextAppearance</item>
</style>

<style name="TextAppearance.App.AboutPage.Description" parent="about_descriptionTextAppearance.Dark">
  <item name="android:textStyle">bold|italic</item>
</style>

To apply this style globally, assign its reference to aboutStyle attribute inyour app theme.

<style name="Theme.App" parent="Theme.AppCompat">
  <item name="aboutStyle">@style/Widget.AboutPage</item>
</style>

Or explicitly pass the style resource to the AboutPage constructor to apply iton selective AboutPage instances.

AboutPage aboutPage = new AboutPage(context, R.style.Widget_AboutPage);

8. Force Night/Day mode

We recommend that the dependents useAppCompatDelegate.setDefaultNightMode()to force enable/disable the night mode across their apps. If the dependents areunable to use the recommended approach, they can use the AboutPage(Context, boolean) constructor to specify the desired mode. The dependents must note thatby using this constructor, the AboutPage will use its default styles, ignoringany explicitly specified style.

AboutPage aboutPage = AboutPage(context, true); // force enable dark mode.
AboutPage aboutPage = AboutPage(context, false); // force enable bright mode.

Sample Project

medyo/android-about-page/app/

Translations

The library does supports the following languages :

Please make a Pull request to add a new language.

ProGuard

Nothing to include

License

The MIT License (MIT)
Copyright (c) 2016 Mehdi Sakout

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • 使用pdfview第三方控件 学习网址: 1.依赖库原址------------GitHub - barteksc/AndroidPdfViewer: Android view for displaying PDFs rendered with PdfiumAndroid https://github.com/barteksc/AndroidPdfViewer 2.基础的使用方法---------

  • http://www.android-x86.org/getsourcecode Introduction This page has (hopefully) the latest information about how to build Android for x86 platforms like Eee PC. The built images runs well on a real ha

  • 1.Version 类 <span style="font-family:Comic Sans MS;font-size:18px;">/** * Information about the current build, extracted from system properties. */ public class Build { private static final Stri

  • 1.小米手机显示安卓失败之类 开发者选项允许usb安卓 2.java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex 转https://bbs.csdn.net/topics/392342785?p

  • http://www.android-x86.org/getsourcecode Introduction This page has (hopefully) the latest information about how to build Android for x86 platforms like Eee PC. The built images runs well on a real ha

  • This is quite a common question, but none of the solutions appear to work for me. First time asker, so apologies if I get the conventions wrong. I am trying to connect my Galaxy S5 to my computer runn

  • http://www.android-x86.org/releases/releasenote-cm-x86-13-0-r1 The Android-x86 project is glad to announce cm-x86-13.0-r1, the first stable release of CyanogenMod 13.0 porting for Android-x86. The pre

  • android 在linux 4.12 内核对ion驱动的api 进行了修改,原来的一部分ioctl命令已经不存在了。 谷歌的ion 我个人觉的还是挺大的,system heap 内存分配的方式,其他的还有使用cma 分配等,不同的分配方式会调用linux不同的接口。这篇文章值只写下自己对system heap 的个人理解。ion相关代码在内核kernel\msm-4.14\drivers\sta

  • http://www.fx114.net/qa-59-85000.aspx root@Ubuntu32:/home/zhangbin/android/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin# ls arm-linux-androideabi-addr2line   arm-linux-an

  • root@Ubuntu32:/home/zhangbin/android/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin# ls arm-linux-androideabi-addr2line   arm-linux-androideabi-gprof arm-linux-androideabi-

  • Key layout files (.kl files) are responsible for mapping Linux key codes and axis codes to Android key codes and axis codes and specifying associated policy flags. Device-specific key layout files are

 相关资料
  • Cloudadc is an open community that focuses on the exploration and best implementation of distributed architecture, cloud-native applications, and cloud-native application delivery control. How to Cont

  • Flarum is a delightfully simple discussion platform for your website. It's fast, free, and easy to use, with all the features you need to run a successful community. It's also extremely extensible, al

  • Python Tutorial This document was generated using the LaTeX2HTML translator. LaTeX2HTML is Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds, an

  • JSON API 来自 JSON 的数据传输,它被隐式地定义在 Ember 的 REST 风格数据适配器。 一般来说,Ember Data 被设计用来实现这样的目的:消除哪些为不同应用程序与服务器之间通信而写的特殊代码, 而是用 REST 风格数据适配器将它们转换成统一的方式。 一些服务器,比如 Firebase、Parse 和 CouchDB 已经定义了和客户端通信的精确的协议,以便适合 Emb

  • material-about-library Makes it easy to create a beautiful about screen for your app. Generates an Activity or Fragment. Idea from here: Heinrich Reimer's open-source-library-request-manager Design in

  • 취준생이 반드시 알아야 할 프론트엔드 지식들 목차 소개 프론트엔드 전반 HTML CSS Javascript 네트워크 보안 �� 소개 취업 전 반드시 알아야 한다고 생각하는 프론트엔드 분야의 기초지식들을 모아놓았습니다. 실제 면접질문들과 구글링을 통해 검색한 필수지식 및 질문들을 통해서 하나하나 정리했습니다. 기초지식을 너무 얕게 혹은 너무 깊게 말고 적당한