我有我的Android應用程序的加載屏幕。中心ProgressBar和XML中的圖像android佈局
它的工作確定,如果我只用背景圖片或進度,但是當我嘗試在屏幕的中間居中這兩個元素,我得到的是:
到目前爲止,我activityy_main.xml
看起來像這樣:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/mainLayout"
tools:context="com.siconet.axa.MainActivity" >
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/axa_logo" />
<ProgressBar
android:layout_width="250px"
android:layout_height="250px"
android:indeterminate="true" />
</RelativeLayout>
<WebView
android:id="@+id/webView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</RelativeLayout>
我想實現的是這樣的:
謝謝,但它看起來完全一樣之前... – 2015-02-05 15:29:05
如果您不介意,請檢查我的更新答案。 – 2015-02-05 15:41:53
這正是我想要的!謝謝!!!! – 2015-02-05 16:07:57