Skip to content

hoangvuanhdevelopervn/DialogShare

Repository files navigation

StyleableShareDialog

GitHub license Android

Open source library that allows to quickly create ShareDialog with some customization.

Library is still in development, current stable version is 0.2.0 .


Sample Project

Sample project is available in Google Play:

Get it on Google Play

Gradle Dependency

Repository

The Gradle dependency is available via JitPack.

To use JitPack repository you need to add to your root build.gradle line that it at the end of repositories:

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

And as next step add dependency to project:

dependencies {
    implementation 'com.github.hoangvuanhdevelopervn:DialogShare:ffd46a48ff'
}

The minimum API level supported by this library is API 16 (Jelly Bean)


What's new

Check project's Releases page to find what was changed according to previous version of library


Usage

Basic

Creating simple share dialog provided by this library, which allows you to share string values is very easy. You just need to create new instance of ShareDialog, give him a value and show it using FragmentManager or FragmentTransaction.

new ShareDialog.newInstance().
        .setShareContent("Some string value")
        .show(getFragmentManager());

Creating ShareDialog via Builder

You can easily set more complex properties for ShareDialog instance. To achieve it you need to use Builder mechanism implemented in library. Builder allows you to set diffrenet kind of properites for dialog (e.g. title, titleColorRes, customHeaderRes and dialogRatioSize)

new ShareDialog.Builder()
        .setTitle("Custom dialog title")
        .setTitleTintColor(Color.Red)
        .setHeaderLayout(R.layout.customHeader)
        .setSizeRatio(new Ratio(1.0,0.5))
        .setShareContent("Some string value")
        .build()
        .show(getFragmentManager())

License

StyleableShareDialog is available under the Apache 2.0 license. See the LICENSE file for more info.


As wrote on the top of document library is still in development. Enjoy current version and please be patient.

About

Custom dialog share in android

Resources

Stars

Watchers

Forks

Packages

No packages published