class CubeTransformer : ViewPager.PageTransformer {
override fun transformPage(view: View, position: Float) {
val deltaY = 0.5F
view.pivotX = if (position < 0F) view.width.toFloat() else 0F
view.pivotY = view.height * deltaY
view.rotationY = 45F * position
This file contains hidden or 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
/** | |
* This is simple HTTP local server for streaming InputStream to apps which are capable to read data from url. | |
* Random access input stream is optionally supported, depending if file can be opened in this mode. | |
* | |
* from: http://stackoverflow.com/a/9096241 | |
*/ | |
public class StreamOverHttp{ | |
private static final boolean debug = false; | |
private final Browser.FileEntry file; |
This file contains hidden or 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.example.columnspacing | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v7.widget.GridLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.Log; | |
import android.view.View; |
This file contains hidden or 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
/* | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
WARNING!!! | |
NO, SERIOUSLY. REAL WARNING!!! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
This file contains hidden or 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
/* | |
* Copyright 2018 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 |