Skip to content

Instantly share code, notes, and snippets.

View mbobiosio's full-sized avatar
🎯
Focusing

Mbuodile Obiosio mbobiosio

🎯
Focusing
View GitHub Profile
{
"status": "success",
"message": "",
"data": {
"id": "69173",
"artistName": "Bonny Cepeda",
"albumTitle": "Asesina",
"genre": "Salsa y Tropical",
"albumDuration": "01:16:50",
"songCount": 17,
@mbobiosio
mbobiosio / README.md
Created October 5, 2020 13:54 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import java.util.*
#parse("File Header.java")
object NetworkUtil {
fun isNetworkAvailable(context: Context?): Boolean {
if (context == null) return false
val connectivityManager =
context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
[
{
"region": "NG",
"url": "https://www.pick.ng",
"image": "https://i.imgur.com/9tHuldS.jpg",
"type": "web",
"ID": 1
},
{
"region": "NG",
@mbobiosio
mbobiosio / teams.json
Created June 11, 2020 10:54
teams.json
[
{
"team_key": "2611",
"team_name": "Leicester",
"team_badge": "https:\/\/apiv2.apifootball.com\/badges\/2611_leicester.png",
"team_country": "England",
"ID": 1
},
{
"team_key": "2612",
[
{
"id": 1,
"category": "Senior",
"count": "230",
"topic": "DAVID'S DESIRE FOR A HOUSE FOR THE LORD",
"verse": "\"Thus saith the LORD, The heaven is my throne, and the earth is my footstool: where is the house that ye build unto me? and where is the place of my rest\” (Isaiah:66:1)",
"text": "2 Samuel:7:1-29, Psalms:30:1, Isaiah:66:1-2",
"content": "http://apostolicfaith.org.uk/index.php?p=curriculum_detail&id=728"
},
@mbobiosio
mbobiosio / RecyclerViewAdapterTemplate
Created April 3, 2020 11:53
RecyclerViewAdapter live template for Android Studio with androidx imports, ButterKnife and notifyDataSetChanged();
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.content.Context;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import java.util.List;
public interface ApiService {
@Headers({"Accept: application/json"})
@POST("/api/v1/mobile/participants")
@FormUrlEncoded
Call<JsonObject> register(@Field("first_name") String firstname,
@Field("last_name") String lastname,
@Field("phone_number") String phone_number,
@Field("project_code") String project_code,
@Field("app_version") String app_version,