Url Bild mit der Breite 900 * 346, verwenden wir dasselbe Bild für die Anzeige von Detailbild und Thumbnail.Humbnail Bild wird in Gridview mit 2 Spalten und 200dp Höhe angezeigt, aber das Bild ist stretching.Is gibt es keine Möglichkeit, ein Bild mit größerer Breite ohne Ausdehnung anzuzeigen. Danke im Voraus.Größeres Bild zum Thumbnail
Grid Xml:
<?xml version="1.0" encoding="utf-8"?>
<GridView
android:id="@+id/grid_img"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:horizontalSpacing="@dimen/portfolio_grid_space"
android:verticalSpacing="@dimen/portfolio_grid_space"
android:layout_marginTop="@dimen/portfolio_grid_space"
android:layout_marginBottom="@dimen/portfolio_grid_space"
android:numColumns="2"/>
Gridview Adapter xml:
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/img"
android:scaleType="fitCenter"
android:layout_width="match_parent" android:layout_height="200dp">
</ImageView>
Bitte posten Sie Ihre XML-Datei und Screenshot. –
@ Ravikumar11 schau meine Antwort. –