Skip to content

Instantly share code, notes, and snippets.

View Ahmedbadereldin's full-sized avatar
🏠
Working from home

Ahmed M Bader El-Din Ahmedbadereldin

🏠
Working from home
View GitHub Profile
@MomenZaq
MomenZaq / RecyclerviewFullScreenshot.java
Last active October 10, 2022 03:44
Take a screenshot of RecyclerView in FULL length
/*
1. create a new NestedScrollView
2. add it to recyclerview's parent
3. remove recyclerview from its parent "it's important to add it to a new parent"
4. add recyclerview to nestedscrollview
5. take screenshot of nestedscrollview
6. add recyclerview to its main parent.
*/
@oleynikd
oleynikd / Activity.java
Created November 7, 2017 18:38
Android TV HDMI plug/unplug event example
package ua.youtv.testapp;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.util.Log;
import static android.media.AudioManager.ACTION_HDMI_AUDIO_PLUG;
@himanshu-soni
himanshu-soni / BaseActivity.java
Created October 31, 2014 19:22
Base Activity to detect internet connection GPS disabled. It shows dialog to enable them too :)
package com.djhs16.location;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.location.Location;