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
class CustomTextView extends View { | |
private static final String SUPERSTATE = "superState", TEXT = "text", | |
TEXTSIZE = "textsize"; | |
private String mText = ""; | |
private Paint mTextPaint; | |
private int mTextSize, mTextX, mTextY, mCenter; | |
public CustomTextView(Context context) { | |
this(context, 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
class RotationMatrix { | |
/** | |
* Draws the data from SurfaceTexture onto the current EGL surface. | |
*/ | |
public void draw(boolean flipY, boolean flipX) { | |
float[] normaliseMatrix = new float[16]; | |
// unfortunately this gives unconsistent results, so we'll perform all fixes manually | |
//mSurfaceTexture.getTransformMatrix(normaliseMatrix); | |
System.arraycopy(IDENTITY, 0, normaliseMatrix, 0, IDENTITY.length); |
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.company.components; | |
import android.animation.Animator; | |
import android.animation.ObjectAnimator; | |
import android.animation.ValueAnimator; | |
import android.graphics.Canvas; | |
import android.graphics.ColorFilter; | |
import android.graphics.Paint; | |
import android.graphics.PixelFormat; | |
import android.graphics.Rect; |