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
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); | |
Fragment fragment; | |
transaction.setCustomAnimations(anim.slide_in_left, anim.slide_out_right); //built in | |
//transaction.setCustomAnimations(R.anim.slide_in_bottom, R.anim.slide_out_up); //Custom in RES folder | |
transaction.replace(R.id.mainFrame, fragment); | |
transaction.commit(); | |
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 | |
# Install and compile Caffe on NVIDIA Jetson TK1 Development Kit | |
sudo add-apt-repository universe | |
sudo apt-get update | |
sudo apt-get install libprotobuf-dev protobuf-compiler gfortran \ | |
libboost-dev cmake libleveldb-dev libsnappy-dev \ | |
libboost-thread-dev libboost-system-dev \ | |
libatlas-base-dev libhdf5-serial-dev libgflags-dev \ | |
libgoogle-glog-dev liblmdb-dev -y |
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 Google Inc. | |
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */ | |
package com.example.latlnginterpolation; | |
import android.animation.ObjectAnimator; | |
import android.animation.TypeEvaluator; | |
import android.animation.ValueAnimator; | |
import android.annotation.TargetApi; | |
import android.os.Build; |
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
type mogrify >/dev/null 2>&1 || { echo >&2 "» This script requires mogrify. Please install ImageMagick first!"; exit 1; } | |
rm -rf Resources/android/images | |
mkdir Resources/android/images | |
mkdir Resources/android/images/res-xhdpi | |
mkdir Resources/android/images/res-mdpi | |
echo " » Copying the splash screen" | |
cp Resources/iphone/Default.png Resources/android/images/res-mdpi/default.png | |
cp Resources/iphone/[email protected] Resources/android/images/res-xhdpi/default.png |
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
convert +append image_1.png image_2.png new_image_conbined.png |
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
# Adding the "descendantFocusability" attribute to the ScrollView's containing LinearLayout | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical" | |
android:descendantFocusability="blocksDescendants" > |
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
Remane as removing (_iphone) | |
for i in *.png ; do mv "$i" "${i/_iphone*.png/.png}" ; done | |
Rename adding (android_) | |
for file in images*.png; do mv "$file" "android_$file"; done |
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
Screen print | |
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png | |
Screen recording | |
adb shell screenrecord /sdcard/example.mp4 | |
:Desktop user$ adb pull /sdcard/example.mp4 |
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
adb shell getprop | grep ro.boot.serialno |
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
// Change the status bar color => REQUIRES API 21 and above | |
private static int defaultStatusBarColor; | |
public static void changeStatusBarColor(Activity context, boolean change, int color){ | |
if (Build.VERSION.SDK_INT >= 21) | |
{ | |
Window window = context.getWindow(); | |
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); | |
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); |
OlderNewer