Skip to content

Instantly share code, notes, and snippets.

View fredgrott's full-sized avatar
👾
focusing on flutter cross platform mobile dev

Fred Grott fredgrott

👾
focusing on flutter cross platform mobile dev
View GitHub Profile
/*
* Copyright 2013 Square Inc.
*
* 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
@thevery
thevery / RoboBaseAdapter.java
Created January 30, 2011 00:19
RoboBaseAdapter for RoboGuice
package roboguice.astroboy;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import com.google.inject.internal.Nullable;
import roboguice.inject.InjectView;
@paulononaka
paulononaka / AndroidGetPropSystem.java
Created March 18, 2011 14:51
Getting a system property in Android
public static String getPropSystem(String key) throws IOException {
BufferedReader bis = null;
try {
Process ifc = Runtime.getRuntime().exec("getprop " + key);
bis = new BufferedReader(new InputStreamReader(ifc.getInputStream()));
return bis.readLine();
} finally {
bis.close();
}
}
@arnaudbos
arnaudbos / DocumentView.java
Created July 11, 2011 23:17
(Android)Extended item view
package uk.ac.brookes.arnaudbos.luscinia.widget;
import uk.ac.brookes.arnaudbos.luscinia.R;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
@arnaudbos
arnaudbos / ScrollViewListener.java
Created August 1, 2011 23:24
(Android)Create a ScrollView synchronizer
public interface ScrollViewListener
{
void onScrollChanged(SynchronizerScrollView scrollView, int x, int y, int oldx, int oldy);
}
@megamind-android
megamind-android / OrientationDemo.java
Created August 19, 2011 14:44
Android-Designing for Orientation changes
package com.webile.OrientationDemo;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import android.app.Activity;
@matthawley
matthawley / RoboGuice-2b2-Proguard
Created October 31, 2011 16:33
Latest RoboGuice Proguard File
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-ignorewarnings
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable,*Annotation*,Signature
@donnfelker
donnfelker / count_bubble.xml
Created December 2, 2011 20:44
Count Bubble Layout
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:startColor="#b30e13"
android:endColor="#f5343b"
/>
@KonajuGames
KonajuGames / gist:1954646
Created March 2, 2012 01:33
Android OpenGL background context
using System;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.ES20;
using OpenTK.Platform;
using OpenTK.Platform.Android;
using Android.Views;
using Android.Content;
@kimukou
kimukou / GridViewActivity.java
Created May 4, 2012 00:47
GridView MultiTouch Test
/*
* ref
* http://www.mkyong.com/android/android-gridview-example/
* http://blog.fujiu.jp/2011/11/android.html
* http://d.hatena.ne.jp/xuwei/20120316/1331868246
* http://stackoverflow.com/questions/5730240/android-get-bounding-rectangle-of-a-view
*/