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

  • Home
  • SEARCH
  • 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 7893505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:09:00+00:00 2026-06-03T07:09:00+00:00

For a resource URI The format is: android.resource://[package]/[res id] [package] is your package name

  • 0

For a resource URI The format is:

“android.resource://[package]/[res id]”

[package] is your package name

[res id] is value of the resource ID, e.g. R.drawable.sample_1

However – what would I use for the package for a platform resource. For example, I would like the URI for the platform resource which is the favourited star.

Thanks a lot,

  • 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-06-03T07:09:02+00:00Added an answer on June 3, 2026 at 7:09 am

    The package name for the platform resources is "android", so the URI for e.g. the star_big_on Android platform drawable is "android.resource://android/" + android.R.drawable.star_big_on.

    Here’s the code for an Activity that displays that URI in an ImageView:

    package com.example.android;
    
    import android.app.Activity;
    import android.net.Uri;
    import android.os.Bundle;
    import android.widget.ImageView;
    
    public class ExampleActivity extends Activity {
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
    
            // Setup an ImageView to display the resource URI with
            ImageView v = new ImageView(this);
            setContentView(v);
    
            // Set the URI to an Android platform resource
            Uri uri = Uri.parse("android.resource://android/" + android.R.drawable.star_big_on);
            v.setImageURI(uri);
        }
    }
    

    Running the Activity will look something like this:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a pack:// URI, what's the best way to tell whether a compiled resource
Using a restful resource in Rails, I would like to be able to insert
If you add a resource map to a namespace in your routes.rb in Rails
I have a Jena URI Resource ( Resource reference to an object where isURIResource()
When issuing an HTTP DELETE request, the request URI should completely identify the resource
I have the following URI: Posts/{postId}/Comments/{commentId} I would like to enable users to edit
I want to send a URI as the value of a query/matrix parameter. Before
There is a method in ResourceSet which can create resource: public Resource createResource(URI uri)
How can I get a full URI of the resource currently dispatched in JAX-RS?
Resource scripts loaded from .rgs files are used with ATL CComModule::UpdateRegistryFromResource() . It's quite

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.