Skip to content

Instantly share code, notes, and snippets.

View CFM880's full-sized avatar
🎉
Focusing

Cheng Fangming CFM880

🎉
Focusing
View GitHub Profile
NDK_ROOT=$ANDROID_NDK
PREBUILT=$NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
PLATFORM=$NDK_ROOT/platforms/android-9/arch-arm
export PATH=$PATH:$PREBUILT/bin:$PLATFORM/usr/include:
export LDFLAGS="-L$PLATFORM/usr/lib -L$PREBUILT/arm-linux-androideabi/lib -march=armv7-a"
export CFLAGS="-I$PLATFORM/usr/include -march=armv7-a -mfloat-abi=softfp -O2"
export CPPFLAGS="$CFLAGS"
export CFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="$LDFLAGS"
NDK_ROOT=$ANDROID_NDK
PREBUILT=$NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
PLATFORM=$NDK_ROOT/platforms/android-9/arch-arm
export PATH=$PATH:$PREBUILT/bin:$PLATFORM/usr/include:
export LDFLAGS="-L$PLATFORM/usr/lib -L$PREBUILT/arm-linux-androideabi/lib -march=armv7-a"
export CFLAGS="-I$PLATFORM/usr/include -march=armv7-a -mfloat-abi=softfp -O2"
export CPPFLAGS="$CFLAGS"
export CFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="$LDFLAGS"
@CFM880
CFM880 / build_lame_armv7.sh
Created April 23, 2019 00:25
lame Android Build shell
NDK_ROOT=$ANDROID_NDK
PREBUILT=$NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
PLATFORM=$NDK_ROOT/platforms/android-9/arch-arm
export PATH=$PATH:$PREBUILT/bin:$PLATFORM/usr/include:
export LDFLAGS="-L$PLATFORM/usr/lib -L$PREBUILT/arm-linux-androideabi/lib -march=armv7-a"
export CFLAGS="-I$PLATFORM/usr/include -march=armv7-a -mfloat-abi=softfp -O2"
export CPPFLAGS="$CFLAGS"
export CFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="$LDFLAGS"
@CFM880
CFM880 / conv.sh
Created February 20, 2019 14:59
iconv批量带目录转换编码(iconv batch with directory conversion encoding)
if [ $# != 4 ]
then
echo -e "\n脚本需要四个参数"
echo -e " 参数1: 原始编码格式\n 参数2:目标编码格式\n 参数3: 待转码的文件目录\n 参数4: 转码后的文件目录\n"
echo -e "示例: icon.sh from_encoding to_encoding in_dir out_dir\n"
exit
else
FROM_ENCODING=$1
TO_ENCODING=$2
IN_DIR=$3
@CFM880
CFM880 / Readme.md
Created April 14, 2017 06:09 — forked from gabrielemariotti/Readme.md
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example: