Problem with the size of the Twitter image
I have used this code to get a feed reader form twitter. I have list them in the listView as the article says, but with some images I have a problem with the size and they are anormally big...I have tried unsuccesfully to fix the size of the image with:
<ImageView android:id="@+id/photo开发者_高级运维User"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="10dp" android:maxHeight="10dp"
android:paddingRight="12dp"/>
Strange that the code didn't do that for me when I wrote it. What android version are you testing on?
For one reason or another, I've found that often only specifying maxWidth/maxHeight doesn't behave as you would expect, and I also have to specify minWidth/minHeight to effectively control image size. I had to do exactly that in a follow-up development tutorial to the post you reference.
Give something like this a try:
<ImageView
android:id="@+id/photoUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="30dip"
android:minWidth="30dip"
android:maxHeight="30dip"
android:minHeight="30dip"
android:paddingRight="12dip" />
精彩评论