LinearLayout의 가운데에 텍스트를 가로로 놓는 방법은 무엇입니까? layout_margin을 사용해야합니까?LinearLayout의 가운데에 텍스트를 가로로 놓는 방법은 무엇입니까?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello"
android:layout_gravity="center_horizontal" // this does not work
/>
</LinearLayout>
나는 내 질문을 너무 많이 단순화했다. – user1301568