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

The Archive Base Latest Questions

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

If you have any knowledge of XML layouts in Android, please take a quick

  • 0

If you have any knowledge of XML layouts in Android, please take a quick look. I have the following XML layout that displays an image, then displays an address and phone number below it.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:background="@drawable/mainbackground"
          android:layout_width="fill_parent" 
          android:layout_height="fill_parent"
          android:orientation="vertical" 
          android:id="@+id/view1">
   <ImageView android:id="@+id/imageView1" 
    android:layout_height="wrap_content" 
    android:layout_width="wrap_content" 
    android:layout_centerHorizontal="true"
    android:layout_marginTop="50px"
    android:padding="12dip"
    android:background="#FFFFFF">
  </ImageView>
  <TextView android:id="@+id/addressView" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"
        android:layout_below="@id/imageView1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="20px"
        android:padding="12dip"
        android:textColor="#000000"
        android:background="#FFFFFF">
   </TextView>
   <TextView android:id="@+id/phoneView"
        android:textColor="#0000FF" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"
        android:layout_below="@id/addressView"
        android:layout_centerHorizontal="true"
        android:padding="12dip"
        android:background="#FFFFFF">
    </TextView>
</RelativeLayout>

Currently, I am just using the android:padding and android:background tags to set a white background behind the ImageView and both TextViews. This works fine for me for the image view. For the text views, they obviously have 2 individual borders/backgrounds. However, I would like to set one white background image behind both text views instead of having two individual borders/backgrounds. See this image for more details on what I would like the final result to look like:

http://img84.imageshack.us/i/homeview.png/

I am just not sure how to “wrap” this white box around both text views. Obviously, the android:padding and android:background tags might not be the way to do this. If anyone could help, it would be greatly appreciated!

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

    Set the image as a background for a LinearLayout that contains both TextViews and you are set.

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

Sidebar

Related Questions

Have any bridge libraries been developed for PHP that provide access to the jQuery
I have an XML document that needs to pass text inside an element with
I don't have any knowledge about the log files. what are log files and
Anyone have any good urls for templates or diagram examples in Visio 2007 to
I have any ASP.NET control. I want the HTML string how to do I
Anyone have any success or failure running Jira on a VM? I am setting
anyone have any experience using this? if so, is it worth while?
Anyone have any idea how to get the value of Language for Non-Unicode Programs
Anyone have any comparative thoughts on these three technologies? Each addresses a different VM,
Anyone have any experience creating a modal dialog box using AJAX and ASP.NET MVC?

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.