2012-12-17 93 views
0

我的布局是这样和结果图像低于
androidscrollview顶部和右侧边缘空间的问题

<RelativeLayout 
    android:id="@+id/gamelobby" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:background="@drawable/gamelobby_bg" > 

    <TextView 
     android:id="@+id/banner" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="@drawable/banner" 
     android:gravity="center" 
     android:typeface="serif" 
     android:textColor="#e3ab15" 
     android:text="My Banner" 
     android:textSize="22sp"/> 
    //my other layout 
</RelativeLayout> 
</ScrollView> 

enter image description here

这里回到地面是不是它的形状绘制它的XML代码的图像像这样:

<selector xmlns:android="http://schemas.android.com/apk/res/android"> 
    <item> 
    <shape> 
     <gradient 
     android:angle="45" 
     android:startColor="#523c00" 
     android:endColor="#100c00" 
     android:type="linear" /> 
    </shape> 
    </item> 
</selector> 

正如你可以看到有右侧b之间顶部的屏幕和旗帜,也是之间的间隙安纳和screen.i要删除那些。我搜查了很多,也尝试了很多方法,不工作。任何帮助!谢谢

+0

检查,如果没有横幅图像的透明部分... –

+0

@SanketKachhela已经确认这不是一个像它的形状绘制。 –

+0

@SanketKachhela编辑了这个问题,请检查它。 –

回答

0

尝试设置layout_margin和layout_padding为“0dp”。我的猜测是你从应用的主题中挑选了一些样式。

+0

虽然不错的猜测不起作用,但它适用于其他屏幕,因为在这些屏幕中,bar不在scrollview内部,在这里它是内部的,它是需要的。 –

0

可能会帮助你。机器人:layout_marginTop =“ - 5dip”和android:layout_marginLeft =“ - 10dip”

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/gamelobby" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:background="@drawable/ic_launcher" 
android:layout_marginTop="-2dip" 
android:layout_marginLeft="-10dip"> 
<TextView 
    android:id="@+id/banner" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:background="@drawable/ic_launcher" 
    android:gravity="center" 
    android:text="My Banner" 
    android:textColor="#e3ab15" 
    android:textSize="22sp" 
    android:typeface="serif" /> 

    //my other layout 
</RelativeLayout> 
+0

已经尝试没有效果:( –

相关问题