I use Picasso to download an image from the internet and load the result into an ImageView that is inside a Layout. The problem that I face is that the image does not occupy the entire size of the Layout and it fits on one side and small.
Java Code:
ImageView graph = (ImageView) findViewById(R.id.graphImageView);
Picasso.with(this).load("https://www.google.com/finance/getchart?q=INTC&p=20Y&i=86400").into(graph);
XML:
<LinearLayout
android:id="@+id/graphLinearLayout"
android:layout_width="wrap_content"
android:layout_height="343dp"
android:layout_below="@+id/activityStockLinearLayout"
android:orientation="horizontal">
<ImageView
android:id="@+id/graphImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
I may miss some parameter in the XML that refers to the ImageView and manages to make it occupy all the size of the frame that the Layout provides to the ImageView. I have tried to change the wrap_content parameter to match_parent but I can not do it ....