的CoverFlow与自定义适配器

的CoverFlow与自定义适配器

本文介绍了的CoverFlow与自定义适配器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建自定义适配器(图片查看缩略图,文本查看标题,进度条,指示一些进展。)封面流。

I want to create a cover flow with custom adapter (Image View as Thumbnail, Text View as Title, Progress Bar that indicates some progress..).

所有的例子或Cover Flow功能部件的实现是基于画廊(巫支持图片的集合,只)。

All the examples or the implementations of the Cover flow widget are based on Gallery (witch supports a collection of Images, only).

有没有任何提示,想法,可以帮助我吗?

Is there any hints, ideas that may help me?

感谢您:)

推荐答案

这是比较容易做到的;使用同一个适配器与例如列表视图。扩展BaseAdapter,使用ViewHolder模式,并返回你的放大视图中的

This is rather easy to do; you use the same adapter as with for example a listview. Extend the BaseAdapter, use the ViewHolder pattern and return your inflated view in the

public View getView(int position, View convertView, ViewGroup parent) {

方法。但是,你应该修改

method. But you should change the

 transformImageBitmap(THIS child, Transformation t, int rotationAngle)

transformImageBitmap(查看孩子,变换T,INT rotationAngle)

transformImageBitmap(View child, Transformation t, int rotationAngle)

在CoverFlow.java否则你会得到的ClassCastException。

in the CoverFlow.java or you'll get ClassCastExceptions.

这篇关于的CoverFlow与自定义适配器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 10:37