Skip to content

Instantly share code, notes, and snippets.

View RowlandOti's full-sized avatar
🎯
Focusing on what holds things in their inmost folds.

Rowland Oti RowlandOti

🎯
Focusing on what holds things in their inmost folds.
View GitHub Profile
package com.fenchtose.footerloaderadapterdemo.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.fenchtose.footerloaderadapterdemo.R;
@RowlandOti
RowlandOti / RecyclerViewCursorAdapter.java
Created December 21, 2015 13:15
An example of using a CursorAdapter with RecyclerView. PATCH: Because RecyclerView.Adapter in its current form doesn't natively support cursors, we "wrap" a CursorAdapter that will do all the job for us
/*
* Copyright 2015 Oti Rowland
*
* 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
@RowlandOti
RowlandOti / gradle-android-signing.gradle
Last active December 1, 2015 17:01
Automated Signing of *.*.apk file in Android Studio
def Properties props = new Properties()
def propFile = file('../signing.properties')
if (propFile.canRead()){
props.load(new FileInputStream(propFile))
if (props!=null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) {
println 'RELEASE BUILD SIGNING'
@RowlandOti
RowlandOti / MainActivity.java
Created July 16, 2015 17:19
An example pf how to create twitter-like custom menu overflow listview using ListPopupWindow
package com.rowland.magent;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.support.v7.widget.ListPopupWindow;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;