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 abstract class CursorPagerAdapter extends PagerAdapter { | |
| public static final String TAG = CursorPagerAdapter.class.getSimpleName(); | |
| protected WeakReference<Context> ctxRef; | |
| protected boolean mDataValid; | |
| protected boolean mAutoRequery; | |
| protected Cursor mCursor; | |
| protected int mRowIDColumn; |
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
| <!-- You can change the parent around to whatever you normally use --> | |
| <style name="DebugColors" parent="Theme.AppCompat"> | |
| <!-- System colors --> | |
| <item name="android:windowBackground">@color/__debugWindowBackground</item> | |
| <item name="android:colorPressedHighlight">#FF4400</item> | |
| <item name="android:colorLongPressedHighlight">#FF0044</item> | |
| <item name="android:colorFocusedHighlight">#44FF00</item> | |
| <item name="android:colorActivatedHighlight">#00FF44</item> |
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 (C) 2014 skyfish.jy@gmail.com | |
| * | |
| * 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 |
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
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <assert.h> | |
| #include <ft2build.h> | |
| #include FT_FREETYPE_H | |
| #include FT_GLYPH_H | |
| #include FT_OUTLINE_H | |
| #include <hb.h> |
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
| /* | |
| * Author: Felipe Herranz (felhr85@gmail.com) | |
| * Contributors:Francesco Verheye (verheye.francesco@gmail.com) | |
| * Israel Dominguez (dominguez.israel@gmail.com) | |
| */ | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.concurrent.atomic.AtomicBoolean; | |
| import android.os.Handler; |
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
| import android.text.SpannableStringBuilder; | |
| import java.util.ArrayDeque; | |
| import java.util.Deque; | |
| import static android.text.Spanned.SPAN_INCLUSIVE_EXCLUSIVE; | |
| /** A {@link SpannableStringBuilder} wrapper whose API doesn't make me want to stab my eyes out. */ | |
| public class Truss { | |
| private final SpannableStringBuilder builder; | |
| private final Deque<Span> stack; |
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 2013 Scott Alexander-Bown | |
| * | |
| * 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 |
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
| import android.graphics.Bitmap; | |
| import android.graphics.Bitmap.Config; | |
| import android.graphics.BitmapShader; | |
| import android.graphics.Canvas; | |
| import android.graphics.Paint; | |
| import android.graphics.RectF; | |
| import android.graphics.Shader; | |
| // enables hardware accelerated rounded corners | |
| // original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/ |
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
| #!/usr/bin/env bash | |
| # Generate a pseudo UUID | |
| uuid() | |
| { | |
| local N B C='89ab' | |
| for (( N=0; N < 16; ++N )) | |
| do | |
| B=$(( $RANDOM%256 )) |
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
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.view.View; | |
| import android.view.inputmethod.InputMethodManager; | |
| /** | |
| * Utility methods for manipulating the onscreen keyboard | |
| */ | |
| public class KeyboardUtil { |