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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:07:37+00:00 2026-05-29T16:07:37+00:00

I have simple relative layout – an ImageView (iv1) and a TextView (tv1) to

  • 0

I have simple relative layout – an ImageView (iv1) and a TextView (tv1) to the left of iv1. Unfortunately, I see no tv1. What is more, even hierarchyViewer can’t help me find it.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:background="@android:color/white"
>

<ImageView
    android:id="@+id/iv1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_launcher" />

<TextView
    android:id="@+id/tv1"
    android:layout_toLeftOf="@+id/iv1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="TextView" />

</RelativeLayout>

It looks like that:

enter image description here

However, if I change android:layout_toLeftOf="@+id/iv1" to android:layout_toRightOf="@+id/iv1", my text view becomes positioned to right of image view. It seems like toRightOf works and toLeftOf doesn’t.
Here how it looks:

enter image description here

What is the matter? How to make layout_toLeftOf work?

  • 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-29T16:07:41+00:00Added an answer on May 29, 2026 at 4:07 pm

    set imageview property align_parent_right= true;

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

Sidebar

Related Questions

I have a simple HTML layout: <div style=position:relative; width:200px> <div style=position:absolute; top:0; left:0; background-color:red;
I have a simple layout which works fine in Chrome, Safari even Opera too
I have a simple LinearLayout with one TextView and one ImageView. I want the
I have an ImageView and I do a simple scale animation to it. Very
I have the following Relative layout. The view at the bottom is simply a
I have some pretty simple html which is meant to make a layout as
I have a pretty simple css layout for a plate of information, you can
I have the following layout: <LinearLayout width:fill height:fill > <RelativeLayout width:fill height:wrap > <ImageView
I have a fragment embedded in a layout. This fragment has a very simple
I'm trying to build the simple layout that I have got in the image

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.