This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Setup our fonts - One system font from Apple and a custom font */ | |
CTFontRef bodyCopyFont = CTFontCreateWithName((__bridge CFStringRef) [Theme fontForBodyOfSize:11].fontName, [Theme fontForBodyOfSize:11].lineHeight, NULL); | |
CTFontRef systemFont = CTFontCreateWithName((__bridge CFStringRef) [UIFont systemFontOfSize:11].fontName, [UIFont systemFontOfSize:11].lineHeight, NULL); | |
/* Lets inspect the properties */ | |
NSLog(@"*****************************************************************"); | |
NSLog(@"SYSTEM-FONT LINE HEIGHT PROPERTY %f", [UIFont systemFontOfSize:11].lineHeight); | |
NSLog(@"SYSTEM-FONT CALCULATED LINE HEIGHT %f", [self getLineHeightForFont:systemFont]); //Custom function | |
NSLog(@"*****************************************************************"); | |
NSLog(@"CUSTOM-FONT LINE HEIGHT PROPERTY %f", [Theme fontForBodyOfSize:11].lineHeight); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function githarvest() { | |
local week_ago=$(eval date -v -7d +'%d/%m/%Y') | |
git log --since $week_ago --author="YOUR GIT NAME HERE" --pretty=format:'%C(yellow)%h|%Cred%ad|%Cblue%an|%Cgreen%d %Creset%s' --date=short | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AnimatingDrawerToggle extends ActionBarDrawerToggle { | |
public enum State { | |
UP, | |
HOME | |
} | |
private static final float MENU_POSITION = 0f; | |
private static final float ARROW_POSITION = 1.0f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Setup how the content elements should animate | |
TransitionSet transitionSet = new TransitionSet(); | |
transitionSet.addTransition( | |
new Slide(Gravity.TOP).addTarget(R.id.header_container) | |
//Why do i have to exclude this? | |
.excludeTarget(R.id.content_container, true)); | |
transitionSet.addTransition( | |
new Slide(Gravity.BOTTOM).addTarget(R.id.content_container) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyPresenter { | |
public MyPresenter(IView viewInterface){ | |
} | |
public void start() { | |
//this should be called from a onResume() lifecycle method or similar | |
//subscribe here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.square.flow; | |
import android.util.SparseArray; | |
import com.google.common.reflect.TypeToken; | |
import com.google.gson.Gson; | |
import com.google.gson.JsonElement; | |
import com.google.gson.TypeAdapter; | |
import com.google.gson.stream.JsonReader; | |
import com.google.gson.stream.JsonToken; |
NewerOlder