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
| var isOriginalImageLoaded = false | |
| // Thumbnail Request | |
| val thumbRequest = ImageRequest.Builder(ctx) | |
| .data(thumbUrl) | |
| .target( | |
| onSuccess = { result -> | |
| // If highRes image is not loaded yet, | |
| // show the thumbnail | |
| if (!isOriginalImageLoaded) { |
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
| package be.digitalia.common.widgets; | |
| import android.annotation.SuppressLint; | |
| import android.annotation.TargetApi; | |
| import android.content.Context; | |
| import android.graphics.Rect; | |
| import android.os.Build; | |
| import android.support.v4.util.ObjectsCompat; | |
| import android.util.AttributeSet; | |
| import android.view.View; |
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
| NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
| Download the following ZIPs: | |
| ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
| Download the correct GApps for your Android version: | |
| Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
| Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
| Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
ふとFoursquareアプリのLicense表示を見たら便利そうなライブラリを発見して便利だったので紹介。
MergeAdapterは、google groupsとかstackoverflowでAndroidの問題を探しているとかなりの頻度で目にするMark Murphy(@commonsguy) さんが作成した便利なAdapterです。
MergeAdapter accepts a mix of Adapters and Views and presents them as one contiguous whole to whatever ListView it is poured into. This is good for cases where you have multiple data sources, or if you have a handful of ordinary Views to mix in with lists of data, or the like.
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 java.io.IOException; | |
| import java.io.OutputStream; | |
| import android.graphics.Bitmap; | |
| import android.graphics.Bitmap.Config; | |
| import android.graphics.Canvas; | |
| import android.graphics.Paint; | |
| public class AnimatedGifEncoder { | |
| protected int width; // image size |
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
| // Patch in | |
| task launchDebug(dependsOn: 'installDebug') << { | |
| final String cmdline = "bash ${projectDir}/../gradle/start-intent.sh android.intent.action.MAIN ${project.tasks.generateDebugBuildConfig.appPackageName} .activity.MainActivity" | |
| final Process p = cmdline.execute() | |
| p.in.eachLine { l -> println l } | |
| final int code = p.waitFor() | |
| if (code != 0) { | |
| throw new RuntimeException("Task exited with code " + code + ": " + cmdline) | |
| } | |
| } |
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
| apply plugin: 'eclipse' | |
| apply plugin: 'maven' | |
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath 'org.apache.commons:commons-email:1.2' | |
| } |
NewerOlder