如何让Android xml溢出

问题描述:

我在Android中搜索溢出属性,但是我没有找到。我有一个XML文件;如何让Android xml溢出

<RelativeLayout 
    android:id="@+id/holder" 
    android:layout_width="200dp" 
    android:layout_height="wrap_content" 
    android:background="@mipmap/add_place_map_popup" 
    android:padding="8dp"> 

    <ImageView 
     android:id="@+id/placeProfileAddressIconBig" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="26dp" 
     android:src="@mipmap/place_rec_icon" /> 
</RelativeLayout> 

我想让这个图像看起来更大。但是当我做得更大时,RelativeLayout也变得很大。当由于imageView而在RelativeLayout中出现溢出时,我想让外流“可见:不可见”或“可见:不见”。

谁能告诉我,如何隐藏布局溢出?

+0

检查这个答案对于理解图像缩放如何工作http://*.com/questions/10826422/imageview-fills-parents-width-or-height-but-maintains-纵横比/ 20477655#20477655 – Context

Use `android:clipChildren="false"` in parent: 

<ImageView 
     android:id="@+id/placeProfileAddressIconBig" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="26dp" 
     android:src="@mipmap/place_rec_icon" /> 
</RelativeLayout>