Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void display(Etablissements Etab) {
- currentEtab = Etab;
- this.name.setText(Etab.getName());
- this.label.setText(Etab.getLabel());
- String ImagePath = Environment.getExternalStorageDirectory().toString()+"/saved_images/";
- File imgFile = new File(ImagePath+Etab.getImg());
- if(imgFile.exists()){
- Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
- if(myBitmap==null){
- this.img.setImageResource(R.drawable.ens);
- }else{
- this.img.setImageBitmap(myBitmap);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement