问题
The question is quite simple. How do I get this imageview below to be visible in front of the button below?
I am looking for an XML answer, not a Java answer. Seeing java (I think) will not change anything in the preview screen while working on the xml file.
<ImageView
android:layout_width="35dp"
android:layout_height="35dp"
android:background="@drawable/iconfb"
android:layout_marginTop="90dp"
android:layout_marginLeft="12.5pt"
android:id="@+id/iconfb"
/>
<Button
android:layout_width="300dp"
android:layout_height="40dp"
android:text="Sign in with facebook"
android:onClick="invokefb"
android:textColor="@color/white"
android:textStyle="bold"
android:background="@color/tmfacebook"
android:layout_marginTop="-20dp"
android:layout_marginLeft="12.5pt"
android:id="@+id/fblogin"
"/>
回答1:
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="10dp"
android:drawableLeft="@drawable/fb"
android:text="Facebook"/>
来源:https://stackoverflow.com/questions/31685210/android-studio-xml-how-to-get-imageview-in-front-of-button