imagebutton에 문제가 있습니다. centerinparent를 지정할 때 이미지가 올바르게 정렬되지 않습니다. 당신이하여 ImageButton의 수직 정렬을 볼 수 있듯이Imagebutton layout_center_inparent problem
<LinearLayout
android:layout_width="match_parent" android:layout_marginTop="4dp"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:layout_height="50dp" android:background="#FF0000">
<RelativeLayout android:layout_height="match_parent"
android:layout_width="40dp" android:background="#0000FF">
<ImageView android:id="@+id/imgType"
android:layout_centerInParent="true" android:layout_width="wrap_content"
android:src="@drawable/type_text" android:layout_height="wrap_content" />
</RelativeLayout>
<RelativeLayout android:layout_height="match_parent"
android:layout_width="match_parent" android:layout_weight="1">
<LinearLayout android:orientation="vertical"
android:layout_height="match_parent" android:layout_width="match_parent">
<TextView android:layout_width="match_parent"
android:textColor="#686a68" android:layout_height="match_parent"
android:textSize="15dp" android:text="Manifest : Text"
android:ellipsize="end" android:singleLine="true"
android:layout_weight="1" />
<TextView android:layout_width="match_parent"
android:textColor="#686a68" android:layout_height="match_parent"
android:textSize="15dp" android:id="@+id/txtTitle" android:text="[TEXT NAME]"
android:layout_weight="1" android:singleLine="true"
android:ellipsize="end" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout android:layout_height="match_parent"
android:layout_width="60dp" android:background="#00FF00">
<ImageButton android:src="@drawable/type_text"
android:layout_height="48dp" android:layout_centerInParent="true"
android:layout_width="48dp" android:id="@+id/butEdit" />
</RelativeLayout>
</LinearLayout>
은 옳지 않다.
왜 이렇게하고 있습니까?
대신 'android : gravity = "center"'를 시도 했습니까? – rajath
안녕하세요. Yip도 똑같은 일을합니다. – Pintac