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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:47:02+00:00 2026-06-06T01:47:02+00:00

I have an android app where the user paints, moves and reshapes some objects

  • 0

I have an android app where the user paints, moves and reshapes some objects over a photo. In this page my screen layout consists of the photo that is loaded and below it (in portrait view) some buttons. My view looks exactly as I want it with the xml below:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:id="@+id/linear" >

    <LinearLayout
        android:id="@+id/buttons"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_alignParentBottom="true">   

            <ImageView
                android:id="@+id/draw"
                android:layout_width="80dp"
                android:layout_height="50dp"
                android:clickable="true"
                android:src="@drawable/draw"/>

            <ImageView
                android:id="@+id/delete"
                android:layout_width="80dp"
                android:layout_height="50dp"
                android:clickable="true"
                android:layout_toRightOf="@+id/erase"
                android:src="@drawable/delete"/>

            <ImageView
                android:id="@+id/done"
                android:layout_width="80dp"
                android:clickable="true"
                android:layout_height="50dp"
                android:layout_toRightOf="@+id/delete"          
                android:src="@drawable/done"/>         

        </LinearLayout>     



    <ImageView
        android:id="@+id/photo"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center"
        android:layout_above="@id/buttons"/>


</RelativeLayout>

The problem is that I want the buttons to be always on top of the painted objects. Now if the user paints a line and then moves it in a way that one edge will go lower than the image, then this line will be over the buttons. It will be untouchable at that point because the canvas is set to the bitmap that has my image, but it will be visible. I would like it to disappear in the way it disappears if part of the line gets out of screen.

How can I implement this? Is there some attribute that can ensure that these buttons are always over the painted objects? Thank you in advance!

  • 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-06T01:47:03+00:00Added an answer on June 6, 2026 at 1:47 am

    If you’ve @Override onDraw or onLayout method, try bringing the

    <LinearLayout
        android:id="@+id/buttons">
    

    in the front by using v.bringToFront() where v will be your LinearLayout.

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

Sidebar

Related Questions

I am building an android app where the user paints some objects in the
I have got some inapp billing in my Android app. When the user clicks
I have an android app where user presses a start button and some function
I have an android app which gives the user the option of loading a
I have a dialog in an Android app that I don't want the user
Lets say you have a web app related Android app that requires the user
I have facebook login setup in my android app. When the user clicks login
I have an Android app that allows the user to record data (such as
I have an Android app where I want to offer the user the choice
I have android app that talks to server and syncs some data int SQLite

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.