2 Replies - 1421 Views - Last Post: 10 September 2012 - 07:54 PM

#1 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Eclipse error string type not allowed please help

Posted 10 September 2012 - 07:35 PM

Im trying to put some images into my main screen and I cannot seem to make this work. I have the images in all four of the drawable folders under the resource tab. I have tried googling but cannot find anything.

HEre is my xml file

<ImageView 
                    android:id="@+id/ImageView2_Right"   
                    android:layout_width="wrap_content" 
                    android:layout_height="wrap_content"                
                	android:layout_gravity="center_vertical|center_horizontal"
                	android:src="drawable/splash2.png"/>



Any help you can give is greatly appreciated. Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Eclipse error string type not allowed please help

#2 H3R3T1C  Icon User is offline

  • Android Expert
  • member icon

Reputation: 276
  • View blog
  • Posts: 757
  • Joined: 30-March 07

Re: Eclipse error string type not allowed please help

Posted 10 September 2012 - 07:47 PM

this is wrong :
android:src="drawable/splash2.png"

it should be:
android:src="@drawable/splash2"

Also your splash2.png needs to be in the drawable folder
Was This Post Helpful? 0
  • +
  • -

#3 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Re: Eclipse error string type not allowed please help

Posted 10 September 2012 - 07:54 PM

Thanks man it works now. I cant believe it was that stupid of a mistake. Thanks for the help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1