HorizontallScrollViewにフォアグラウンドグラデーションを追加しようとしています。スクロールグラデーションをレイアウトした後はすべてうまく動作します。ここでは、この問題のスクリーンショットは、以下のとおりです。 appliaction開始後:http://img819.imageshack.us/img819/6622/horizontalscroll.jpg とスクロール後:XMLでhttp://img709.imageshack.us/img709/388/horizontalscroll2.jpgForeground on HorizontalScrollView
主レイアウト:
<RelativeLayout
android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@layout/backgroundgradient"
>
<include layout="@layout/header" />
<HorizontalScrollView android:id="@+id/ScrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:foreground="@layout/scrollforegrad"
android:background="@layout/scrollbgrgrad"
android:layout_below="@id/LayoutHeader"
>
<LinearLayout
android:id="@+id/ThemeContainer"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</HorizontalScrollView>
とグラデーションのxml:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainForegroundGrad"
>
<gradient
android:startColor="@color/scrollForegroundSide"
android:centerColor="@color/scrollForegroundCenter"
android:endColor="@color/scrollForegroundSide"
android:angle="0"
/>
<corners android:radius="0dp" />
</shape>
誰かがこのようなを持っていた場合問題を解決する方法を知っているか共有してください:) ありがとうございます。