android - How to align baseline of one view to top of another -


i need green icon aligned baseline top of white card

enter image description here

in case can align top part of green icon top part of white card. layout_margintop green icon doen't allow move top in case.

<relativelayout     android:layout_width="match_parent"     android:layout_height="match_parent">     <android.support.wearable.view.cardframe         android:id="@+id/card_home"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_centerinparent="true">         <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="text"             android:textcolor="@color/black"/>     </android.support.wearable.view.cardframe>     <imageview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/menu"         android:layout_alignright="@id/card_home"         android:layout_aligntop="@id/card_home"         android:layout_marginbottom="30dp"/> </relativelayout> 

enter image description here

you can try negativ margin-top

   <imageview        ...        android:layout_margintop="-30dp"        .../> 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -