1

I am trying to setup a splash screen. When I am adding a background in LinearLayout, the xml is not showing me the android:background option. I have already added the (600 X 400).png image into @drawable/hdpi folder. Please help me out.

6
  • May be intellisense is broken in your Eclipse, if you add it manually does it work? Commented Dec 5, 2013 at 13:05
  • what is the name of your png file? Commented Dec 5, 2013 at 13:07
  • I use Eclipse and sometimes it doesn't tell me which attributes I can use, mostly when I have custom schemas as well declared in my xml along with the default xmlns:android="schemas.android.com/apk/res/android" Commented Dec 5, 2013 at 13:09
  • @M-WaJeEh name of the image is "splash_backgroung" Commented Dec 5, 2013 at 13:12
  • 2
    have you tried to Clean your project ?! Commented Dec 5, 2013 at 13:15

3 Answers 3

1

It always happens for me. Make sure you already added the image in your drawable folder and then Clean your project. It's all Eclipse's problem.

Sign up to request clarification or add additional context in comments.

Comments

1

Xml editors get messy sometimes, I use ctrl+shift+f and it works again, but it doesnt happen that often in most recent ADT.

Comments

0

It can happen sometime to me too, for no particular reason whatsoever. However, if you just write it down, without suggestion from eclipse, it will still be shown :)

4 Comments

It would be nice to figure out why it happens and how to get it working again, I have seen that in some xml it doesn't work and in another in same project it works.
I honestly never gave it too much thought. It can be just an annoying little bug in Eclipse. Same thing as you sometimes have to build your project in order for java to recorgnise your new layout, when you're trying to setContentView.
Also, similar bug to this one is with the Xcode, when you dont get a sugestion for some ViewController.h, when you are trying to connect actual layout to the class....this doesn't have to do much with this question, Im just reffering that it might be some minor thing
Thank You guys , it was happening cz of Eclipse only , just cleaned my project and i was good to go .. bt surely it's a headache..

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.