Skip to content

Repository files navigation

AndroidTweetEmbed

Preconfigured Webview to make embedding tweets simple.

Download

Add this library from Jitpack

Add this in your root build.gradle:

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

Then add this dependency

dependencies {
implementation 'com.github.yashx:AndroidTweetEmbed:1.0.0'
}

How to use

You can try the sample app (apk) and read the code here

Basically

Add this view to your layout file

<com.github.yashx.android_tweet_embed.AndroidTweetEmbed
android:id="@+id/androidTweetEmbed"android:layout_width="match_parent"android:layout_height="wrap_content" />

Find a reference to it and use any of following two methods

funloadTweetUrl(
url:String,
hideMedia:Boolean? = null,
hideThread:Boolean? = null,
theme:TweetTheme? = null,
doNotTrack:Boolean? = null,
)
funloadTweetId(
id:String,
hideMedia:Boolean? = null,
hideThread:Boolean? = null,
theme:TweetTheme? = null,
doNotTrack:Boolean? = null,
)

Only id or url is required. The other arguments are optional which I think are self explanatory but if you want you can read about them here

About

Preconfigured Webview to make embedding tweets simple

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages