GithubHelp home page GithubHelp logo

android-about-page's Introduction

Android About Page

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

Android About Page Cover

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("[email protected]")
  .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("[email protected]", "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 following styling attributes to create a dedicated style for AboutPage. If the dependents choose not to specify an explicit style, the library falls back to sensible 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 in your 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 it on selective AboutPage instances.

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

8. Force Night/Day mode

We recommend that the dependents use AppCompatDelegate.setDefaultNightMode() to force enable/disable the night mode across their apps. If the dependents are unable to use the recommended approach, they can use the AboutPage(Context, boolean) constructor to specify the desired mode. The dependents must note that by using this constructor, the AboutPage will use its default styles, ignoring any 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.

android-about-page's People

Contributors

abahgat avatar ahmetturk avatar alfex4936 avatar ashutoshgngwr avatar boxhock avatar chibatching avatar chingiz avatar cyb3rko avatar devfrey avatar filipmaelbrancke avatar geecko86 avatar greenaddress avatar hyuwah avatar jbarat avatar kaiwinter avatar kartikarora avatar kirvx avatar krasimiracle avatar ljmocic avatar medyo avatar mortezasun avatar numezmat avatar ravidsrk avatar roussosalex avatar rudrakaniya avatar skmd0 avatar unxavi avatar vanniktech avatar whiskeyfei avatar zakariaboualaid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-about-page's Issues

Add call us at (with phone icon)

Hi there,

This is very nice library, and I am using it since last year. Thank you.

I want to request you add one more contact via phone element within this library. I tried to add it my self but on some devices it is giving exception of ResurceNotFound.

    Element callUsAt = new Element();
    callUsAt.setIcon(R.drawable.phone);
    callUsAt.setTitle("Call us at: +92 (021) 35302095");

java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2214)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2264)
at android.app.ActivityThread.access$600(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5152)
at java.lang.reflect.Method.invokeNative(Native Method:0)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:744)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method:0)
Caused by: android.content.res.Resources$NotFoundException:
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2398)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2353)
at android.content.res.Resources.getXml(Resources.java:1002)
at android.support.graphics.drawable.VectorDrawableCompat.create(VectorDrawableCompat.java:586)
at mehdi.sakout.aboutpage.AboutPage.createItem(AboutPage.java:360)
at mehdi.sakout.aboutpage.AboutPage.addItem(AboutPage.java:243)
at com.tapmad.tapmadtv.AboutActivity.onCreate(AboutActivity.java:74)
at android.app.Activity.performCreate(Activity.java:5161)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2178)

Website support

I know it's really easy to add custom item, but maybe in the future you could add predefined website item support. I don't know how useful this really would be, you would use some generic icon for website (like with Facebook/Twitter/Instagram) since every website has their own icon/branding.

Maybe something like this:
.addWebsite("http://google.com") // uses generic icon
.addWebsite("http://google.com", R.mipmap.my_website_icon) // uses specific icon

can not see texts

I cannot see texts, why?

I can only see image, app description, icons.. and nearlynothing else...
68747470733a2f2f7777772e64726f70626f782e636f6d2f732f376e7168363776656d38786c6c63302f6f70656e2d736f757263652d6c69627261726965732e706e673f646c3d312672616e646f6d3d3335

setIntent

how to use setIntent, to start new activity

i used in Element:

Intent libIntent = new Intent(getBaseContext(), CustomInfoTosActivity.class);
TossElement.setIntent(libIntent);

but it dosn work.

Adding library causing "android.support.design.widget.NavigationView" error

When I add this library in app.bundle my app starts crashing. I didn't even change a single line of code except adding compile path in app.bundle.

Error log is as below

java.lang.RuntimeException: Unable to start activity ComponentInfo{andro.rdx.pharmac/andro.rdx.pharmac.activity.DashboardActivity}: android.view.InflateException: Binary XML file line #147: Error inflating class android.support.design.widget.NavigationView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2200)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249)
at android.app.ActivityThread.access$800(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5113)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)

removing the compile path resolve this error.
Did anyone else faced this issue ?

Here is the app's config info
compileSdkVersion 23
buildToolsVersion "23.0.2"
minSdkVersion 15
targetSdkVersion 23

compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'

icons now showing on android 16

Thank you for the library!

It seems the icons are showing for android 21+ but not for version 16.
For example "Like on Facebook" "Follow us on twitter" have the respective icons in 21+ but not in 16.

Only in English?

I just gave a try to your great-looking plugin.
Am I wrong or we can't change/edit labels to another language?
Also, where is the long description located?

Great work by the way ;)

Not able to open my facebook page through this library

I am providing the page ID as the string input argument , but when i run the app and click on facebook , it does not open. Could you please check/provide your inputs on this ?

.addWebsite("www.google.com")
.addFacebook("1754981212131313")
.addTwitter("My Twitter")

Don't use android:allowBackup="true" in the library AndroidManifest

Consider not setting allowBackup=true in the library.
An app that uses the library, but which has allowBackup=false in its own manifest will get a 'manifest merger failed' message, like

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:16:9-36
    is also present at [com.github.medyo:android-about-page:1.0] AndroidManifest.xml:12:9-35 value=(true).
    Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:14:5-66:19 to override.

I don't think an 'about page library' should set an allowBackup property

Is it possible to override default strings?

Currently, the predefined about page items such as addPlayStore() , addGitHub(), etc have pre-determined texts such as "Fork us on Github". What's the easiest way to override these strings? In my case I'm a indie developer so using the term "us" doesnt really make sense.

Cheers!

Support mimaps

Android now recommends to use mipmaps for icons, would be nice if .setIcon supports mipmaps as well as drawables.

Easiest way to add a ClickListener

Out of the box this has intents which are great, but is there a way to attach an onClickListener to an element?

I imagine I'd need a reference to the view

Change string value?

Hey,

I'm fairly new to Android and I was wondering whether it is possible to change the text of the Playstore element, like "rate on the PlayStore" or something else. I tried editing the xml file under: \app\libs\library\src\main\res\values\strings.xml. but it doesn't work?

Love the library thanks!

pt-BR translation suggestion

Here it goes:

<resources>
    <string name="about_page_description" translatable="false" >Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vehicula ligula tortor, in pellentesque dui congue ac. Vestibulum lacinia urna magna, quis cursus ante iaculis nec. Nunc ut ligula sit amet odio ultrices euismod vel vel purus. Sed lacus mauris, aliquam et placerat id</string>

    <string name="about_contact_us">Fale Conosco</string>
    <string name="about_instagram">Siga-nos no Instagram</string>
    <string name="about_facebook">Curta no Facebook</string>
    <string name="about_play_store">Avalie-nos na Play Store</string>
    <string name="about_youtube">Assista-nos no Youtube</string>
    <string name="about_twitter">Siga-nos no Twitter</string>
    <string name="about_github">Crie um Fork no GitHub</string>
    <string name="about_website">Visite o nosso website</string>

</resources>

Disclaimer: Portuguese is my native language

How to implement it correctly

Hi. I'm trying to implement this project into mine, to use the About page with my own information on it. Every time I try to implement it, it crashs. I don't know hot to implement it well. How do I have to do it?

P.S.: I have added the line on build.gradle well.

setIcon giving force close

halo there, awesome work..

i create a new element, if I .setIcon from mipmap or drawable using png make about page force close, except if i put a vector file in drawable-nodpi folder..

here is the logcat..

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.olmatix.config.lesjaw.configolmatix, PID: 9539
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.olmatix.config.lesjaw.configolmatix/com.olmatix.config.lesjaw.amazara.AboutActivity}: android.content.res.Resources$NotFoundException: File res/drawable-nodpi-v4/wa.png from xml type xml resource ID #0x7f020060
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2311)
at android.app.ActivityThread.access$1000(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1254)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5159)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-nodpi-v4/wa.png from xml type xml resource ID #0x7f020060
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2358)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2313)
at android.content.res.Resources.getXml(Resources.java:988)
at android.support.graphics.drawable.VectorDrawableCompat.create(VectorDrawableCompat.java:413)
at mehdi.sakout.aboutpage.AboutPage.createItem(AboutPage.java:360)
at mehdi.sakout.aboutpage.AboutPage.addItem(AboutPage.java:243)
at com.olmatix.config.lesjaw.amazara.AboutActivity.onCreate(AboutActivity.java:33)
at android.app.Activity.performCreate(Activity.java:5239)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2225)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2311) 
at android.app.ActivityThread.access$1000(ActivityThread.java:148) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1254) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5159) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.io.FileNotFoundException: Corrupt XML binary file
at android.content.res.AssetManager.openXmlAssetNative(Native Method)
at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:488)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2340)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2313) 
at android.content.res.Resources.getXml(Resources.java:988) 
at android.support.graphics.drawable.VectorDrawableCompat.create(VectorDrawableCompat.java:413) 
at mehdi.sakout.aboutpage.AboutPage.createItem(AboutPage.java:360) 
at mehdi.sakout.aboutpage.AboutPage.addItem(AboutPage.java:243) 
at com.olmatix.config.lesjaw.amazara.AboutActivity.onCreate(AboutActivity.java:33) 
at android.app.Activity.performCreate(Activity.java:5239) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2225) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2311) 
at android.app.ActivityThread.access$1000(ActivityThread.java:148) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1254) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5159) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610) 
at dalvik.system.NativeStart.main(Native Method) 

About bottom of the page

This page helps me a lot!
i want to add some links or words at the bottom of the page,under the elements,Is there any methods?thanks.

Crash on API 16

Hi,

first of all thanks for this awesome library!
Unfortunately I'm experiencing a crash when using the library on API level 16. On API 21 everything works fine.

Here is the relevant code for creating the about page

new AboutPage(getContext())
                .setImage(R.drawable.logo)
                .addItem(new Element(null, getString(R.string.share_with_friends), R.drawable.about_icon_share))
                .create();

I'm using the android gradle plugin 2.1.0. about_icon_share is a vector drawable. The library seems to assume that I'm using vectorDrawables.useSupportLibrary = true, which is not the case.

FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{de.dreier.mytargets/de.dreier.mytargets.activities.SimpleFragmentActivity$AboutActivity}: android.content.res.Resources$NotFoundException: File res/drawable-xhdpi-v4/about_icon_share.png from xml type xml resource ID #0x7f020057
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-xhdpi-v4/about_icon_share.png from xml type xml resource ID #0x7f020057
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2145)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2100)
at android.content.res.Resources.getXml(Resources.java:901)
at android.support.graphics.drawable.VectorDrawableCompat.create(VectorDrawableCompat.java:408)
at mehdi.sakout.aboutpage.AboutPage.createItem(AboutPage.java:364)
at mehdi.sakout.aboutpage.AboutPage.addItem(AboutPage.java:241)
at de.dreier.mytargets.fragments.AboutFragment.onCreateView(AboutFragment.java:91)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:601)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1163)
at android.app.Activity.performStart(Activity.java:5018)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2032)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) 
at android.app.ActivityThread.access$600(ActivityThread.java:130) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4745) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.io.FileNotFoundException: Corrupt XML binary file
at android.content.res.AssetManager.openXmlAssetNative(Native Method)
at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:487)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2127)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2100) 
at android.content.res.Resources.getXml(Resources.java:901) 
at android.support.graphics.drawable.VectorDrawableCompat.create(VectorDrawableCompat.java:408) 
at mehdi.sakout.aboutpage.AboutPage.createItem(AboutPage.java:364) 
at mehdi.sakout.aboutpage.AboutPage.addItem(AboutPage.java:241) 
at de.dreier.mytargets.fragments.AboutFragment.onCreateView(AboutFragment.java:91) 
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) 
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742) 
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617) 
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339) 
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:601) 
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1163) 
at android.app.Activity.performStart(Activity.java:5018) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2032) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) 
at android.app.ActivityThread.access$600(ActivityThread.java:130) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4745) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
at dalvik.system.NativeStart.main(Native Method)

You can find the code at https://github.com/dreierf/mytargets

Thanks in advance

HTML description

Hi,
Is it possible if I put html tag on the description part? I tried using Html.fromHtml still no luck, especially for bold or h2 tag?
Thank you

GPU overdraw optimization

Hey, I know this is minor nitpick, but it looks like the view has background set and this add two whole layers of overdraw.

base layer = no color

  1. layer = blue
  2. layer = green
  3. layer = red

The background should have no color over it. Then the text should have blue color over it. See my screenshot, please ignore black rectangle.

screenshot_20160613-190749

Info button

Hi,
i would like to use your about page in my very basic application.
it is a webview application. currently i have added menu item on the action bar and call layout with setContentView(R.layout.activity_info);
is there an easy way to call your about page. beginners like me :)
thanks

how do you add it in fragment

public class InspireFragment extends Fragment {
public static final String TAG = MainActivity.class.getSimpleName();

TextView textView;

ArrayAdapter<String> adapter;
ArrayList<String> items;
static String youtube_code;
SwipeRefreshLayout mSwipeRefreshLayout;
private String tag_string_req = "string_req";
View v;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
     v = inflater.inflate(R.layout.about_inspire, container, false);


    TextView textView = (TextView) v.findViewById(R.id.txtLarge);
    textView.setTypeface(MainActivity.arialface);



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

    Element adsElement = new Element();
    adsElement.setTitle("Advertise with us");

    View aboutPage = new AboutPage(getActivity())
            .isRTL(false)
            .setImage(R.drawable.about_icon_instagram)
            .addItem(versionElement)
            .addItem(adsElement)
            .addGroup("Connect with us")
            .addEmail("[email protected]")
            .addFacebook("the.medy")
            .addTwitter("medyo80")
            .addYoutube("UCdPQtdWIsg7_pi4mrRu46vA")
            .addPlayStore("com.ideashower.readitlater.pro")
            .create();

    setContentView(aboutPage);    // shows error in fragment

    return v;
}

}

Conflict after adding library to the gradle

My project has NavigationDrawer and everything works fine until I add this library to the gradle. When I build the project the compiler thrown the error message that the class of my NavigationDrawer cannot instantiate. It took me few day to find the bug, finally I decided to remove this library from gradle and thing start to work fine. Have you experienced that? or Am I missing something? Thank in advanced

NPE on Android Kitkat

Hi there, I'm getting error on Android 4.4 Kitkat. Following is the error log cat

E/VectorDrawableCompat: parser error org.xmlpull.v1.XmlPullParserException: Binary XML file line #1<vector> tag requires viewportWidth > 0 at android.support.graphics.drawable.VectorDrawableCompat.updateStateFromTypedArray(VectorDrawableCompat.java:535) at android.support.graphics.drawable.VectorDrawableCompat.inflate(VectorDrawableCompat.java:472) at android.support.graphics.drawable.VectorDrawableCompat.createFromXmlInner(VectorDrawableCompat.java:436) at android.support.graphics.drawable.VectorDrawableCompat.create(VectorDrawableCompat.java:418) at mehdi.sakout.aboutpage.AboutPage.createItem(AboutPage.java:360) at mehdi.sakout.aboutpage.AboutPage.addItem(AboutPage.java:243) at mehdi.sakout.aboutpage.AboutPage.addEmail(AboutPage.java:61) at com.mahasadhu.route.Activity.About.onCreate(About.java:36) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5017) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.mahasadhu.route, PID: 2403 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mahasadhu.route/com.mahasadhu.route.Activity.About}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5017) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at android.support.v4.graphics.drawable.DrawableWrapperDonut.getState(DrawableWrapperDonut.java:147) at android.support.v4.graphics.drawable.DrawableWrapperDonut.setTintList(DrawableWrapperDonut.java:267) at android.support.v4.graphics.drawable.DrawableWrapperDonut.setTint(DrawableWrapperDonut.java:261) at android.support.v4.graphics.drawable.DrawableCompatBase.setTint(DrawableCompatBase.java:36) at android.support.v4.graphics.drawable.DrawableCompat$BaseDrawableImpl.setTint(DrawableCompat.java:89) at android.support.v4.graphics.drawable.DrawableCompat.setTint(DrawableCompat.java:380) at mehdi.sakout.aboutpage.AboutPage.createItem(AboutPage.java:370) at mehdi.sakout.aboutpage.AboutPage.addItem(AboutPage.java:243) at mehdi.sakout.aboutpage.AboutPage.addEmail(AboutPage.java:61) at com.mahasadhu.route.Activity.About.onCreate(About.java:36) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)  at android.app.ActivityThread.access$800(ActivityThread.java:135)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5017)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)  at dalvik.system.NativeStart.main(Native Method)

I've tested it on lollipop, it works fine

ActionBar Causes the about view to disapear in xamarin.android Help.

I am trying to add an action bar to this activity but after adding it The actionbar shows but the view is blank in c#. Here is my code please help.
MY LAYOUT:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/aboutdevelopers"> <include android:id="@+id/toolbar" layout="@layout/toolbar" /> </LinearLayout>

MY ACTIVITY:

`
using Android.App;
using Android.OS;
using Android.Support.V7.App;
using Android.Views;
using AndroidAboutPage;
using System;
using Toolbar = Android.Support.V7.Widget.Toolbar;
using Android.Widget;

namespace my_cards
{
[Activity(Label = "About")]
public class About : AppCompatActivity
{
LinearLayout mLinearLayout;

    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);
        SetContentView(Resource.Layout.about_Devs);
        var toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);
        //Toolbar will now take on default actionbar characteristics
        SetSupportActionBar(toolbar);
        SupportActionBar.Title = "ABOUT US";
        SupportActionBar.SetDisplayHomeAsUpEnabled(true);
        SupportActionBar.SetHomeButtonEnabled(true);
        mLinearLayout = FindViewById<LinearLayout>(Resource.Id.aboutdevelopers);

        Element adsElement = new Element();
        adsElement.Title = "About US";
        View aboutPage = new AboutPage(this)
            .IsRTL(false)
            .SetImage(Resource.Drawable.splash_logo)
            .SetDescription("Here Is How To Contact The Dev Team")
            .AddItem(new Element() { Title = "Version 0.1" })
            .AddItem(adsElement)
            .AddGroup("Connect With Us")
            .AddEmail("[email protected]")
            .AddWebsite("http://lifeasy.azurewebsites.net")
            .AddFacebook("Hamisi Mickdad")
            .AddTwitter("@hmickdad")
            .AddYoutube("Hamisi Mickdad")
            .AddPlayStore("My Play")
            .AddInstagram("hmickdad")
            .AddGitHub("HamisiMickdad")
            .AddItem(CreateCopyright())
            .Create();
        // SetContentView(aboutPage);
        mLinearLayout.AddView(aboutPage, 1);

}

    private Element CreateCopyright()
    {
        Element copyright = new Element();
        string copyrightString = $"Copyright {DateTime.Now.Year} by HamSoft";
        copyright.Title = copyrightString;
        copyright.Icon = Resource.Drawable.copyright;
        return copyright;
    }
    public override bool OnOptionsItemSelected(IMenuItem item)
    {
        if (item.ItemId == Android.Resource.Id.Home)
            Finish();

        return base.OnOptionsItemSelected(item);
    }

}

}
`

appcompat-v7:23.3.0

If i using appcompat-v7:23.3.0 have android.content.res.Resources$NotFoundException:
ImageView change AppCompatImageView work fine...

AppBarLayout disappears

When I implement your library AppBarLayout disappears, could you recommend how to fix it?

setIconDrawable transparente

Good afternoon friends,
Is there any way to leave the color of the icon as it is in the image itself?
I did not want to overwrite the icon color.

Thank you very much.

Instagram support

Your description mentions Instagram support:

The library has already some predefined social networks like :  
* Facebook 
* Twitter
* Instagram
* Youtube
… 
addInstagram(String AccountID)

but I don't see it anywhere in the code. Do you want that as a pull request?

Image customization options

Any plans to add some branding image customization options, like width and height?

Something like:

// default size, only image resource
.setImage(int);

// image resource, width, height (in DP)
.setImage(int, int, int);

values-fa Misspelled

In the demo app, the "values-fa" directory in res is spelled "value-fa."

The 's' is missing, so the app will not compile out of the box!

Element API is weird

Some set methods are returning the same element (this) and some don't hence the creation is not chainable.

Suggestion: simple way of adding a pane to display open source licenses

Various open source libraries include licenses that require apps using them to supply a copy of the license to the users, notices about the inclusion of the libraries, where to acquire copies of the source code, and other similar legal requirements. The about page is a useful place to include such notices, probably in an expanding section so that the potentially large amount of text is usually hidden. It would be nice if there were an easy way to include such a section in the page generated by this library.

Resource prefix for library module

Would be cool if every resource would be prefixed to avoid duplicates.

There's a handy Gradle property for that resourcePrefix 'my_prefix' and lint checks that every resource is prefixed.

Using in Fragment

Very good library and convenience to use, but I want to know how to use it in Fragment instead of activity. I am just a beginner, so please help me. Thank you in advance

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.