Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

activity_main.java help for crystal ball app

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="15dp"
        android:scaleType="fitCenter"
        android:src="@drawable/ball01" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true"
        android:weightSum="1" >

        <View
            android:id="@+id/view1"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_weight="0.2" />

        <TextView
            android:id="@+id/textView1"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.6"
            android:gravity="center_horizontal"
            android:shadowColor="@android:color/white"
            android:shadowRadius="10"
            android:textColorLink="@android:color/white"
            android:textSize="32sp" />

        <View
            android:id="@+id/View2"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_weight="0.2" />

    </LinearLayout>

</RelativeLayout>

For the <ImageView it says that there is Missing contentDescription attribute on image. I do not know what to do, or what is missing. Thanks, the tutorials have really helped me.

1 Answer

I suggest looking at this Stack Overflow question as it is pretty popular.

http://stackoverflow.com/questions/9730673/missing-contentdescription-attribute-on-image-in-xml