android - How to align baseline of one view to top of another -
i need green icon aligned baseline top of white card
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>
you can try negativ margin-top
<imageview ... android:layout_margintop="-30dp" .../>
Comments
Post a Comment