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 6101041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:27:18+00:00 2026-05-23T13:27:18+00:00

I want to display some locations on my MapView . These locations will show

  • 0

I want to display some locations on my MapView. These locations will show pins which will have numbers 1,2,3.. so on(Similar to Google maps result but it is A,B,C..). I think it is not feasible to have pins of all numbers.

Is there any way that i can just create a layout with pin background with TextView and I will dynamically put number in TextView and that layout ill use as drawable pin??

Or any other method to achieve this?? Please provide some suggestions.

(I am able to show different drawable pins on MapView.I just want to create drawables dynamically)

  • 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-23T13:27:19+00:00Added an answer on May 23, 2026 at 1:27 pm

    Solved this.

    Inflated the TextView with pin background and dynamically set the position into TextView.

    public Drawable createFromView(int positionNumber)
    {
        LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
        View view = inflater.inflate(R.drawable.pin_icon, null, false);
        TextView tv = (TextView) view.findViewById(R.id.pin_background);
        tv.setText("     "+ (positionNumber+1) );   // +1 since position is starting from 0
        tv.setDrawingCacheEnabled(true);
        tv.layout(0, 0, 50, 50);
        tv.buildDrawingCache();
        Bitmap b = Bitmap.createBitmap(tv.getDrawingCache());
        tv.setDrawingCacheEnabled(false);
        Drawable d = new BitmapDrawable(b);
        return d;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to display some div's in a wrap. The div have same class
I have a JTable that I want to use to display some data (a
I want to display some QTextEdits over my main window at arbitrary locations. Below
In my MapView i have pin dropped on certain locations and now i want
I want to display some kind of animation when my datagrid is updating. Does
I want to display some text on twitter/facebook when a link is clicked on
I want to display some text for a few seconds and then quit my
In my app,I want to display some information in the middle of the screen
For the most part, when I want to display some HTML code to be
I'm a newbie with SQL... Now I want to display some instances of AddrDistances

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.