Skip to content

Instantly share code, notes, and snippets.

Justin Poliachik Jpoliachik

Block or report user

Report or block Jpoliachik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Jpoliachik
Jpoliachik / android_instructions.md
Created Dec 13, 2017 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac
View android_instructions.md

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@Jpoliachik
Jpoliachik / RCTAccessibilityManager+FontMultipliers.m
Last active Aug 28, 2018
React Native iOS Accessibility Font Scaling Workaround
View RCTAccessibilityManager+FontMultipliers.m
//
// RCTAccessibilityManager+FontMultipliers.m
//
// This category is a workaround React Native's default Font Sizing Accessibility settings
//
// Swizzle the getter of the font size multipliers so we can limit the max size.
//
#import "RCTAccessibilityManager+FontMultipliers.h"
#import <objc/runtime.h>
@Jpoliachik
Jpoliachik / AppDelegate.m
Created Dec 19, 2016
ReactNative iOS Launch Screen No Flash
View AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// 1. init window
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
// 2. backgroundView using LaunchScreen.xib
UIView *backgroundView = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] firstObject];
backgroundView.frame = self.window.bounds;
@Jpoliachik
Jpoliachik / layoutanimationcustom.js
Last active Jan 31, 2016
LayoutAnimation Custom Example
View layoutanimationcustom.js
// Spring
var CustomLayoutSpring = {
duration: 400,
create: {
type: LayoutAnimation.Types.spring,
property: LayoutAnimation.Properties.scaleXY,
springDamping: 0.7,
},
update: {
@Jpoliachik
Jpoliachik / gist:00b76d1338c700c05274
Created Jan 31, 2016
Layout Animation Example Spring
View gist:00b76d1338c700c05274
// Called when a top button is pressed, with index corresponding to button title.
onPress(index) {
LayoutAnimation.configureNext(LayoutAnimation.Presets.spring);
this.setState({index: index});
}
@Jpoliachik
Jpoliachik / index.ios.js
Created Jan 31, 2016
LayoutAnimation Example No Animation
View index.ios.js
// Called when a top button is pressed, with index corresponding to button title.
onPress(index) {
this.setState({index: index});
}
@Jpoliachik
Jpoliachik / index.ios.js
Last active Sep 29, 2019
ReactNative LayoutAnimation Example
View index.ios.js
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableOpacity,
LayoutAnimation,
} from 'react-native';
@Jpoliachik
Jpoliachik / TopCropImageAndroid
Last active Dec 31, 2015
For Android:A subclass of ImageView that scales the image as 'TopCrop' The source image will be scaled to match the view and cropped so the top of the image remains fixed at the top of the view. The bottom will crop according to the view height.
View TopCropImageAndroid
/**
* @author Justin Poliachik
*
* This ImageView subclass allows a scale type of 'TopCrop'
* The src image will be scaled to match the view and cropped
* so that the top of the image remains fixed.
* The bottom will crop according to the view height.
*/
public class TopCropImage extends ImageView{
@Jpoliachik
Jpoliachik / BottomCrop ImageView
Created Dec 17, 2013
Android A subclass of ImageView that scales the image as 'BottomCrop' The source image will be scaled to match the view and cropped so the bottom of the image remains fixed at the bottom of the view. The top will crop according to the view height.
View BottomCrop ImageView
/**
* @author Justin Poliachik
*
* This ImageView subclass allows a scale type of 'BottomCrop'
* The src image will be scaled to match the view and cropped
* so that the bottom of the image remains fixed.
* The top will crop according to the view height.
*/
public class BottomCropImage extends ImageView {
You can’t perform that action at this time.