Skip to content

Instantly share code, notes, and snippets.

View mfurtak's full-sized avatar

Michael Furtak mfurtak

View GitHub Profile
@mfurtak
mfurtak / Android Design for UI Developers.md
Created May 17, 2013 15:34
Notes from the talk "Android Design for UI Developers" at Google I/O 2013# Android Design for UI Developers

App Navigation

Lateral Navigation

  • Switching between sibling elements
  • Action bar can do this through tabs, or spinners
    • "Implementing Effective Navigation"
    • Action Bar compatibility for 2.1+ * No need to rush off ABS, but for new apps, go for ActionBarCompat
  • View Pager
@mfurtak
mfurtak / Android Graphics Performance.md
Created May 17, 2013 15:38
Notes from the talk, "Android Graphics Performance" from Google I/O 2013

Android Graphics Performance

Reordering and Merging

  • Trying to more automatically reorder graphics commands you give so that they're done in an optimal order
  • Also merging individual draw commands into groups of like commands for efficiency
  • All automatic, and potentitally available in the future

Multithreading in the Renderer

@mfurtak
mfurtak / Google+ Sign-In for Android Developers.md
Created May 17, 2013 15:45
Notes from the talk, "Google+ Sign-In for Android Developers" from Google I/O 2013

Google+ Sign-In for Android Developers

OTA Installs

  • During sign-in, Play offers the user to install your app on their device, if they have a compatible device.
    • The user will also automatically be signed in on that device
  • Integrated with Play Services, so is already on many devices
  • Does all the OAuth2 token management for you

Using API

@mfurtak
mfurtak / What's New in Android Developer Tools.md
Created May 17, 2013 15:57
Notes from the talk, "What's New in Android Developer Tools" from Google I/O 2013

What's New in Android Developer Tools

Android Studio

  • Based on IntelliJ IDEA

IntelliJ Experience

  • Can warn you when you might be passing an incorrect variable based on a comparison of the variable name and the method name
  • Find action popup allows you to search for actions you can do by searching by their name
@mfurtak
mfurtak / The New Android SDK Build System.md
Last active December 17, 2015 11:09
Notes from the talk, "The New Android SDK Build System" from Google I/O 2013
@mfurtak
mfurtak / Android Protips 3.md
Created May 17, 2013 17:16
Notes from the talk, "Android Protips 3" from Google I/O 2013

Android Protips 3

Android Beam

  • Receiver adds intent
  • Can send arbitrary byte data

Lockscreen Widget

  • Specify a different layout for the lockscreen
hourPaint = new Paint();
hourPaint.setARGB(255, 200, 200, 200);
hourPaint.setStrokeWidth(6F);
hourPaint.setAntiAlias(true);
hourPaint.setStrokeCap(Paint.Cap.ROUND);
// ...
float hrX = (float) Math.sin(hrRot) * hrLength;
float hrY = (float) -Math.cos(hrRot) * hrLength;
@mfurtak
mfurtak / BriefingIntentHandler.java
Last active December 19, 2016 00:54
Painful Alexa custom slot type value handling
switch (metric) {
case "status":
return buildStatusResponse();
case "ability": // Close enough!
case "stability":
return buildStabilityResponse();
case "grove": // Uh, sure.
case "gross": // This is how I feel.
case "growth":
return buildGrowthResponse();
@mfurtak
mfurtak / BriefingIntentHandler.java
Last active December 19, 2016 00:46
Literal Alexa custom slot type value handling
switch (metric) {
case "status":
return buildStatusResponse();
case "stability":
return buildStabilityResponse();
case "growth":
return buildGrowthResponse();
case "retention":
return buildRetentionResponse();
default:
@mfurtak
mfurtak / SsmlBuilder.java
Created December 19, 2016 02:29
SSML building
package io.fabric.alexaskills.util;
import java.util.function.Consumer;
public class SsmlBuilder implements SsmlPhrase {
private final StringBuilder stringBuilder;
private boolean built = false;
public SsmlBuilder() {
stringBuilder = new StringBuilder();