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.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; |
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.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.util.AttributeSet; | |
import android.view.View; | |
public class TextMarker extends View { | |
Paint paint; |
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.content.Context | |
import android.graphics.Bitmap | |
import android.support.v8.renderscript.Allocation | |
import android.support.v8.renderscript.Element | |
import android.support.v8.renderscript.RenderScript | |
import android.support.v8.renderscript.ScriptIntrinsicBlur | |
fun blur(context: Context, bitmap: Bitmap, radius: Float) { | |
val renderScript: RenderScript = RenderScript.create(context) | |
val blurShader: ScriptIntrinsicBlur = ScriptIntrinsicBlur.create(renderScript, Element.U8_4(renderScript)) |
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
git -c core.fileMode=false diff // ignore file mode change for this one command | |
git clean -i // remove unstaged files interactively | |
git rebase -i --root // rebase entire history interactively |
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
<?xml version="1.0" encoding="utf-8"?> | |
<carbon.widget.LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/carbon_white"> | |
<carbon.widget.FrameLayout | |
android:layout_width="match_parent" | |
android:layout_height="160dp" |
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
// declare an attribute, a style and a styleable in attrs.xml | |
// use attribute only once? Declare and use in one line | |
// want to reuse android attribute? Use 'android:' namespace | |
// use prefixes for your attributes to avoid conflicts with other libraries | |
<resources> | |
// declaration | |
<attr name="carbon_rippleColor" format="reference|color"/> | |
// style reference for use in themes |
OlderNewer