Skip to content

Instantly share code, notes, and snippets.

@evandroferreiras
Last active December 6, 2018 12:14
Show Gist options
  • Save evandroferreiras/04e61e6ed99b362f8b0fa92f5fab2b8d to your computer and use it in GitHub Desktop.
Save evandroferreiras/04e61e6ed99b362f8b0fa92f5fab2b8d to your computer and use it in GitHub Desktop.
package com.example.pkg.myimageview;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import com.example.pkg.myimageviewlibrary.MyImageViewBasic;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
MyImageViewBasic myImageViewBasic = findViewById(R.id.blackAndWhiteImage);
myImageViewBasic.setUrlImage("https://user-images.githubusercontent.com/3903012/49407038-72272080-f73e-11e8-807f-50fdc4f2d157.jpg" ,R.drawable.error,
R.drawable.placeholder, ImageView.ScaleType.CENTER_CROP);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment