0

I am trying to add an image below is the xml code which has buttonpayicon as the image

<ImageView  android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/buttonplayicon" />

I have added below snippet in strings.xml

 <string name="imageView1">Enter a message</string>

When I run the project I get below error message

Invalid layout param in a LinearLayout: layout_alignParentBottom    activity_main.xml   /FirstAppPradnnya/res/layout    line 25 Android Lint Problem
[Accessibility] Missing contentDescription attribute on image   activity_main.xml   /FirstAppPradnnya/res/layout    line 28 Android Lint Problem
Wrong orientation? No orientation specified, and the default is horizontal, yet this layout has multiple children where at least one has layout_width="match_parent"    activity_main.xml   /FirstAppPradnnya/res/layout    line 1  Android Lint Problem

Anyone has any idea how to fix this?

user3722025
  • 21
  • 1
  • 1
  • 4

1 Answers1

1

Change following to your layout xml file as

1 . layout_alignParentBottom is for RelativeLayout not for LinearLayout. So remove this from your layout file.

2 . Add android:orientation="vertical" under tag as

    <LinearLayout 
    //your tags
    android:orientation="vertical" >

3 . And for content Description,

this link 'Missing contentDescription attribute on image will help you.

And for Others please post activity_main.xml file.

Community
  • 1
  • 1
Giru Bhai
  • 14,370
  • 5
  • 46
  • 74