Return to Snippet

Revision: 42099
at February 27, 2011 09:29 by BenClayton


Initial Code
<?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="match_parent"
	android:orientation="vertical">

		<ProgressBar 
		android:layout_centerInParent="true"
			style="@android:style/Widget.ProgressBar.Horizontal" 
			android:id="@+id/progressBar"
			android:layout_width="fill_parent" 
			android:layout_height="60sp"
			android:layout_margin="10sp"
			></ProgressBar>
		<TextView android:layout_below="@id/progressBar"
			android:text="XX% complete" android:gravity="center" android:id="@+id/status"
			android:layout_width="fill_parent" android:layout_height="wrap_content"></TextView>
	
</RelativeLayout>

Initial URL

                                

Initial Description

                                

Initial Title
Android: Layout with a vertically-centered widget

Initial Tags
xml, layout, android

Initial Language
XML