- Add image named "pattern" to assets.
- Enable slicing, to make the pattern/image repeatable.
- Click the image
- Select 2x
- Click 'Show Slicing'
- Select option with cross icon
- Drag all lines to 4 corners.
| // | |
| // ArrayDiff.swift | |
| // | |
| // Created by Frank A. Krueger on 6/30/15. | |
| // Copyright © 2015 Krueger Systems, Inc. All rights reserved. | |
| // License: MIT http://opensource.org/licenses/MIT | |
| // | |
| import Foundation |
| //Swift 4+ | |
| import Foundation | |
| ///given formula for representing bits in in number | |
| /// bits[index]*(-2)^index | |
| func getNumber(from bits:[Int]) -> Int{ | |
| var number = 0 | |
| for (index, value) in bits.enumerated(){ | |
| number = number + value * Int(powf(-2, Float(index))) | |
| } |
| import android.os.SystemClock; | |
| import android.support.animation.DynamicAnimation; | |
| import android.support.animation.SpringAnimation; | |
| import android.support.animation.SpringForce; | |
| import android.view.MotionEvent; | |
| import android.view.View; | |
| import java.lang.ref.SoftReference; | |
| /** |
| import android.content.Context; | |
| import android.graphics.PointF; | |
| import android.support.v7.widget.LinearSmoothScroller; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.util.AttributeSet; | |
| import android.util.DisplayMetrics; | |
| import android.util.TypedValue; | |
| import android.view.MotionEvent; | |
| /** |
| package com..example; | |
| import android.content.Context; | |
| import android.support.annotation.NonNull; | |
| import android.support.annotation.Nullable; | |
| import android.util.AttributeSet; | |
| /** | |
| * Created by SachinR on 7/21/2017. | |
| */ |
| /* | |
| * Copyright (C) 2014 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |