Skip to content

Instantly share code, notes, and snippets.

@tatuas
Created December 18, 2013 11:21
Show Gist options
  • Save tatuas/8020740 to your computer and use it in GitHub Desktop.
Save tatuas/8020740 to your computer and use it in GitHub Desktop.
AndroidのRelativeLayoutでmarginを開けつつもbottomに配置する方法
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/emptyView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_alignParentBottom="true"
android:visibility="invisible" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/emptyView"
android:layout_margin="24dp"
android:text="Button"
/>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment