Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
| package com.cyrilmottier.android.resourcesadditions; | |
| import android.content.res.Resources; | |
| import android.content.res.XmlResourceParser; | |
| import android.os.Bundle; | |
| import org.xmlpull.v1.XmlPullParser; | |
| import org.xmlpull.v1.XmlPullParserException; | |
| /** | |
| * @author Cyril Mottier |
| package com.vice.viceforandroid.views; | |
| import android.content.Context; | |
| import android.text.TextPaint; | |
| import android.text.TextUtils; | |
| import android.util.AttributeSet; | |
| import android.widget.TextView; | |
| /** | |
| * Created by briangriffey on 11/13/13. |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
| function dex-method-count() { | |
| cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
| } | |
| function dex-method-count-by-package() { | |
| dir=$(mktemp -d -t dex) | |
| baksmali $1 -o $dir | |
| for pkg in `find $dir/* -type d`; do | |
| smali $pkg -o $pkg/classes.dex | |
| count=$(dex-method-count $pkg/classes.dex) | |
| name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.') |
| /* | |
| * Copyright (C) 2013 Square, Inc. | |
| * | |
| * 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 |
| // additional required configuration to hook into the build script | |
| android { | |
| signingConfigs { | |
| release | |
| } | |
| buildTypes { | |
| release { | |
| signingConfig signingConfigs.release | |
| } |
| import java.util.Arrays; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import android.database.Cursor; | |
| import android.database.SQLException; | |
| import android.database.sqlite.SQLiteDatabase; | |
| import android.text.TextUtils; | |
| /** |
| // Apache 2.0 licensed. | |
| import android.content.Context; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.BaseAdapter; | |
| /** An implementation of {@link BaseAdapter} which uses the new/bind pattern for its views. */ | |
| public abstract class BindableAdapter<T> extends BaseAdapter { |
| import javax.annotation.Nonnull; | |
| import android.app.Activity; | |
| import android.app.Service; | |
| import android.support.v4.app.Fragment; | |
| import android.content.Context; | |
| /** | |
| * <p>Retrieves the {@link dagger.ObjectGraph} and injects dependencies.</p> | |
| * @author Dandré Allison |
| public class QuickReturn { | |
| private final static int ANIMATION_DURATION_MILLIS = 250; | |
| private final ListView listView; | |
| private final View quickReturnView; | |
| private final View headerPlaceholder; | |
| private int itemCount; | |
| private int itemOffsetY[]; |