Setting imageView from Firebase storage [duplicate]
This question already has an answer here:
Unable to Show Image In ImageView From Firebase Storage
2 answers
How can I set an image to an imageView directly from Firebase, given I already have the url to the user's uploaded image?
android firebase android-imageview firebase-storage
marked as duplicate by jww, Alex Mamo
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Nov 12 '18 at 19:49
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Unable to Show Image In ImageView From Firebase Storage
2 answers
How can I set an image to an imageView directly from Firebase, given I already have the url to the user's uploaded image?
android firebase android-imageview firebase-storage
marked as duplicate by jww, Alex Mamo
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Nov 12 '18 at 19:49
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You can use Any networking library . Volley or Retrofit or Picasso
– Rohit Singh
Nov 12 '18 at 8:18
Show code how do you display image?
– Piyush
Nov 12 '18 at 8:27
1
Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com
– jww
Nov 12 '18 at 9:45
add a comment |
This question already has an answer here:
Unable to Show Image In ImageView From Firebase Storage
2 answers
How can I set an image to an imageView directly from Firebase, given I already have the url to the user's uploaded image?
android firebase android-imageview firebase-storage
This question already has an answer here:
Unable to Show Image In ImageView From Firebase Storage
2 answers
How can I set an image to an imageView directly from Firebase, given I already have the url to the user's uploaded image?
This question already has an answer here:
Unable to Show Image In ImageView From Firebase Storage
2 answers
android firebase android-imageview firebase-storage
android firebase android-imageview firebase-storage
edited Nov 12 '18 at 11:40
KENdi
5,8192821
5,8192821
asked Nov 12 '18 at 8:16
James EleJames Ele
1918
1918
marked as duplicate by jww, Alex Mamo
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Nov 12 '18 at 19:49
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by jww, Alex Mamo
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Nov 12 '18 at 19:49
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You can use Any networking library . Volley or Retrofit or Picasso
– Rohit Singh
Nov 12 '18 at 8:18
Show code how do you display image?
– Piyush
Nov 12 '18 at 8:27
1
Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com
– jww
Nov 12 '18 at 9:45
add a comment |
You can use Any networking library . Volley or Retrofit or Picasso
– Rohit Singh
Nov 12 '18 at 8:18
Show code how do you display image?
– Piyush
Nov 12 '18 at 8:27
1
Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com
– jww
Nov 12 '18 at 9:45
You can use Any networking library . Volley or Retrofit or Picasso
– Rohit Singh
Nov 12 '18 at 8:18
You can use Any networking library . Volley or Retrofit or Picasso
– Rohit Singh
Nov 12 '18 at 8:18
Show code how do you display image?
– Piyush
Nov 12 '18 at 8:27
Show code how do you display image?
– Piyush
Nov 12 '18 at 8:27
1
1
Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com
– jww
Nov 12 '18 at 9:45
Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com
– jww
Nov 12 '18 at 9:45
add a comment |
3 Answers
3
active
oldest
votes
You can use image loading library like Glide or Picasso,
1st add the dependency in build.gradle (Moduke:App) under dependencies,
dependencies
....
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
Then at the activity where your image view is load the image from url:
Glide.with(this).load(IMAGE_URL).into(imageView);
IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.
Follow https://bumptech.github.io/glide/ for more info
add a comment |
if you have image URL available at client side. Implement
GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.
ImageView imageView = findViewById(R.id.imageView_ID);
RequestOptions requestOption = new RequestOptions()
.placeholder(R.drawable.placeholder)
.error(R.drawable.ic_error_1)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.priority(Priority.HIGH)
.dontAnimate()
.dontTransform()
new Glide
.with(mcontext)
.load("https://placeholder.com/img/products/imageurl.png")
.apply(requestOption)
.thumbnail(0.1f)
.into(imageView)
add dependency
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
add a comment |
private CircleImageView uDisplayImage;
currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();
String uId = currentFirebaseUser.getUid();
myRef = firebaseDatabase.getReference("user").child(uId);
myRef.addValueEventListener(new ValueEventListener()
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot)
image = dataSnapshot.child("image").getValue().toString();
if (!image.equals("default"))
Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);
@Override
public void onCancelled(@NonNull DatabaseError databaseError)
Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();
);
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.71828'
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use image loading library like Glide or Picasso,
1st add the dependency in build.gradle (Moduke:App) under dependencies,
dependencies
....
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
Then at the activity where your image view is load the image from url:
Glide.with(this).load(IMAGE_URL).into(imageView);
IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.
Follow https://bumptech.github.io/glide/ for more info
add a comment |
You can use image loading library like Glide or Picasso,
1st add the dependency in build.gradle (Moduke:App) under dependencies,
dependencies
....
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
Then at the activity where your image view is load the image from url:
Glide.with(this).load(IMAGE_URL).into(imageView);
IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.
Follow https://bumptech.github.io/glide/ for more info
add a comment |
You can use image loading library like Glide or Picasso,
1st add the dependency in build.gradle (Moduke:App) under dependencies,
dependencies
....
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
Then at the activity where your image view is load the image from url:
Glide.with(this).load(IMAGE_URL).into(imageView);
IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.
Follow https://bumptech.github.io/glide/ for more info
You can use image loading library like Glide or Picasso,
1st add the dependency in build.gradle (Moduke:App) under dependencies,
dependencies
....
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
Then at the activity where your image view is load the image from url:
Glide.with(this).load(IMAGE_URL).into(imageView);
IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.
Follow https://bumptech.github.io/glide/ for more info
answered Nov 12 '18 at 8:55
AmrAmr
113
113
add a comment |
add a comment |
if you have image URL available at client side. Implement
GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.
ImageView imageView = findViewById(R.id.imageView_ID);
RequestOptions requestOption = new RequestOptions()
.placeholder(R.drawable.placeholder)
.error(R.drawable.ic_error_1)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.priority(Priority.HIGH)
.dontAnimate()
.dontTransform()
new Glide
.with(mcontext)
.load("https://placeholder.com/img/products/imageurl.png")
.apply(requestOption)
.thumbnail(0.1f)
.into(imageView)
add dependency
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
add a comment |
if you have image URL available at client side. Implement
GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.
ImageView imageView = findViewById(R.id.imageView_ID);
RequestOptions requestOption = new RequestOptions()
.placeholder(R.drawable.placeholder)
.error(R.drawable.ic_error_1)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.priority(Priority.HIGH)
.dontAnimate()
.dontTransform()
new Glide
.with(mcontext)
.load("https://placeholder.com/img/products/imageurl.png")
.apply(requestOption)
.thumbnail(0.1f)
.into(imageView)
add dependency
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
add a comment |
if you have image URL available at client side. Implement
GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.
ImageView imageView = findViewById(R.id.imageView_ID);
RequestOptions requestOption = new RequestOptions()
.placeholder(R.drawable.placeholder)
.error(R.drawable.ic_error_1)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.priority(Priority.HIGH)
.dontAnimate()
.dontTransform()
new Glide
.with(mcontext)
.load("https://placeholder.com/img/products/imageurl.png")
.apply(requestOption)
.thumbnail(0.1f)
.into(imageView)
add dependency
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
if you have image URL available at client side. Implement
GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.
ImageView imageView = findViewById(R.id.imageView_ID);
RequestOptions requestOption = new RequestOptions()
.placeholder(R.drawable.placeholder)
.error(R.drawable.ic_error_1)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.priority(Priority.HIGH)
.dontAnimate()
.dontTransform()
new Glide
.with(mcontext)
.load("https://placeholder.com/img/products/imageurl.png")
.apply(requestOption)
.thumbnail(0.1f)
.into(imageView)
add dependency
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
edited Nov 12 '18 at 9:53
jww
53.3k40230504
53.3k40230504
answered Nov 12 '18 at 8:53
Chethan KumarChethan Kumar
123110
123110
add a comment |
add a comment |
private CircleImageView uDisplayImage;
currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();
String uId = currentFirebaseUser.getUid();
myRef = firebaseDatabase.getReference("user").child(uId);
myRef.addValueEventListener(new ValueEventListener()
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot)
image = dataSnapshot.child("image").getValue().toString();
if (!image.equals("default"))
Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);
@Override
public void onCancelled(@NonNull DatabaseError databaseError)
Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();
);
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.71828'
add a comment |
private CircleImageView uDisplayImage;
currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();
String uId = currentFirebaseUser.getUid();
myRef = firebaseDatabase.getReference("user").child(uId);
myRef.addValueEventListener(new ValueEventListener()
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot)
image = dataSnapshot.child("image").getValue().toString();
if (!image.equals("default"))
Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);
@Override
public void onCancelled(@NonNull DatabaseError databaseError)
Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();
);
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.71828'
add a comment |
private CircleImageView uDisplayImage;
currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();
String uId = currentFirebaseUser.getUid();
myRef = firebaseDatabase.getReference("user").child(uId);
myRef.addValueEventListener(new ValueEventListener()
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot)
image = dataSnapshot.child("image").getValue().toString();
if (!image.equals("default"))
Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);
@Override
public void onCancelled(@NonNull DatabaseError databaseError)
Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();
);
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.71828'
private CircleImageView uDisplayImage;
currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();
String uId = currentFirebaseUser.getUid();
myRef = firebaseDatabase.getReference("user").child(uId);
myRef.addValueEventListener(new ValueEventListener()
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot)
image = dataSnapshot.child("image").getValue().toString();
if (!image.equals("default"))
Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);
@Override
public void onCancelled(@NonNull DatabaseError databaseError)
Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();
);
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.71828'
answered Nov 12 '18 at 19:42
Vishal SharmaVishal Sharma
7822212
7822212
add a comment |
add a comment |
You can use Any networking library . Volley or Retrofit or Picasso
– Rohit Singh
Nov 12 '18 at 8:18
Show code how do you display image?
– Piyush
Nov 12 '18 at 8:27
1
Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com
– jww
Nov 12 '18 at 9:45