나는 스피너의 항목 스타일 인 textview.xml을 가지고 있습니다.스피너 아이템 custom_style.xml에 중력 값을 여러 개 지정할 수 있습니까?
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="left|center_horizontal"
android:textSize="18sp">
</TextView>
나는 그것을 모두 (Gravity.LEFT | Gravity.CENTER_HORIZONTAL)
를 지정하는 것이 가능하다는 것을 알고 있지만 작동하지 않는 XML에 - 텍스트는 단지 왼쪽으로 이동합니다.
무엇을하려고합니까?수평 중력과 수직 중력을 지정할 수 있지만 두 개의 수평 설정은 의미가 없습니다. – adamp
내 실수. 미안. 물론 "left | center_vertical"이었습니다. 이제 작동합니다. 감사합니다. – 87element