Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7091777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:13:48+00:00 2026-05-28T08:13:48+00:00

I figured out that I can reuse my app’s launcher icon inside my app,

  • 0

I figured out that I can reuse my app’s launcher icon inside my app, which is declared in the manifest as a launcher icon. I am doing this by simply calling the icon image from a layout xml file with the same file name and path as declared in the Android manifest.

e.g.: 
  <ImageView
  ...
  android:src="@drawable/ic_launcher">
  </ImageView>

The problem is: that if in the future I changed the icon’s name/path in the manifest file, the code in the layout file would also need to be updated. Also, I would like to be able to reuse this piece of layout code in my next app without worrying about what filename & path has been declared in the manifest for the icon.

Can I find out from my code the name&path declared in the manifest file for the launcher icon? This would allow me to read the manifest first then use the same name&path from the layout file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:13:48+00:00Added an answer on May 28, 2026 at 8:13 am

    You can do this in your Activity:

    String packageName = getPackageName();
    PackageManager pm = getPackageManager();
    Drawable icon = pm.getApplicationIcon(packageName);
    imageView.setImageDrawable(icon);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I apologize for this seemingly relatively simple task that I can't figure out. I
Any Access guru's out there that can help me out? Trying to figure out
I'm trying to figure out the best way to create a class that can
Simple problem that I can't figure out... How can I print a '%' character
I know that I can figure out today's date by [NSDate date]; but how
I am having an issue that I can't seem to figure out. Hopefully somebody
I have a weird problem that i can't figure out a solution for: I've
I have a warning in my code that I can't figure out how to
I have a problem with Lucene's scoring function that I can't figure out. So
Just came across an issue with my Wordpress template that I can't figure out.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.