protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK) { // 获取新的照片地址 mCurrentPath = data.getStringExtra("path"); Map<String, String> map = mKXApplication.mAlbumList.get(mCurrentPosition); map.put("image_path", mCurrentPath); // 更新界面显示 if (mKXApplication.mAlbumList.size() > 1) { mAdapter.notifyDataSetChanged(); } else if (mKXApplication.mAlbumList.size() == 1) { mDisplaySingle.setImageBitmap(mKXApplication.getPhoneAlbum(mCurrentPath)); } } }
// TODO // int[] channels = {58437, 77937, 110500, 112937, 58437, 77937, 110500, 58437, 77937, 110500}; @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (parent == mListView) { // Log.d("shine", "list onItemSelected pos=" + position); Appreciatetv tv = (Appreciatetv) mListViewAdapter.getItem(position); if (tv != null) { mGallery.removeAllViewsInLayout(); mGalleryAdapter.updateData(tv.getData()); mGalleySelectedPosition = Integer.MAX_VALUE / 2 - 1; mGallery.setSelection(mGalleySelectedPosition); mListSelected = position; mListViewAdapter.notifyDataSetChanged(); } } else { CategoryData data = mGalleryAdapter.getItem(position); mGalleySelectedPosition = position; mGalleryAdapter.notifyDataSetChanged(); } }
@Override public void notifyDataSetChanged() { imageFlowUtils.rebuildGroups(); super.notifyDataSetChanged(); }