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
public class LineDrawable extends Drawable { | |
private Context context; | |
private final Paint paint; | |
public LineDrawable(Context context) { | |
this.context = context; | |
paint = new Paint(); | |
paint.setStyle(Paint.Style.STROKE); |
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
public class HorizontalLineSpan extends ReplacementSpan { | |
private Context context; | |
public HorizontalLineSpan(Context context) { | |
this.context = context; | |
} | |
@Override |
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.devone.haute.ui; | |
import android.app.ActivityManager; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.content.IntentFilter; | |
import android.graphics.Typeface; | |
import android.net.Uri; | |
import android.os.Build; |
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
private class PagerAdapter extends android.support.v4.view.PagerAdapter { | |
// ... | |
private final Pattern patternBullet = Pattern.compile("[a-zA-Z0-9 ]+\\n"); | |
private final Pattern patternLine = Pattern.compile("~"); | |
private final String[] descriptions = new String[]{ | |
"Unlimited Albums\n~\n" + | |
"5 Customer Profiles\n~\n" + |
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
/** | |
# Please write a function that gets a text and tries to guess the possible languages of the text. | |
# | |
# Pangrams: Contains all the letters in an alpahabet of a language. | |
# | |
# English => The quick brown fox jumps over the lazy dog | |
# German => Zwölf Boxkämpfer jagen Viktor quer über den großen Sylter Deich | |
# Turkish => Pijamalı hasta yağız şoföre çabucak güvendi | |
# |
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
val ProjectDescriptor.descendants: Sequence<ProjectDescriptor> | |
get() = children.asSequence().flatMap { sequenceOf(it) + it.descendants } | |
gradle.settingsEvaluated { | |
rootProject.descendants.forEach { | |
// Given path - :tooling:idea-plugin OR :tooling-idea-plugin | |
val path = it.path | |
// after splitting - [tooling, idea, plugin] |