안녕하세요 이미지보기에서 내 텍스트보기 중심에 문제가 있습니다. 나는 이것과 같이 보이기를 원하지만 실제로는 수직으로 가운데 맞추고 폰트 크기가 바뀌면 수직으로 머물러있게합니다. 여기 안드로이드 - 센터보기 다른보기 내부 레이아웃
그리고
내가 그냥이 중심을 할 수 있도록하려는 나에게 문제가되지 않는 다른 종류의 상대적 레이아웃을 변경해야하는 경우 난 상관 없어 XML에있는 것입니다. Heres the XML :<RelativeLayout 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:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.spencer.app.ProfileActivity"
android:id="@+id/layout">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="140dp"
android:minWidth="140dp"
android:id="@+id/logoBackground"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="25dp"
android:layout_marginStart="25dp"
android:layout_marginTop="25dp"
android:contentDescription="@string/content_description_useless"
android:background="#ffffd0cd" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/capital_u"
android:id="@+id/u_textView"
android:textSize="80sp"
android:layout_marginLeft="31dp"
android:layout_marginStart="31dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:layout_alignTop="@+id/logoBackground"
android:layout_alignLeft="@+id/logoBackground"
android:layout_alignStart="@+id/logoBackground" />
</RelativeLayout>
미리 감사드립니다.
[Android - Centering Textview in Relative Layout] (http://stackoverflow.com/questions/27327367/android-center-textview-in-imageview-of-relative-layout) – tachyonflux
게시물의 중복 가능 UR 원하는 이미지 pls .. –
@MSGadag U를 제외하고 질문의 상단에 실제로 중심입니다! 아이디어를 보여주기 위해 드래그하여 최선을 다했습니다. – iqueqiorio