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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:59:22+00:00 2026-05-30T06:59:22+00:00

How can I draw a line using canvas to connect two buttons in android

  • 0

How can I draw a line using canvas to connect two buttons in android ?

If I create the button in the activity class and draw the line in the view, and do setContentView(my view class obj), the buttons are not visible.

  • 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-30T06:59:24+00:00Added an answer on May 30, 2026 at 6:59 am

    I had a same problem. you can add these lines

    getWindow().addContentView(view,
    new ViewGroup.LayoutParams(
    ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT));
    

    Don’t set your setContentView to view object. set it to layout. then add these lines.
    Hope it works.

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

Sidebar

Related Questions

The cvLine() function can draw a straight line given two points P1(x1,y1) and P2(x2,y2).
I draw a triangle using line. How can I fill color on it? So
I managed to draw a line on a canvas using html5: ctx.moveTo(x1, y1); ctx.lineTo(x2,
You can draw arcs and you can draw images on a canvas using javascript,
how can I draw line between two div's with jquery library or simple javascript?
I need to draw a growing 3d line using open gl on an Android
In HTML Canvas I can set the color of a line of text using
I can add a child using two methods, one is Canvas.AddVisualChild(Visual); Canvas.AddLogicalChild(Visual); Where i
Terminology question ! In many graphics packages the user can draw a line between
How can i draw a dotted line in .NET/WinForms/GDI+? Pen p = new Pen

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.