@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ViewUtils.inject(this); initView(); mAdapter = new MyAdapter(); mAdapter.update(); mGridView.setAdapter(mAdapter); mGridView.setOnItemClickListener( new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View view, int position, long id) { if (position == Bimp.bmp.size()) { // 调起相机 showTakePhotoPopUpWindow(mGridView); } } }); }
@Override protected void onResume() { super.onResume(); mAdapter.notifyDataSetChanged(); mAdapter.update(); }