Skip to content

Instantly share code, notes, and snippets.

😉
Will have small delay in response as am working on a main module @_work

Ramesh M Nair rameshvoltella

😉
Will have small delay in response as am working on a main module @_work
Block or report user

Report or block rameshvoltella

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rameshvoltella
rameshvoltella / SnappingRecyclerView.java
Created Jun 21, 2018 — forked from lauw/SnappingRecyclerView.java
Snapping RecyclerView (Horizontal)
View SnappingRecyclerView.java
/*
* Copyright 2015 Laurens Muller.
*
* 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
@rameshvoltella
rameshvoltella / NestedScrollWebView.java
Created Apr 26, 2018 — forked from alexmiragall/NestedScrollWebView.java
NestedWebView compatible with CoordinatorLayout
View NestedScrollWebView.java
package com.tuenti.nestedwebscrollview;
import android.content.Context;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.NestedScrollingChild;
import android.support.v4.view.NestedScrollingChildHelper;
import android.support.v4.view.NestedScrollingParent;
import android.support.v4.view.VelocityTrackerCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.ScrollerCompat;
@rameshvoltella
rameshvoltella / UserAgentInterceptor.java
Created Mar 6, 2018 — forked from twaddington/UserAgentInterceptor.java
Injects a User-Agent header into outgoing OkHttp requests.
View UserAgentInterceptor.java
package com.enlighthq.mobile.http;
import android.os.Build;
import java.io.IOException;
import java.util.Locale;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
@rameshvoltella
rameshvoltella / build.gradle
Created Nov 16, 2017 — forked from ph0b/build.gradle
sample build.gradle for generating split APKs per ABI
View build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig{
minSdkVersion 14
targetSdkVersion 21
versionCode 101
@rameshvoltella
rameshvoltella / FirebaseDataReceiver.java
Created Sep 28, 2017 — forked from Antarix/FirebaseDataReceiver.java
Firebase Android Sample for managing notification
View FirebaseDataReceiver.java
import android.content.Context;
import android.content.Intent;
import android.support.v4.content.WakefulBroadcastReceiver;
import android.util.Log;
/**
* This is called whenever app receives notification
* in background/foreground state so you can
* apply logic for background task, but still Firebase notification
* will be shown in notification tray
@rameshvoltella
rameshvoltella / AccountUtils.java
Created Aug 28, 2017 — forked from imminent/AccountUtils.java
Utility to retrieve user profile on Android device
View AccountUtils.java
/**
* A collection of authentication and account connection utilities. With strong inspiration from the Google IO session
* app.
* @author Dandré Allison
*/
public class AccountUtils {
/**
* Interface for interacting with the result of {@link AccountUtils#getUserProfile}.
*/
@rameshvoltella
rameshvoltella / PhonecallReceiver.java
Created Aug 24, 2017 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
View PhonecallReceiver.java
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
@rameshvoltella
rameshvoltella / ic_password_visibility.xml
Created Mar 16, 2017 — forked from PareshMayani/ic_password_visibility.xml
Android Support library 24.2.0 - passwordToggleDrawable example
View ic_password_visibility.xml
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zm0,-8c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z" />
</vector>
View MusicUtils.java
/*
* Copyright (C) 2008 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
@rameshvoltella
rameshvoltella / BitmapBitmapResourceDecoder.java
Created Oct 24, 2016 — forked from TWiStErRob/BitmapBitmapResourceDecoder.java
Glide 3.6.0 proof of concept for loading a Bitmap as Bitmap through Glide
View BitmapBitmapResourceDecoder.java
class BitmapBitmapResourceDecoder implements ResourceDecoder<Bitmap, Bitmap> {
private final BitmapPool pool;
public BitmapBitmapResourceDecoder(Context context) {
this(Glide.get(context).getBitmapPool());
}
public BitmapBitmapResourceDecoder(BitmapPool pool) {
this.pool = pool;
}
@Override public Resource<Bitmap> decode(Bitmap source, int width, int height) throws IOException {
You can’t perform that action at this time.