有人知道如何在Android中以横向模式为屏幕创建圆形布局吗?就像在这张图片中一样:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if ((requestCode == PICK_FROM_GALLERY ) && (resultCode == RESULT_OK) && (data != null)){
selectedImageUri = data.getData( );
Log.e("Path1", ""+selectedImageUri);
path1 = selectedImageUri.getPath();
file = new File(path1);
path =file.getAbsolutePath();
Log.e("Path2", file.getAbsolutePath());
mImageView.setImageURI(selectedImageUri);
}}
protected void badButtonPressed() {
final long startTime = SystemClock.uptimeMillis();
BitmapFactory.Options options = new BitmapFactory.Options();
// Part 1: Decode image
>> Bitmap unscaledBitmap = BitmapFactory.decodeFile(path, options);
imageHeight = options.outHeight;
imageWidth = options.outWidth;
Log.e("w", ""+imageWidth);
Log.e("h", ""+imageHeight);
请检查我的代码并帮助我。
答案 0 :(得分:3)
您可以查看以下链接以了解测试用例。我希望它会对你有所帮助。