Commit 27ab08a2 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Delete class and drawables.

parent 10a85320
package chat.rocket.android.widget.helper;
import android.net.Uri;
import android.support.graphics.drawable.VectorDrawableCompat;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.drawee.drawable.ProgressBarDrawable;
import com.facebook.drawee.generic.GenericDraweeHierarchy;
import com.facebook.drawee.interfaces.DraweeController;
import com.facebook.drawee.view.SimpleDraweeView;
import chat.rocket.android.widget.R;
public class FrescoHelper {
private FrescoHelper() {
}
public static void setupDraweeAndLoadImage(String imageUrl, SimpleDraweeView draweeView) {
setupDrawee(draweeView);
loadImage(imageUrl, draweeView);
}
public static void setupDrawee(SimpleDraweeView draweeView) {
final GenericDraweeHierarchy hierarchy = draweeView.getHierarchy();
hierarchy.setPlaceholderImage(VectorDrawableCompat.create(draweeView.getResources(), R.drawable.image_dummy, null));
hierarchy.setFailureImage(VectorDrawableCompat.create(draweeView.getResources(), R.drawable.image_error, null));
hierarchy.setProgressBarImage(new ProgressBarDrawable());
}
public static void loadImage(String imageUrl, SimpleDraweeView draweeView) {
final DraweeController controller = Fresco.newDraweeControllerBuilder()
.setUri(Uri.parse(imageUrl))
.setAutoPlayAnimations(true)
.setTapToRetryEnabled(true)
.build();
draweeView.setController(controller);
}
}
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#C2D1DA"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z"/>
</vector>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:pathData="M3,0L21,0A3,3 0,0 1,24 3L24,21A3,3 0,0 1,21 24L3,24A3,3 0,0 1,0 21L0,3A3,3 0,0 1,3 0z"
android:fillColor="#C2D1DA"/>
<path
android:pathData="M11.594,11.869C12.928,11.869 14.01,10.555 14.01,8.934C14.01,7.314 13.655,6 11.594,6C9.534,6 9.178,7.314 9.178,8.934C9.178,10.555 10.26,11.869 11.594,11.869Z"
android:fillColor="#5D8298"/>
<path
android:pathData="M16.152,16.231C16.107,13.408 15.739,12.603 12.917,12.094C12.917,12.094 12.52,12.6 11.594,12.6C10.669,12.6 10.271,12.094 10.271,12.094C7.481,12.598 7.089,13.39 7.038,16.139C7.034,16.364 7.032,16.375 7.031,16.349C7.031,16.398 7.032,16.488 7.032,16.646C7.032,16.646 7.703,18 11.594,18C15.485,18 16.157,16.646 16.157,16.646C16.157,16.545 16.157,16.474 16.157,16.426C16.156,16.443 16.155,16.411 16.152,16.231Z"
android:fillColor="#5D8298"/>
</vector>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment