Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

523
Views
What is the difference between an Icon and an Image in Android Jetpack Compose?

What is the difference between an Icon and an Image in Android Jetpack Compose? Is the Icon used for vector images, and the Image for bitmaps?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Icon and Images can both accept a Vector or BitMap as illustrated below.

Image

enter image description here

Icon

enter image description here

The only difference that I can point to is that Icons use tint to modify the content.

over 4 years ago · Santiago Trujillo Report

0

Icon is part of Material design. So it has default size of 24.dp, as defined by Material guidelines, and should be used for displaying icons of this size. It'll use LocalContentColor value for image tint, and you can change it manually with tint parameter.

Most common usage is using it with predefined material icons, like this:

Icon(
    Icons.Default.Hub,
    contentDescription = "...",
    tint = Color.Black
)

But you can create your own icons in code too, check out source code of any default icon for the reference. You can also use it for displaying a resource icon or drawable, they're gonna be scaled to fit.

Image is a Compose container for displaying images of any kind. It's much more flexible, like you can set contentScale, colorFilter, and alignment.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!