2012-07-04 43 views
1

我在android.but開發項目與畫廊控制,但我在畫廊控制中有一些問題,我滾動一個圖像到下一個圖像顯示陰影像起始圖像不影子在畫廊控制,我滾動到下一張圖像顯示圖庫中所有圖像的陰影。我想在圖庫控件中刪除陰影。截圖如下圖庫在Android中顯示陰影

我得到的輸出:

enter image description here

我是滾動到屏幕下方拍攝下一幅圖像輸出:

enter image description here

這裏是我的XML代碼:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@android:color/black" 
    android:id="@+id/lay_linear" 
    android:orientation="vertical" > 

    <Gallery 
     android:id="@+id/gallery" 
     android:layout_width="fill_parent" 
     android:layout_height="430dp" 
     android:layout_weight="2.50" /> 

</LinearLayout> 

iw螞蟻刪除畫廊control.can上的陰影非常感謝任何一個幫助我!

回答

1

嘗試下面的代碼刪除未選擇shawdows:

galleryview.setUnselectedAlpha(1); 

歡迎您!

+0

它的作品.......! – Dinesh

0

使用android:cacheColorHint="#00000000"

+0

已經嘗試過相同的問題!我正在試圖<畫廊 機器人:ID = 「@ + ID /畫廊」 的android:layout_width = 「FILL_PARENT」 機器人:layout_height = 「430dp」 機器人:layout_weight = 「2.50」 機器人:cacheColorHint = 「#00000000」 /> – Dinesh

+0

爲什麼不使用@android:color/transparent改爲#00000000? – ademar111190