本文整理了Java中android.os.Bundle.getByteArray()
方法的一些代码示例,展示了Bundle.getByteArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.getByteArray()
方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:getByteArray
暂无
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] b = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(b, 0, b.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] byteArray = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] byteArray = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);
代码示例来源:origin: facebook/facebook-android-sdk
@Override
protected boolean restoreState(Bundle savedState) {
byte[] bytes = savedState.getByteArray(FRIENDS_KEY);
if (bytes != null) {
selectedUsers = restoreByteArray(bytes);
setUsersText();
return true;
}
return false;
}
代码示例来源:origin: robolectric/robolectric
@Test
public void byteArray() {
byte [] arr = new byte[] { 12, 24 };
bundle.putByteArray("foo", arr);
assertThat(bundle.getByteArray("foo")).isEqualTo(arr);
assertThat(bundle.getByteArray("bar")).isNull();
}
代码示例来源:origin: JZ-Darkal/AndroidHttpCapture
float scaleFactor = 1.0f;
if (bundle != null) {
byte[] compressedBitmap = bundle.getByteArray(DecodeThread.BARCODE_BITMAP);
if (compressedBitmap != null) {
barcode = BitmapFactory.decodeByteArray(compressedBitmap, 0, compressedBitmap.length, null);
代码示例来源:origin: konmik/nucleus
when(bundle.getByteArray(anyString())).thenAnswer(get);
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] byteArray = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] byteArray = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);
代码示例来源:origin: facebook/facebook-android-sdk
assertArrayEquals(originalBundle.getBooleanArray(BOOLEAN_ARRAY_KEY), cachedBundle.getBooleanArray(BOOLEAN_ARRAY_KEY));
assertEquals(originalBundle.getByte(BYTE_KEY), cachedBundle.getByte(BYTE_KEY));
assertArrayEquals(originalBundle.getByteArray(BYTE_ARRAY_KEY), cachedBundle.getByteArray(BYTE_ARRAY_KEY));
assertEquals(originalBundle.getShort(SHORT_KEY), cachedBundle.getShort(SHORT_KEY));
assertArrayEquals(originalBundle.getShortArray(SHORT_ARRAY_KEY), cachedBundle.getShortArray(SHORT_ARRAY_KEY));
代码示例来源:origin: stackoverflow.com
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_accept_not_accept);
Bundle extras = getIntent().getExtras();
byte[] byteArray = extras.getByteArray("picture");
bitmap = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
((ImageView)findViewById(R.id.ivForAcceptPicture)).setImageBitmap(bitmap);
}
代码示例来源:origin: kayoSun/Tack
public byte[] getBytes(String key){
if (mBundle != null) {
return mBundle.getByteArray(key);
}
return null;
}
代码示例来源:origin: stackoverflow.com
setContentView(R.layout.full_screen);
full_view = (ImageView)findViewById(R.id.full_view);
Bundle bundle=getIntent().getExtras();
byte[] image= bundle.getByteArray("image");
Bitmap theImage = BitmapFactory.decodeByteArray(image, 0, image.length);
Bitmap resized = Bitmap.createScaledBitmap(theImage,width , height, true);
full_view.setImageBitmap(resized);
width = full_view.getWidth();
height = full_view.getHeight();
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] food = extras.getByteArray("picture");
Bitmap fo = BitmapFactory.decodeByteArray(food, 0, food.length);
mHeaderLogo = (ImageView) findViewById(R.id.header_logo);
//ImageView image = (ImageView) findViewById(R.id.header_logo);
mHeaderLogo.setImageBitmap(fo);
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] byteArray = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] b = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(b, 0, b.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] byteArray = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
byte[] byteArray = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);
代码示例来源:origin: curtis2/SuperVideoPlayer
Log.i("Subtitle : bitmap");
if (mOnTimedTextListener != null)
mOnTimedTextListener.onTimedTextUpdate(mData.getByteArray(MEDIA_SUBTITLE_BYTES), msg.arg1, msg.arg2);
代码示例来源:origin: alt236/Bluetooth-LE-Library---Android
public AdRecord(final Parcel in) {
final Bundle b = in.readBundle(getClass().getClassLoader());
mLength = b.getInt(PARCEL_RECORD_LENGTH);
mType = b.getInt(PARCEL_RECORD_TYPE);
mData = b.getByteArray(PARCEL_RECORD_DATA);
}
内容来源于网络,如有侵权,请联系作者删除!