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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:38:06+00:00 2026-05-24T00:38:06+00:00

I try to put a regular button inside an image in android XML. How

  • 0

I try to put a regular button inside an image in android XML. How can it be done? I tried something like this:

<ImageView ....... 
          <Button .... />
</ImageView>

where the dots represent code. Apparently this is not the way because the platform threw an exception.

Can anyone help?

  • 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-24T00:38:07+00:00Added an answer on May 24, 2026 at 12:38 am

    Use relative layout to insert button on the image.

    your image should be given in background tag of RelativeLayout.

       <RelativeLayout 
                   android:layout_width="fill_parent"
                    android:layout_height="50dp"
                    android:background="@drawable/list_nav"
    
                    >
    
              <Button
                android:layout_width="63dp"
                android:layout_height="36dp"
    
                android:id="@+id/mapbutton"
                android:layout_marginTop="7dp"
                 android:layout_marginLeft="4dp"
                android:layout_alignParentLeft="true"
              />
    

    this Example adds button on left side of the image since i used layout_alignParentLeft=”true”

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

Sidebar

Related Questions

I tried to create a an link - image that changes the language of
I try to put a message from a resource bundle which contains html tags
When I try to put final in method parameter eclipse doesn't help. Any idea
With the facebook iframe like button, am I able to specify what text shows
I recently asked this question , but after some of the responses and some
My problem is this: Google App Engine allows cron jobs to be active for
I'm trying to render a simple textured quad on Android 2.2 using GLSurfaceView .
For the most part this does work the problem is the message box pops
I am using xsd:schema which will be used to generated desired xml, I have
I have a website that presents Q&As to mathematical problems, mostly for pupils aged

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.