• About
  • Advertise
  • Privacy & Policy
  • Contact
Tech News, Magazine & Review WordPress Theme 2017
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
  • Review
  • Gaming
  • Gear

    Trending Tags

    • Best iPhone 7 deals
    • Apple Watch 2
    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Computers
  • Applications
  • Security
No Result
View All Result
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
  • Review
  • Gaming
  • Gear

    Trending Tags

    • Best iPhone 7 deals
    • Apple Watch 2
    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Computers
  • Applications
  • Security
No Result
View All Result
Overflow Archives
No Result
View All Result

Web URL Preview in Android – Android Tutorial To Load Web URL Preview UI

by
Home Android
Share on FacebookShare on Twitter

After a break in this COVID -19 lockdown, I have been working on an Android project that involves a Web URL preview UI, like Whatsapp and Facebook link preview. The main goal is to display the MetaData like Web Title, Description, Favicon, etc, of a given web address.

After some Googling, I come across a decent library to achieve the goal. This library for Android to load and preview the Web URL will enable your application to show Web Preview UI. Also, I encounter some problems with this library on Recyclerviews. So I just made some fixes and updated the library in GitHub. Let get into the point directly.

Link Preview - Telegram Preview
Link Preview – Telegram Preview

Link Preview – Web URL Preview Library

Link Preview – an Android library to load and show the HTTP/HTTPS URLs. To use this library your Android project do the following setup

Step 1:

Add this dependence in the project main Gradle file

Step 2:

Then include the following dependencies in application-level Gradle file

How to implement:

Setup the layout xml

Add the following lines in your XML layout to include the Link Previewer in your design. There are five different types of UI available in this library, you can include as per your need.

Plain URL Preview

Plain Preview is suitable for use in any theme of your application. Since there is no background color on link preview UI, this will be perfect for any UI designs.

plain_preview
Plain Link preview Android

Whatsapp URL Preview

This will give Whatsapp look-alike URL preview. To use this view add the following in your XML layout

Link Preview - WhatsappPreview
Link Preview – WhatsappPreview

Skype URL Preview

To get Skype like URL preview use include below lines in your XML files.

Link Preview - Skype Preview
Link Preview – Skype Preview

Telegram URL Preview

By adding the following codes into your XML view, you can get Telegram like URL preview in your Android design

Link Preview - Telegram Preview
Link Preview – Telegram Preview

Twitter URL Preview

Use these codes to get Twitter like URL preview or loader in your Android project

Link Preview - Twitter Preview
Link Preview – Twitter Preview

Code Implementation

Kotlin

Follow this to load the URL preview in Kotlin. get your view id and set the URL using theloadUrl() method. Once the URL is get processed then the UI for preview the given web link will get updated.

Java

You can achieve this using Java as followed. Create a view reference to and ViewListener to load the URL.

Web Page Loading

This library is having an in-built function to handle click events, this will redirect you to the loaded Web URL.

Preview Of The Library

Link preview demo screen
Link Preview Demo

For more info and sample codes visit – Android Link Previewer

Tags: androidandroid codeandroid developmenthow to create whatsapp url preview in androidhow to load url in androidhow to open web link in androidhow to preivew url in androidkotlinload url in androidload web link in android

Next Post
Unity Gradient Effect UI Design Without Scripting | Simple Gradient Effects in Unity 3D

Unity Gradient Effect UI Design Without Scripting | Simple Gradient Effects in Unity 3D

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended.

‘Failed to load window layout’ in Unity 3d - Overflow Archives

‘Failed to load window layout’ Error – How to fix in Unity 3D

Unity Gradient Effect UI Design Without Scripting | Simple Gradient Effects in Unity 3D

Unity Gradient Effect UI Design Without Scripting | Simple Gradient Effects in Unity 3D

Trending.

Create Switch button UI in Unity 3D - overflow archives

Create Switch button UI in Unity 3D

How to Create circular progress bar in Unity 3D with rounded edge

Parse Color Runtime In Unity 3D - Thumbnail

Change Color in Runtime – Unity 3D Tutorial

Progress bar in Unity 3D

How to Create Progress bar in Unity 3D

Android Developer Options – Debugging Mode Options Explained – Part – I

Android Developer Options – Debugging Mode Options Explained – Part – I

Overflow Archives

© 2023 OverflowArchives.

Navigate Site

  • About
  • Advertise
  • Privacy & Policy
  • Contact

Follow Us

No Result
View All Result
  • Home
  • Review
  • Apple
  • Applications
  • Computers
  • Gaming
  • Gear
    • Audio
    • Camera
    • Smartphone
  • Microsoft
  • Photography
  • Security

© 2023 OverflowArchives.