Android Activity UI布局问题

图片说明

有一个button显示后,图片就会变形。这种怎么解决?求帮助、bottom_bar_back和bottom_bar_home大小不能改变。怎么才能实现不变形?

android:id="@+id/layout_persona_tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="0px"
android:layout_marginTop="10px"
android:background="@drawable/bottom_bar_bg" >
android:id="@+id/bottom_bar_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bottom_bar_back" />
android:id="@+id/btn_persona_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_home_normal" />

    <ImageButton
        android:id="@+id/btn_persona_company"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15px"
      android:layout_weight="1"
        android:background="@drawable/btn_company_normal"
        android:src="@null" />

    <ImageButton
        android:id="@+id/btn_persona_edit"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15px"
       android:layout_weight="1"
        android:background="@drawable/btn_edit_normal"
        android:src="@null" />

    <ImageButton
        android:id="@+id/btn_persona_del"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15px"
        android:layout_weight="1"
        android:background="@drawable/btn_del_normal"
        android:src="@null" />

    <ImageButton
        android:id="@+id/btn_persona_delall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15px"
         android:layout_weight="1"
        android:background="@drawable/btn_delall_normal"
        android:src="@null" />


      <ImageButton
        android:id="@+id/bottom_bar_home"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15px"
        android:background="@drawable/bottom_bar_home"
        android:src="@null" />
</LinearLayout>

marginright=0px 应该没什么用

尝试改变一下图像控件的scaltype,让他们居中缩放

scaleType="fixXY"试试

你用了weight那么你肯定用的是linearLayout,这时你的width是没用的,你就不用设置marginLeft了,没压缩证明是控件宽度被其他的比如margin和padding占用了

android:layout_marginLeft="15px"可以去掉试试

你用imagview不行吗?直接src不会拉伸