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
#!/bin/sh | |
set -e | |
appId=$1 | |
dst=/sdcard/container-${appId} | |
tar=/sdcard/container-${appId}.tar.gz | |
backup_file=${appId}.ab | |
rm -f $backup_file |
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
task migrateMipmap << { | |
fileTree('src').include('**/res/drawable*/ic_launcher.png').each { icon -> | |
final p = file(icon.parent.replaceAll("drawable", "mipmap")) | |
p.mkdirs() | |
final dest = new File(p, icon.name) | |
icon.renameTo(dest) | |
} | |
} |
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.media.MediaRecorder; | |
import android.support.annotation.NonNull; | |
import com.f2prateek.rx.android.schedulers.AndroidSchedulers; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.concurrent.TimeUnit; | |
import rx.Observable; | |
import rx.subscriptions.Subscriptions; | |
public class RxMediaRecorder { |
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
/* | |
MIT License | |
Copyright (c) 2015 Adel Nizamutdinov | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import org.jetbrains.annotations.NotNull; | |
import org.jetbrains.annotations.Nullable; | |
public class EmptyRecyclerView extends RecyclerView { | |
@Nullable View emptyView; |
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
final tree = fileTree("./assets").include('**/*@*dpi.png') | |
String normalize(String src) { | |
return src.replaceAll(/ /, "_") | |
} | |
tree.each { f -> | |
final m = f.name =~ /(.*)@(.*dpi)\.png/ | |
final name = m[0][1] | |
final density = m[0][2] |
NewerOlder