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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:02:31+00:00 2026-06-16T15:02:31+00:00

I have created android relative layout , in which , I am trying to

  • 0

I have created android relative layout , in which , I am trying to show four images in the four sides of the activity with a top bar and background image.

topbar and backgroud image appearing correctly. but , among 4 only 2 images are displaying in the Nexus emulator, remaing 2 images are not visible in the emulator, I have aligned image to left,right in row and left, right in another row.

only left side images are displayed at the center of the emulator, both right side images are not visible.

How can I display all images with equal space on the display. My layout is shown below

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="@drawable/background"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        tools:context=".MainActivity" >

        <ImageView
            android:id="@+id/topbannerimg"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="false"
            android:layout_alignParentTop="true"
            android:background="@drawable/topbanner"
            android:contentDescription="@string/topbar"
            android:src="@drawable/mtnlogotext" />

        <ImageView
            android:id="@+id/csrimg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_below="@+id/topbannerimg"
            android:contentDescription="@string/csrstr"
            android:src="@drawable/customerservice" />

        <ImageView
            android:id="@+id/virtualstoreimg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/topbannerimg"
            android:contentDescription="@string/virstr"
            android:src="@drawable/virtualstore" />

        <ImageView
            android:id="@+id/mtnstorelocatorimg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_below="@+id/csrimg"
            android:contentDescription="@string/storestr"
            android:src="@drawable/storelocater" />

        <ImageView
            android:id="@+id/mtnviewimg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/virtualstoreimg"
            android:layout_toRightOf="@+id/mtnstorelocatorimg"
            android:contentDescription="@string/viewstr"
            android:src="@drawable/mtnview" />

    </RelativeLayout>
  • 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-16T15:02:32+00:00Added an answer on June 16, 2026 at 3:02 pm

    I modified your code just replace icon image with your actual image.

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="#ff4455"
        tools:context=".MainActivity" >
    
        <ImageView
            android:id="@+id/topbannerimg"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="false"
            android:layout_alignParentTop="true"
            android:background="#222222"
            android:contentDescription="@string/topbar"
            android:src="@drawable/ic_launcher" />
    
        <ImageView
            android:id="@+id/csrimg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_below="@+id/topbannerimg"
            android:contentDescription="@string/csrstr"
            android:src="@drawable/ic_launcher" />
    
        <ImageView
            android:id="@+id/virtualstoreimg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_below="@+id/topbannerimg"
            android:contentDescription="@string/virstr"
            android:src="@drawable/ic_launcher" />
    
        <ImageView
            android:id="@+id/mtnstorelocatorimg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentBottom="true"
            android:contentDescription="@string/storestr"
            android:src="@drawable/ic_launcher" />
    
        <ImageView
            android:id="@+id/mtnviewimg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
             android:layout_alignParentBottom="true"
            android:contentDescription="@string/viewstr"
            android:layout_alignParentRight="true"
            android:src="@drawable/ic_launcher" />
    
    </RelativeLayout>
    

    enter image description here

    I’m not sure about layout design, so please upload image what the layout you want.

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

Sidebar

Related Questions

I have created sliding drawer for my relative layout which includes some buttons. But
I have created a spinner which looks like My layout file is: <RelativeLayout android:layout_width=fill_parent
In an android service I have created thread(s) for doing some background task. I
I'm trying to move the status bar in Android (Froyo) from the top of
Previously I had an activity layout which I am now trying to replicate in
Hi I have created a relative layout. and align the imageview to the right
I created a custom notification layout, which have a clickable button. Works so far
I have created my own button which inherits android's RelativeLayout. My question is how
I have created a custom tab layout which look like this,I want to make
I have created an android application that calls (using kSOAP library) a SOAP based

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.