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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:32:15+00:00 2026-05-20T06:32:15+00:00

Below is a TextView followed by an ImageView contained in RelativeLayout. I’m trying to

  • 0

Below is a TextView followed by an ImageView contained in RelativeLayout. I’m trying to get the bottom of the image to align with the baseline of the text. When I use alignBaseline for the image,reference the TextView, it is the top of the image that aligns with the baseline of the text instead of the bottom. How can I fix this?

<TextView 
        android:id="@+id/month" 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:text="feb"
        android:textSize="60px"
        android:typeface="serif"
        />
   <ImageView 
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:paddingLeft="15px"
        android:layout_toRightOf="@id/month"
        android:layout_alignBaseline="@id/month"
        android:src="@drawable/minicalimage" 
        android:id="@+id/calimage"
        />
  • 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-20T06:32:15+00:00Added an answer on May 20, 2026 at 6:32 am

    I was able to accomplish what I wanted to do. I did not utilize alignBaseline, just fixed the problem with padding and resizing the image. Some of the issues I was having arose from having an image too big and it filling up the space undesirably. The code I used to achieve what I wanted is below:

    <RelativeLayout 
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="horizontal" 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:paddingLeft="25px"
        android:paddingTop="30px"
        android:id="@+id/LinearLayout1">
        <TextView 
            android:id="@+id/month" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="feb"
            android:textSize="60px"
            android:typeface="serif"
            />
       <ImageView 
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_toRightOf="@id/month"
            android:layout_alignBottom="@id/month"
            android:paddingBottom="12px"
            android:src="@drawable/minicalimage" 
            android:id="@+id/calimage"
            />
        <TextView 
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="2011" 
            android:id="@+id/year" 
            android:layout_toRightOf="@id/calimage"
            android:layout_alignBaseline="@id/month"
            android:typeface="serif"
            android:textSize="40px"
            />
    </RelativeLayout>
    

    This was the result:

    Header for a calendar/planner

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

Sidebar

Related Questions

I'm trying to position an image below a TextView in a RelativeLayout but it
I want my TextView to appear below my ImageView in a RelativeLayout that is
I'm trying to build a gallery with text below the image but although I've
The Android TextView clips off my text subscripts (see image below) even when I
I have an ImageView and TextView . I want to place the TextView below
The button doesn't show in this layout(code below),image and textview are shown. I tried
I want to use the below method of textView to change the font color.
I have a linear layout which consists of imageview and textview , one below
Refer to the image below to understand what I'm trying to do. It should
I want to display some text below each grid image. Please see my code

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.