[COLOR=#000000][FONT=Tahoma][FONT=monospace]RelativeLayout layout [COLOR=#339933]=[/COLOR] [B]new[/B] RelativeLayout[COLOR=#009900]([/COLOR][B]this[/B][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR]
ProgressBar progressBar [COLOR=#339933]=[/COLOR] [B]new[/B]ProgressBar[COLOR=#009900]([/COLOR]MainActivity.[B]this[/B],[COLOR=#000066][B]null[/B][/COLOR],android.[COLOR=#006633]R[/COLOR].[COLOR=#006633]attr[/COLOR].[COLOR=#006633]progressBarStyleLarge[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR]
progressBar.[COLOR=#006633]setIndeterminate[/COLOR][COLOR=#009900]([/COLOR][COLOR=#000066][B]true[/B][/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR]
progressBar.[COLOR=#006633]setVisibility[/COLOR][COLOR=#009900]([/COLOR][COLOR=#003399]View[/COLOR].[COLOR=#006633]VISIBLE[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR]
RelativeLayout.[COLOR=#006633]LayoutParams[/COLOR] params [COLOR=#339933]=[/COLOR] [B]new[/B] RelativeLayout.[COLOR=#006633]LayoutParams[/COLOR][COLOR=#009900]([/COLOR][COLOR=#CC66CC]300[/COLOR],[COLOR=#CC66CC]300[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR]
params.[COLOR=#006633]addRule[/COLOR][COLOR=#009900]([/COLOR]RelativeLayout.[COLOR=#006633]CENTER_IN_PARENT[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR]
layout.[COLOR=#006633]addView[/COLOR][COLOR=#009900]([/COLOR]progressBar,params[COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR]
setContentView[COLOR=#009900]([/COLOR]layout[COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR][/FONT]
[/FONT][/COLOR]