开发者

how to set progress bar in middle of emulator

开发者 https://www.devze.com 2023-03-11 12:19 出处:网络
hi how to set progress bar middle of screen of android emulator i am using this but not working..its showing top left corner..how it will be in middle...???

hi how to set progress bar middle of screen of android emulator i am using this but not working..its showing top left corner..how it will be in middle...???

     ProgressBar
    android:id="@+id/Bar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity = "center_vertical|center_horizontal"

    and in java class

    setContentView(R.layout.loadingimage);

  ImageView mainImageView = (ImageView) findViewById(R.i开发者_JAVA技巧d.imageView);
  **ProgressBar progressBar = (ProgressBar) findViewById(R.id.Bar);**
  String imgurll=Artistspacedetailview.imgurl;
  String imageurl = imgurll;


android:layout_gravity = "center_vertical|center_horizontal"

try it.

0

精彩评论

暂无评论...
验证码 换一张
取 消