###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<integer name="design_snackbar_text_max_lines">5</integer> | |
</resources> |
###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
package com.example.marcin.splitlayout; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.PorterDuff; | |
import android.graphics.PorterDuffXfermode; | |
import android.graphics.Region; |
/** | |
* Scale to center top or scale to center bottom | |
* | |
* @author sromku | |
*/ | |
public class ImageScaleView extends ImageView { | |
private MatrixCropType mMatrixType = MatrixCropType.TOP_CENTER; // default | |
private enum MatrixCropType { |
Bitmap batmapBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.batman); | |
RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), batmapBitmap); | |
// option 1 h/t [Chris Banes](https://chris.banes.me/) | |
circularBitmapDrawable.setCornerRadius(batmapBitmap.getWidth()); | |
// option 2 h/t @csorgod in the comments | |
circularBitmapDrawable.setCircular(true); |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; |
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.myapplication" > | |
<application | |
android:allowBackup="true" | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" | |
android:theme="@style/AppTheme" > | |
<activity |
public class CancelableCallback<T> implements Callback<T> { | |
private Callback<T> callback; | |
private boolean canceled; | |
public CancelableCallback(Callback<T> callback) { | |
this.callback = callback; | |
canceled = false; | |
} |
public class PhotoQuestionAnswer extends FrameLayout { | |
@InjectView(R.id.photo) PicassoImageView photoIv; | |
public PhotoQuestionAnswer(Context context) { | |
this(context, null); | |
} | |
public PhotoQuestionAnswer(Context context, AttributeSet attrs) { | |
this(context, attrs, 0); |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\