0

I'v tried to make a design for "following" with the numbers so I create a line by photoshop and I faced some problems : enter image description here

so the problem was in the word following and the the number . I want to make them closer to the line but I can't because the line is an image view, so how can that be done ?

frogatto
  • 28,539
  • 11
  • 83
  • 129
sleeman
  • 5
  • 5

2 Answers2

1

An option would be considering negative margin top for your line (ImageView).

<ImageView
    android:layout_marginTop="-10dp"
    ... />

Please see this post for more info

Community
  • 1
  • 1
frogatto
  • 28,539
  • 11
  • 83
  • 129
0

Use frame layout, and place where ever you wanted, negative margin wont give better result on different-different devices.

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <TextView
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:textColor="#000"
       android:textSize="40dp"
       android:gravity="right"
       android:text="@string/top_text" />

    <ImageView
       android:id="@+id/ImageView01"
       android:layout_height="fill_parent"
       android:layout_width="fill_parent"
       android:src="@drawable/lake"
       android:scaleType="matrix"></ImageView>
    <TextView
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:text="@string/bottom_text"
       android:gravity="right"
       android:textColor="#fff"
       android:textSize="50dp" />
</FrameLayout>
fabian
  • 80,457
  • 12
  • 86
  • 114
UMESH0492
  • 1,701
  • 18
  • 31