【发布时间】:2014-08-23 19:59:27
【问题描述】:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?android:attr/actionBarSize"
android:background="@drawable/stalker_background"
android:focusableInTouchMode="true" >
<ProgressBar
android:id="@+id/pb"
android:layout_height="75dp"
android:layout_width="75dp"
android:layout_gravity="center"
android:indeterminate="true"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ScrollView
android:id="@+id/svProfile"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<android.support.v4.view.ViewPager
android:id="@+id/VPSlider"
android:layout_width="match_parent"
android:layout_height="175dp"
/>
<android.support.v4.app.FragmentTabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</android.support.v4.app.FragmentTabHost>
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>
进度条出现在屏幕的一角,我怎样才能将它对齐到屏幕的中心。我有相对的布局,当我在屏幕上显示一些东西后,我将删除这个进度条,这就是为什么我需要在其他控件之上使用它。
【问题讨论】:
标签: android alignment android-relativelayout