i have horizontal-listview in layout.
in horizontal-listview's item-layout:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <progressbar android:id="@+id/pbloading" style="@style/widget.appcompat.progressbar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerinparent="true" /> <imageview android:id="@+id/ivpic" android:layout_width="170dp" android:layout_height="170dp" android:adjustviewbounds="true" /> </linearlayout> which show image perfectly. when set imageview's height & width to:
android:layout_width="wrap_content" android:layout_height="170dp" it doesn't "show" images (images there when click on empty place) loaded url , in different size.
and seems horizontal-listview list view have problem , regular listview ok this.
can me through this?
edit: horizontal-listview:
<linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#f9f9f9" android:orientation="vertical"> <linearlayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight=".3" android:gravity="right|center_vertical" android:orientation="vertical" android:padding="10dp"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:maxlines="1" android:text="@string/info.pics" android:textsize="@dimen/font_normal" android:textstyle="bold" /> </linearlayout> <!--horizontal list-view apk-pics--> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingbottom="10dp" android:paddingleft="10dp" android:paddingstart="10dp"> <appstore.pishtaz.com.appstore.utils.horizontallistview android:id="@+id/hlvapkpics" android:layout_width="match_parent" android:layout_height="200dp" android:clickable="false" android:focusable="false" /> </linearlayout> </linearlayout>
have tried using image library picasso? deal image resizing, caching of images (improved performance, better user experience)
picasso.with(context) .load("http://i.imgur.com/dvpvklr.png") .into(imageview); picasso resize , recrop image adding:
.resize(50, 50) .centercrop(); it's extremely simple library use, , image-related needs down road.
Comments
Post a Comment