画面の1つにScrollViewがあります。右端に影を付けたい。これを行う最も簡単な方法は、ScrollViewの子をRelativeLayoutにし、RelativeLayoutの子を2つ持つことです。1つは画面のレイアウトを格納するLinearLayoutで、もう1つはシャドウです。
そのようです...
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="none" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- stuff -->
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@drawable/shadow"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
</ScrollView>
残念ながら、これは完全には機能しません。ImageViewは、そのサイズを画像ファイルのサイズに強制します。垂直方向に伸びてRelativeLayoutの高さになることはありません。私も「match_parent」を試しましたが無駄になりました。画像は9パッチです。
アイデア?