2012-11-26 44 views
0

我正在創建一個webview應用程序,每次加載網站時都會加載啓動屏幕。我希望使徽標始終位於中心位置並位於進度條上方,無論用戶是否旋轉屏幕。我的問題是,每當我在觀點視角上獲得完美的位置時,當您進入橫向視圖時,進度條將會在標誌的上方。我希望中間的進度條以及進度條上方大約20dp的徽標。任何幫助! :)這是我的代碼如下:如何在Android應用程序上定位啓動屏幕徽標

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:a="http://schemas.android.com/apk/res/android" 
a:layout_width="wrap_content" 
a:layout_height="wrap_content" 
a:background="#ffffff" 
a:gravity="top" 
a:orientation="vertical" > 

<WebView 
a:id="@+id/webView1" 
a:layout_width="fill_parent" 
a:layout_height="fill_parent" /> 

<ImageView 
a:id="@+id/imageView1" 
a:layout_width="wrap_content" 
a:layout_height="wrap_content" 
a:layout_centerHorizontal="true" 
a:layout_marginTop="50dp" 
a:scaleType="centerInside" 
a:src="@drawable/logo" /> 

<ProgressBar 
a:id="@+id/progressBar1" 
a:layout_width="wrap_content" 
a:layout_height="wrap_content" 
a:layout_alignTop="@drawable/logo" 
a:layout_below="@drawable/logo" 
a:layout_centerHorizontal="true" 
a:layout_centerVertical="true" /> 

<Button 
a:id="@+id/buttonBack" 
a:layout_width="wrap_content" 
a:layout_height="wrap_content" 
a:layout_alignParentBottom="true" 
a:layout_alignParentRight="true" 
a:fadingEdge="horizontal|none" 
a:onClick="backActivity" 
a:text="Back" /> 

</RelativeLayout> 

回答

相關問題