Skip to content

Instantly share code, notes, and snippets.

Avatar
🖥️
Kotlin Mascot

Efeturi Money efemoney

🖥️
Kotlin Mascot
View GitHub Profile
View pangram.kt
/**
# 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
#
View PagerAdapter.java
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" +
View SubscriptionActivity.java
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;
View HorizontalLineSpan.java
public class HorizontalLineSpan extends ReplacementSpan {
private Context context;
public HorizontalLineSpan(Context context) {
this.context = context;
}
@Override
View LineDrawable.java
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);