Skip to content

Instantly share code, notes, and snippets.

View rahulpandey's full-sized avatar

Rahul rahulpandey

  • Reward360 Global Services
  • Bengaluru
View GitHub Profile
hex values. E.g. for 50% white
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
// generic php function to send GCM push notification
public function sendPushNotificationToGCM($registatoin_ids, $message) {
// Google cloud messaging GCM-API url
$url = 'https://android.googleapis.com/gcm/send';
$fields = array (
'registration_ids' => $registatoin_ids,
'data' => $message
);
// Google Cloud Messaging GCM API Key
define ( "GOOGLE_API_KEY", " GCM_KEY" );
@rahulpandey
rahulpandey / ffmpeg_android_build.sh
Created May 28, 2015 13:06
This build use to compile ffmpeg on windows
#!/bin/bash
######################################################
# Usage:
# put this script in top of FFmpeg source tree
# ./build_android
#
# It generates binary for following architectures:
# ARMv6
# ARMv6+VFP
# ARMv7+VFPv3-d16 (Tegra2)
@rahulpandey
rahulpandey / class.responseHandler.php
Created May 24, 2015 06:19
simple class which helpful writing webservices
<?php
class ResponseHandler {
private static $_instance;
private $_api_response_code;
private $_api_response;
// create new instance of class
public static function singleInstance() {
if (! self::$_instance) {
self::$_instance = new self ();

You can use this class to realize a simple sectioned grid RecyclerView.Adapter without changing your code.

Screen

The RecyclerView has to use a GridLayoutManager.

This is a porting of the class SimpleSectionedListAdapter provided by Google

If you are looking for a sectioned list RecyclerView.Adapter you can take a look here