Gal
Gal

Reputation: 5416

TextView going out of screen

I have a TextView in a RelativeLayout that sometimes is partially out of the screen. the problem is that instead of just being partially out of the screen its sizes change so that the entire TextView still remains on the screen. I want to know how to disable that change.

EDIT: this is my TextView XML

<TextView android:id="@+id/neighborImage" 
        android:drawableBottom ="@drawable/icon"
        android:text="Temple Bar"
        android:singleLine="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:scaleType="matrix"
    />

EDIT2: enter image description here

enter image description hereenter image description here

The icons you see on the radar are the TextView. The reason I'm using TextViews is because there will be text above the icons eventually. So, as you can see I've uploaded 3 pictures. These 3 pictures describe a zoom in, and as a result the icons are moving. If we will look at lower right picture we can see that when it reaches the end of the screen, the image width is changed and as a result the image is pushed to the right in the third picture you can see how it continues. i want to have the same result as when using ImageView, in this case the picture will just be partially out of the screen it it's size will be the same.

Thanks.

Upvotes: 2

Views: 2901

Answers (1)

Andrew T.
Andrew T.

Reputation: 2108

Check your xml. You are likely setting layout_width as "wrap_content", you want "fill_parent"

Alternatively, post the xml in question.

Upvotes: 3

Related Questions