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
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.zip.GZIPInputStream; | |
import java.util.zip.InflaterInputStream; | |
import org.apache.http.Header; | |
import org.apache.http.HeaderElement; | |
import org.apache.http.HttpEntity; | |
import org.apache.http.HttpException; | |
import org.apache.http.HttpRequest; |
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
---------------UTILS.h----------------- | |
#import | |
#import | |
@interface Utils : NSObject | |
+ (void)showErrorToast:(NSString *)message; | |
@end | |
---------------UTILS.m----------------- |
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
2015-05-22 19:59:55.299 wausa[5571:135984] -[HomeViewController imagePager:didScrollToIndex:] 1 | |
2015-05-22 19:59:58.156 wausa[5571:135984] -[ActivityWebViewController superview]: unrecognized selector sent to instance 0x7fe4d485eeb0 | |
2015-05-22 19:59:58.201 wausa[5571:135984] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ActivityWebViewController superview]: unrecognized selector sent to instance 0x7fe4d485eeb0' | |
*** First throw call stack: | |
( | |
0 CoreFoundation 0x0000000107cafc65 __exceptionPreprocess + 165 | |
1 libobjc.A.dylib 0x000000010752ebb7 objc_exception_throw + 45 | |
2 CoreFoundation 0x0000000107cb70ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 | |
3 CoreFoundation 0x0000000107c0d13c ___forwarding___ + 988 | |
4 CoreFoundation 0x0000000107c0ccd8 _CF_forwarding_prep_0 + 120 |
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
// | |
// UIViewController+Alerts.h | |
// | |
// Created by Dave Wood on 2012-01-17. | |
// | |
// Simplified BSD License | |
// Copyright (c) 2012, Cerebral Gardens | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without |
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.aracem.utils.animations.pagetransformation; | |
import org.jetbrains.annotations.NotNull; | |
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
import java.util.ArrayList; | |
import java.util.List; |
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.aracem.utils.animations.pagetransformation; | |
import org.jetbrains.annotations.NotNull; | |
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
import java.util.ArrayList; | |
import java.util.List; |
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
#import "FeedsWallViewController.h" | |
#import "FeedsWallImageCell.h" | |
#import <ImageIO/ImageIO.h> | |
#import <AFNetworking/AFNetworking.h> | |
#import "FeedsAppColors.h" | |
#import "UIImageView+AFNetworking.h" | |
#import <ImageIO/ImageIO.h> | |
#import "Utils.h" |
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
ImageView imageView = (ImageView) findViewById(R.id.card_thumbnail_image); | |
Bitmap mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.rose); | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ | |
//Default | |
imageView.setBackgroundResource(R.drawable.rose); | |
} else { | |
//RoundCorners | |
RoundCornersDrawable round = new RoundCornersDrawable(mBitmap, | |
getResources().getDimension(R.dimen.cardview_default_radius), 0); //or your custom radius |
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 ColoredSnackBar { | |
private static final int red = 0xfff44336; | |
private static final int green = 0xff4caf50; | |
private static final int blue = 0xff2195f3; | |
private static final int orange = 0xffffc107; | |
private static View getSnackBarLayout(Snackbar snackbar) { | |
if (snackbar != null) { |
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
import android.graphics.*; | |
import com.squareup.picasso.Transformation; | |
/** | |
* Transforms an image into a circle representation. Such as a avatar. | |
*/ | |
public class CircularTransformation implements Transformation | |
{ | |
int radius = 10; |