Android中的圆形布局

时间:2015-10-17 06:45:54

标签: android android-layout

有人知道如何在Android中以横向模式为屏幕创建圆形布局吗?就像在这张图片中一样:

Sample Image 以下是我的纵向模式屏幕的XML文件:

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);

请检查我的代码并帮助我。

1 个答案:

答案 0 :(得分:3)

您可以查看以下链接以了解测试用例。我希望它会对你有所帮助。

  1. Android-CircleMenu
  2. https://android-arsenal.com/tag/138
  3. WearCircleMenu