Skip to content

Commit d4da8e2

Browse files
committed
2 parents 0d108a0 + 85fbca2 commit d4da8e2

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22
[![](https://jitpack.io/v/Priyansh-Kedia/OpenGraphParser.svg)](https://jitpack.io/#Priyansh-Kedia/OpenGraphParser)
33

44

5-
A small and easy to use library which provides the convenience of using Open Graph Protocol in Android very easily.
5+
A small and easy to use library which provides the convenience of using [Open Graph Protocol](https://ogp.me/) in Android very easily.
66
Create previews for links to share in Android very easily.
77

8+
9+
10+
811
### Star this repo to show your support [stargazers](https://github.com/Priyansh-Kedia/OpenGraphParser/stargazers) for this repository. :star2:
912

13+
14+
https://user-images.githubusercontent.com/52661249/127740097-51535912-6623-48ac-8a3f-7709ac9b968e.mp4
15+
16+
17+
1018
Add this in your root build.gradle at the end of repositories:
1119

1220
allprojects {
@@ -26,11 +34,6 @@ Add the dependency
2634

2735

2836

29-
https://user-images.githubusercontent.com/52661249/127740097-51535912-6623-48ac-8a3f-7709ac9b968e.mp4
30-
31-
32-
33-
3437
# Implementation
3538

3639
private val openGraphParser = OpenGraphParser(this)
@@ -52,15 +55,13 @@ The data class ***OpenGraphResult*** contains:
5255
Inside `onPostResponse(openGraphResult: OpenGraphResult)` you can use the data to show on your UI like this.
5356

5457
override fun onPostResponse(openGraphResult: OpenGraphResult) {
55-
linkPreviewLayout.apply {
56-
runOnUiThread {
57-
Glide.with(this@ChannelActivity).load(openGraphResult.image).into(linkImage)
58-
linkTitle.text = openGraphResult.title
59-
linkDescription.text = openGraphResult.description
60-
website.text = openGraphResult.siteName
61-
}
62-
}}
63-
*Make sure that you run UI related stuff on the **UI Thread***.
58+
linkPreviewLayout.apply {
59+
Glide.with(this@ChannelActivity).load(openGraphResult.image).into(linkImage)
60+
linkTitle.text = openGraphResult.title
61+
linkDescription.text = openGraphResult.description
62+
website.text = openGraphResult.siteName
63+
}}
64+
6465

6566
# Contributions
6667
- Fork the repo

0 commit comments

Comments
 (0)