Chcem, aby boli obrázky v zobrazení mriežkys väčšou veľkosťou podľa veľkosti obrazovky, aj keď na zobrazenie obrázkov používam obalený obsah a aby bol počet stĺpcov opravený, aby zostali aj medzery, sťahujem obrázky z programu Picasso môj kód:
GridView
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:verticalSpacing="0dp"
android:horizontalSpacing="0dp"
android:numColumns="2">
</GridView>
</FrameLayout>
zobrazenie obrázka
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/posterImage"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
</ImageView>
odpovede:
0 pre odpoveď č. 1Skúste pridať svoj layout_height
a layout_width
parameter namiesto manuálne
wrap_content
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/posterImage"
android:layout_height="370dp"
android:layout_width="370dp">
</ImageView>
Odporúča sa umiestniť okraje dp do súboru dimen.xml.
tiež v gridView by ste sa mali zmeniť match_parent
namiesto fill_parent
;