ボタンの右寄せは layout_gravity=”right” を使う
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<EditText
android:id="@+id/firstnameEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="your first name"
/>
<EditText
android:id="@+id/firstnameEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="your last name"
/>
<EditText
android:id="@+id/phoneEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="your phone number"
/>
<EditText
android:id="@+id/mailEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="your mail address"
/>
<Button
android:id="@+id/button"
android:onClick="getScore"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="submit"
/>
</LinearLayout>
ここまではOKですね。
