채팅 거품을위한 간단한 레이아웃이 있습니다. 내가 이미지를 설정할 때 원치 않는 여백이있는 채팅 거품의 이미지
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bubble_layout_chat_parent"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bubble_layout_chat"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/message_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/message_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/primary_text_light"
android:layout_gravity="top"
android:textSize="16sp"/>
<TextView
android:id="@+id/message_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#999"
android:textSize="10sp"
android:textStyle="italic"
android:textColorHint="@color/grey"
android:layout_gravity="bottom|end"/>
</LinearLayout>
는하지만, 원치 않는 여백 이미지 위와 아래에 둡니다.
어떻게 마진을 제거하고 이미지에 맞게 거품을 만들 수 있습니까?
: 귀하의 이미지 뷰에 대한 대한
당신은 시도 : 그래서 내 지금
ImageView
작업처럼 보이는 - 설정 여백을 0으로? - Android Device Monitor에서 레이아웃을 검사하거나 배경색을 사용하여 공간의 어느 부분이 ImageView에서 왔는지, 컨테이너의 내용을 정확히 알 수 있습니까? –이미지 상단과 하단에 여백이 있는지 확인하십시오. – kgandroid
@kgandroid : 아니요. 이미지에 여백이 없습니다. – Atul