I have a TableLayout within ScrollView with a background image. The problem I face is that in the custom background image, the position of the fading edge is beyond the white border of the background image. It is not very nice. How can I make the fading edge appear before the white border?
http://img444.imageshack.us/img444/6775/fadingedge.png
XML
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="240dip"
android:layout_alignParentLeft="true"
android:layout_marginRight="9dip"
android:layout_marginLeft="10dip"
android:background="@drawable/bg"
>
<TableLayout android:id="@+id/table" android:layout_width="fill_parent"
android:layout_marginBottom="10dip" android:layout_marginTop="10dip"
android:layout_height="fill_parent">
<TableRow android:id="@+id/TableRow01" android:layout_marginLeft="20dip"
android:layout_marginTop="10dip" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TableRow>
</TableLayout>
</ScrollView>
Ad the
android:paddingTop="10dip"andandroid:paddingBottom="10dip"to theScrollViewitem. In this way, element in this container (your table here) will have “outter (top/bottom) margin”.