Skip to content

Instantly share code, notes, and snippets.

View tommybuonomo's full-sized avatar
🦁
Working

Tommy Buonomo tommybuonomo

🦁
Working
View GitHub Profile
package com.lydia.custom.recycler
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import java.lang.reflect.ParameterizedType
/**
* WARNING !
*
HttpURLConnection urlConnection = null;
try {
URL url = new URL("https://www.android.com/");
urlConnection = (HttpURLConnection) url.openConnection();
return readInputStream(urlConnection.getInputStream());
} catch (IOException e) {
e.printStackTrace();
} finally {
if (urlConnection != null) {
urlConnection.disconnect();