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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:27:20+00:00 2026-05-16T03:27:20+00:00

I have an activity ‘A’ which is called from Main activity every second until

  • 0

I have an activity ‘A’ which is called from Main activity every second until timer ends.

A is called to draw pulses until timer ends

public class A extends Activity
{    
*some code*    

   public class NestedView extends View   
   {   
         public void onDraw(Canvas canvas) 
         {

              * draw pulses
         }         
    }    
}

I want to display the “pulses view” in main.xml which already has some buttons and scrollers, text boxes etc. How can I reserve a portion of screen for this pulses to be displayed. I cannot redo the xml file because the above pulses are dynamic and the image has a red line traversing across x axis for user defined time.

  • 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-16T03:27:20+00:00Added an answer on May 16, 2026 at 3:27 am

    You can’t have both “A” activity and Main activity visible at the same time.

    Instead, create a new View and add it to the layout in main.xml. See 2D graphics documentation for an example. It sounds like the section titled Shape Drawable might meet your needs.

    edit:
    You can access the view from within your activity by calling (MyView)findViewById(R.id.my_view) From there, you should be able to configure your view with shared preferences, etc.

    Also, this article on updating the ui on timer might be useful.

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

Sidebar

Related Questions

I have an activity which extends PreferenceActivity. I'm loading preferences from the xml file.
I have activity which can show overlay. This overlay have markers which gets from
I am having trouble with my activity management. So I have activity A which
I have an activity with a spinner which loads a simpleCursorAdaptor. I call another
I have an activity in whose onCreate method an Init function is called (the
I Have activity that get some data from the internet, and shows it to
I have activity A that starts activity B which starts activity C: A ->
I have an Activity whose layout is in the file main.xml that contains a
I have activity which needs to be active all the time. I have thread
I have started Activity for result, but how to return string like parameter from

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.