Skip to content

Instantly share code, notes, and snippets.

View MuhamedFathy's full-sized avatar
🎯
Focusing

Mohamed Fathy MuhamedFathy

🎯
Focusing
  • La3eb
  • Egypt
View GitHub Profile
@MuhamedFathy
MuhamedFathy / SwipeRefreshLayoutWithEmpty.java
Created January 29, 2017 19:39 — forked from grennis/SwipeRefreshLayoutWithEmpty.java
This class allows easy use of SwipeRefreshLayout with RecyclerView (or ListView) and an "empty" view that can still be pulled to refresh
package com.innodroid.sample;
import android.content.Context;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
//
@MuhamedFathy
MuhamedFathy / Coloring.java
Last active May 31, 2021 13:43 — forked from milosmns/Coloring.java
Android: Coloring (Helper Class)
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
@MuhamedFathy
MuhamedFathy / Foreground.java
Created May 15, 2016 14:43 — forked from steveliles/Foreground.java
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;
@MuhamedFathy
MuhamedFathy / udemy-youtube-dl.py
Created March 26, 2016 05:58 — forked from melkopisi/udemy-youtube-dl.py
Download udemy lectures using youtube-dl script (by : @luiz-rocha)
#!/usr/bin/env python3
#by luiz-rocha
#You can now download udemy lectures by this script which uses youtube-dl script :))
import getpass
import subprocess
try:
url = input('Course URL: ')
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software