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
@BindingAdapter("bind:imageUrl") | |
public static void loadImage(ImageView imageView, String v) { | |
Picasso.with(imageView.getContext()).load(v).into(imageView); | |
} | |
app:imageUrl="@{movie.image}" |
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
@OnClick(R.id.fabupload) | |
public void upload(){ | |
Toast.makeText(MainActivity.this, "click", Toast.LENGTH_SHORT).show(); | |
MultipartBody.Builder builder = new MultipartBody.Builder() | |
.setType(MultipartBody.FORM); | |
for(int i = 0 ; i < images_path.size() ; i++) { |
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
public abstract class BaseAdapter< T extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<T> { | |
protected static final int ITEM_VIEW_TYPE_ITEM = 1; | |
protected boolean animateItemsOnScroll = true; | |
protected int defaultItemAnimationDuration = 0; | |
protected int lastAnimatedPosition = -1; | |
protected long nextAnimationStartTime; | |
protected static final int ANIMATION_DELAY_INTERVAL = 50; | |
protected final Handler handler = new Handler(Looper.getMainLooper()); |
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
void fixMediaDir() { | |
File sdcard = Environment.getExternalStorageDirectory(); | |
if (sdcard != null) { | |
File mediaDir = new File(sdcard, "DCIM/Camera"); | |
if (!mediaDir.exists()) { | |
mediaDir.mkdirs(); | |
} | |
} | |
} |
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: 'com.android.application' | |
apply plugin: 'android-apt' | |
// Apply plugin | |
apply plugin: 'com.neenbedankt.android-apt' | |
apply plugin: 'me.tatarka.retrolambda' | |
apply plugin: 'com.fernandocejas.frodo' | |
apply plugin: 'realm-android' | |
android { | |
compileSdkVersion rootProject.ext.compileSdkVersion |
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
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Circle Internet Financial | |
* | |
* 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
public class carTrackerActivity extends LocationTrackerActivity { | |
private GoogleMap mMap; | |
private static final LatLng MELBOURNE = new LatLng(-37.81319, 144.96298); | |
private static final LatLng SYDNEY = new LatLng(-33.87365, 151.20689); | |
private static final LatLng ADELAIDE = new LatLng(-34.92873, 138.59995); |
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 com.firebase.client; | |
import com.firebase.client.core.Constants; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.functions.Action0; | |
import rx.functions.Func1; | |
import rx.subscriptions.Subscriptions; | |
public class RxFirebase { |
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
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2' | |
Picasso picasso = new Picasso.Builder(getApplicationContext()) | |
.downloader(new OkHttp3Downloader(this)) | |
.build(); | |
//picasso.setIndicatorsEnabled(true); |
OlderNewer