0

I am programming for Android at Xamarin. I am trying to center a progress bar in a Relative Layout. However I am receveing this message: The 'http://schemas.android.com/apk/res/android:layout_centerInParent' attribute is not declared.

Look at the code bellow:

    <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="35"
            android:minWidth="25px"
            android:minHeight="25px">
            <ProgressBar
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/progressBar1"
                android:layout_centerInParent="true" />
        </RelativeLayout>

Someone can help me?

Jamshaid K.
  • 3,555
  • 1
  • 27
  • 42

1 Answers1

0

Your layout file has missing android xml namespace. Add xmlns:android attribute in your layout

xmlns:android="http://schemas.android.com/apk/res/android
Shubham Shukla
  • 988
  • 2
  • 13
  • 28