我已经浏览了图库中的图像并将其设置为ImageView现在我需要获取已设置的图像的图像名称ImageView.我在下面附上了我的代码.
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Log.d("req","req"+requestCode);
Log.d("res","res"+resultCode);
if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {
Uri selectedImage = data.getData();
String[] filePathColumn = { MediaStore.Images.Media.DATA };
Cursor cursor = getContentResolver().query(selectedImage,
filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String picturePath = cursor.getString(columnIndex);
cursor.close();
imageView = (ImageView) findViewById(R.id.imgView);
imageView1 = (ImageView) findViewById(R.id.imgView1);
if(browse == 1){
imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));
}
if(browse == 2){
imageView1.setImageBitmap(BitmapFactory.decodeFile(picturePath));
}
String …Run Code Online (Sandbox Code Playgroud) 只是想改变动作栏颜色现在我正在使用 Theme.Sherlock.Light.Dark_Action Bar
需要改变颜色应该支持api 10及以上