This file contains 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/bash | |
f=$(pwd) | |
mkdir drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi | |
# fake argv and argc in bash | |
argc=$#; argv[0]=$0 # argv[0] is a prog name | |
for foo in $( seq $argc ) | |
do |
This file contains 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/bash | |
# Android 4.3+ changes app's internal directory permissions and you can not just pull your | |
# databases to your computer, so I did this as a workaround to extract my databases. | |
# I only use it for debug, use it under your responsability. | |
package=$1 | |
db_name=$2 | |
path="/data/data/$package/" |
This file contains 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.support.v4.view.ViewPager; | |
import android.view.View; | |
public class FlipPageViewTransformer implements ViewPager.PageTransformer { | |
@Override | |
public void transformPage(View page, float position) { | |
float percentage = 1 - Math.abs(position); | |
page.setCameraDistance(12000); | |
setVisibility(page, position); | |
setTranslation(page); |