Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DetailActivity extends AppCompatActivity {
- private ImageView fotoBukti;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_detail);
- fotoBukti = (ImageView) findViewById(R.id.imgPreviewDetail);
- LazyHeaders auth = new LazyHeaders.Builder() // can be cached in a field and reused
- .addHeader("Authorization", new BasicAuthorization("username", "password"))
- .build();
- imageSrc = extras.getString("IMAGE");
- imageLink = "http://bawaslu-ftp.pptik.id:5000/" + imageSrc;
- Glide
- .with(getApplicationContext())
- .load(new GlideUrl(imageLink, auth)) // GlideUrl is created anyway so there's no extra objects allocated
- .into(fotoBukti);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement