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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:06:35+00:00 2026-05-25T19:06:35+00:00

I am using Eclipse to write an Android app that has a column of

  • 0

I am using Eclipse to write an Android app that has a column of buttons, and when one is pressed it will open another column of buttons next to it that corresponds to the button pressed.

What I would like to do is add a solid line that connects the button pressed to the new column so visually it can be seen which button the new column relates too (not worried about the vertical relationship) e.g.

 [B1]   [B5]
 [B2]---[B6]
 [B3]   [B7]
 [B4]   

I had a look at the “How to draw a line in android” post, but I was wondering if it would work in my case as I’m using Relative Layout? Thinking that if the app was to change devices (namely screen size) would the line then be misplaced with respect to the buttons.

I could be wrong as I’m very new to Android and Java but thought it worth asking.

One way I was thinking may work, if it’s possible, would be to somehow have the line connected/linked to the buttons???

Thank you,

Markus

  • 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-25T19:06:36+00:00Added an answer on May 25, 2026 at 7:06 pm

    I would use a vertical LinearLayout (or RelativeLayout) for each column and instead of just one button per row, I would use an horizontal LinearLayout with both the button and the line per row, like so:

    [B1, L1][B5]
    [B2, L2][B6]
    [B3, L3][B7]
    [B4, L4]
    

    The line view would only be visible in the selected row. The line view could be any transparent view (ImageView, LinearLayout, RelativeLayout, FrameLayout, etc…) with a background set to a Drawable (the line). The drawable can be created programmatically or loaded from a resource.

    Assuming you’re doing something in the likes of hierarchical tabs, consider using toggle buttons.

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

Sidebar

Related Questions

I have just started learning to write apps for android using Eclipse. Where can
I'm using Eclipse to write a small Java application that uses WLST to manage
Background: I am using Eclipse to develop an Android app. I have an xml
I'm using Eclipse to develop an Android app to plot Bluetooth data. The primary
I am using Eclipse to develop an Android application that plots Bluetooth data. I
I'm trying to create an Android client for a client/server app that has previously
I am using Eclipse (3.5.1), on Ubuntu 9.10 to write some C++ code. I
I am developing a simple android application using eclipse. I wrote a JUnit TestCase
I'm using Eclipse EPIC IDE to write some Perl CGI scripts which call some
I'm using Eclipse (Build id: 20090920-1017) to write my Symfony web application and in

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.