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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:34:10+00:00 2026-06-06T10:34:10+00:00

I am trying to build a help screen that is going to go on

  • 0

I am trying to build a help screen that is going to go on a mediaplayer. The idea is to put a fragment with a transparent theme on top of the current view. (See How do I create a help overlay like you see in a few Android apps and ICS? for the basic idea). Now, I understand the steps in the mentioned link, but how do I connect the circles and arrows and paragraphs next to each one (explaining what each one was) to the lower object? Example, I have an object:

R.id.music_button

and I want there to be and arrow that points to music button.
Trying to support as many devices as we do it will be very difficult to just draw a few pictures as part of the top layout and expect them to line up.
Again, how do I reference an object on a fragment below the top level?

Thanks

Update 1:
Following advice from Nobu Games I have saved the location and passed it to the help fragment.

                View helpedButton = getView().findViewById(R.id.my_sources_button);
            int[] location = { 0, 0 };
            helpedButton.getLocationOnScreen(location);

I think this is right, but now I can not get the arrow to draw:

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_help_main_menu, container, false);
    DebugLog.d(TAG, "View v is: " + v);
    RelativeLayout mainHelp = (RelativeLayout) v.findViewById(R.id.mainHelpLayout);
    DebugLog.d(TAG, "Layout is: " + mainHelp);
    ImageView arrow = new ImageView(getActivity());
    arrow.setX(location[0]);
    arrow.setY(location[1]);
    arrow.setImageResource(R.drawable.arrow1);
    arrow.setVisibility(arrow.VISIBLE);
    DebugLog.d(TAG, "Location x: " + location[0]);
    DebugLog.d(TAG, "Location y: " + location[1]);
    arrow.bringToFront();
    DebugLog.d(TAG, "CIRCLE " + arrow);
    mainHelp.addView(arrow);
    return v;
}

UPDATE 2
Using getLocationOnScreen and getLocationInWindow are giving me strange results. The button I am trying to draw an arrow too is in the lower right of the screen with some padding both below and to the right. The coordinates I am getting are x=1319 and 716 on a Sony GTV.
If I use

        LayoutParams params = new RelativeLayout.LayoutParams(60, 40);
        params.topMargin = y;
        params.leftMargin = x;

The arrow draws, but in some funky places. I can use math or change the parameters around until it looks good in one view, but this is just the first of many arrows and lots of devices need to be supported. I really need to just pass the location of the button and have it not draw in funky places.

  • 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-06T10:34:11+00:00Added an answer on June 6, 2026 at 10:34 am

    If I understand you correctly you are trying to have a semi-transparent help screen overlay on top of your Fragment. That overlay illustrates the UI elements of the Fragment’s view below.

    So there are two possibilities for that:

    Option 1

    Before starting the help screen Fragment / Activity you need to get the position information of all the view elements you want to provide help for.

    You could use View.getLocationOnScreen for that.

    Then pass the location data alongside with an identifier for each UI element to your help screen. As Intent extra values for example.

    Your help component needs to take these coordinates and calculate the absolute positions of your arrows.

    Option 2

    Create a help layout XML file that has the same alignments and dimensions like your Fragment’s view. Use that help layout to correctly position your labels and arrow graphics. Use margins / paddings for positioning these elements.

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

Sidebar

Related Questions

I'm trying to build a control logic that depends on the current gsp page
I'm trying to build a utility method using Linq that will help me with
I'm trying to build an application that is launched has a transparent background, in
I am trying to build a screen that is split down the middle horizontally
I'm trying to build a screen with a single column grid that is 180px
I am trying to build an app that has a landing screen with a
Trying to build my project with ANT in idea 10 and I get a
I'm trying to build a generic grid view in an ASP.NET MVC application. Let
I'm trying to build a really simple form to help me out typing comments
I need help in resolving a complex SQL query. I am trying to build

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.