버튼 2개를 한줄에 생성하고 하나는 가운데 정렬, 하나는 오른쪽 정렬을 하고싶습니다.
리니어레이아웃을 지우면 정렬은 되지만 2개의 버튼이 다른줄로 엇갈립니다.
gravity도 안되고 layout_gravity도 안되는데 어떻게 해야하나요?
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:text="@string/sing"/>
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="right"
android:text="@string/answer"/>
</LinearLayout>