您好我从服务器获取图像列表,并尝试通过Ultra视觉效果显示。但是当我在listview中使用时,它在向下滚动时显示类似于图像的列表视图效果。如何在listview中使用ultra visual?
我的代码如下所示。
Creating animation for images from small to large when scrolling vertical
公共类活动{
ListView listview = (ListView)findViewById(R.id.list);
adapter = new ActorAdapter(getApplicationContext(), R.layout.activity_main1, actorsList);
listview.setAdapter(adapter);
listview.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
long id) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), actorsList.get(position).getName()+actorsList.get(position).getDescription(), Toast.LENGTH_LONG).show();
}
});
}
}
这里我使用链接的布局:
activity_main1
跟随动画类Accordion的url并集成在此。但是图像显示的类似于从小到大。如何在适配器中使用它
<ImageView
android:id="@+id/images"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"/>
public class Adapter{
......这里有一些功能..
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// convert view = design
View v = convertView;
if (v == null) {
holder = new ViewHolder();
v = vi.inflate(Resource, null);
holder.imageview = (ImageView) v.findViewById(R.id.images);
/* holder.tvName = (TextView) v.findViewById(R.id.tvName);
holder.tvDescription = (TextView) v.findViewById(R.id.tvDescriptionn);
holder.tvDOB = (TextView) v.findViewById(R.id.tvDateOfBirth);
holder.tvCountry = (TextView) v.findViewById(R.id.tvCountry);
holder.tvHeight = (TextView) v.findViewById(R.id.tvHeight);
holder.tvSpouse = (TextView) v.findViewById(R.id.tvSpouse);
holder.tvChildren = (TextView) v.findViewById(R.id.tvChildren);
*/ v.setTag(holder);
} else {
holder = (ViewHolder) v.getTag();
}
imageLoader.DisplayImage(actorList.get(position).getImage(), holder.imageview);
//这里我正在显示图像列表。但图像显示没有动画。 }