2014-02-08 21 views
0

我提出申請爲here在我的例子中如何設置高度和寬度gridview元素

一切都好,但我有一個問題。 在這個例子中,我怎樣才能在gridview中設置元素的高度?我嘗試-IED變化高度RelativeLayoutgridview_row.xml

android:layout_height="250dp" 

,但身高沒有變化。

+0

嘗試[這](http://www.codeproject.com/Questions/286389/how-to-set-gridview-row-height)解決方案。 –

回答

0

把它們放到另一個佈局和嘗試

<RelativeLayout  
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 

    <RelativeLayout 
     android:layout_width="match_parent" 
     android:layout_height="250dp"> 

     <ImageView></ImageView> 
     <TextView></TextView> 
    </RelativeLayout> 

</RelativeLayout> 
+0

是的。現在是好的。你是超級的:)你能解釋一下爲什麼它有助於解決我的問題,因爲不明白。 – user3170606

+1

如果它對你有用,請先接受他的回答。 :) – ihsanhf

相關問題