2
ギャラリーのウィジェットが遅くて遅れているため、ギャラリーホルダーを使用してビューを再利用しようとしましたが、結果は表示されません。私は古典的な方法代わりにギャラリーウィジェット
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.image, null);
// Creates a ViewHolder and store references to the two children views
// we want to bind data to.
holder = new ViewHolder();
holder.icon = (ImageView) convertView.findViewById(R.id.ImageView01);
convertView.setTag(holder);
} else {
// Get the ViewHolder back to get fast access to the TextView
// and the ImageView.
holder = (ViewHolder) convertView.getTag();
}
holder.icon.setImageDrawable(getPicture(items[position]));
return convertView;
}
Androidギャラリーバージョン1.3.1のソースコードはどこからダウンロードできますか? – Vervatovskis
@blessenm - Vervatovskisは、アプリケーションで再利用して、センターロックされた水平スクロールリストにアイテムを表示できるAndroid Gallery widgitを指しています。 http://developer.android.com/reference/android/widget/Gallery.html –
@Vervatovskis - 個々のファイルのコードを参照するには、grepcodeが便利であることがわかります。http://grepcode.com/file/ repository.grepcode.com/java/ext/com.google.android/android/2.3.7_r1/android/widget/Gallery.java#Gallery オープンソースのアンドロイドプロジェクト全体をダウンロードするには、http:// sourceを参照してください。 android.com/source/downloading.html –