I've added a folder called layout-976x600 in my android project for a resolution specific layout. All works fine, but I'm unable to preview the layout in Eclipse (4.2.1 Mac OS X Mountain Lion).
In the Graphical Layout tab, I just have a blank palette, viewing area, and the text "Loading editor" is forever displayed in the information box. Is it possible to get a preview here, or am I stuck doing work in the normal layout folder and moving once finished?
EDIT:
Ultimately this was fixed by renaming the folder. Oddly enough, if I renamed the folder, opened the file, renamed back and finally opened it again, it would sometimes work. Seems to be an issue with Eclipse. I should be using a legal identifier anyhow, so I marked that as the correct solution.
layout-976x600 is invalid name. There are only limited list of qualifiers you can apply to resource folders. This page will help you.
Related
As the title states, I've inadvertently set the font size to something gargantuan in Android studio and it's now totally unusable. At most I see the tops of a few letters once the program loads, so I can't even get back into the options to reduce the font size. Looking through the config files has given me no joy, so I am looking for some way of adjusting the settings from outside the program itself or deleting all user customised settings and starting again without completely deleting everything. I had tried to uninstall and reinstall, which worked for a short while then the font went back from normal to huge.
**Edit: I've managed to fix it (for now at least) by moving the .AndroidStudio1.2 file from my users folder and starting Android Studio again allowing it to reset.
The way to fix this is pretty easy actually.
Navigate to C:/Users/< your account >/.AndroidStudio/config/options/
Open ui.Inf.xml and change the FONT_SIZE property to an appropriate value (12 is default iirc)
Outside of Android Studio, find your Project folder location, go into it and go into the res>layout folders, find your XML layout, open and edit the layout in notepad and you can change the size outside of Android Studio
Since you seem to be in quite the situation, go ahead and try these steps:
ctrl+alt+s
up arrow key (x7)
right arrow (x1)
down arrow (x1)
tab (x4)
backspace (x5)
type "12"
press enter
After a month of development, my project has suddenly decide to refuse to update my button graphic. I took my existing 9patch button and brightened it a little, saved it, and now it won't update on my device. Eclipse shows the new graphic (eventually) but the device rendition is the old button. I have to manually Clean, but in doing so my 9patch has broken and doesn't scale. I've read my 9 Patch Image stopped working and included the jar, but still the 9patch I'm trying to change won't update on my device, or it updates as a standard fixed-sized image with the black 9patch markings showing. If I delete the 9patch from resources and replace it with another button, it works.
Basically it's as if my project has gotten hokey. I've used Clean... and resource Refresh repeatedly, but it's not playing well. Once it even said I had manually edited the R.java file after a Clean... Is there some super cleanup reset thing I can do?
tldr; When I change graphic, the new graphic isn't updated on device. I use refresh and Project/Clean but that breaks the 9patch. What's wrong?
This might seems silly but seriously I don't even know why it reacts that way. I am using eclipse JUNO, and I just trying out simple program enables me to put an image inside the layout after my real program said it have the error.
The project shows the error icon but when looking all in the subs-project like the class, layout everything, it is crystal clear. You can see it like the picture above.
I have making an android project before I am updating the adt and stuff. Before this, all I do just put any picture(s) I want in any folder drawable. I believe this is the right step and I know I do the same thing in here but it have issue with it. I even search on the basic tutorial how to put the image and it did the same why I did.
Does anyone knows what had happen here?
Android dont allow image names to contain capital letters in drawable folder change the name to contain only small letters
Capital letters , and some symbols are not allowed to be in the name of the png file , update the name of the png file , . make it in smaall letters
As per user inazaruk's answer, Hence the reason for not using special characters inside file names, as they can no be used in Java names.
As for capital letters, I guess that's to avoid one little problem in Windows vs. Linux environment. That's because Linux thinks that Icon.png and icon.png are different files, and Windows thinks that Icon.png and icon.png is the same file. So anyone using Linux can create application that is not compilable on Windows.
So, change your Humanpng with human Also don't use the extension png as picture name.
Just check your Problems tab in Eclipse. You can find it from
Window > Show View > Problems.
There you can find the error description.
I'm trying to create an icon for our Android app. The png is created and was put into the proper folder of my project so it can be batched with the batch file. Up to now, everything was fine, but I did a new image I wanted to test on the emulator, but now, although the image is in the appropriate folder and my batch file configured correctly (it works for our 2 other identical projects), it won't take the new image and the previous one I tested keeps being batched despite being deleted (the .apk and key generated with the previous image were deleted as well) and also the app was removed from the emulator. Any ideas what could cause this? Also for some odd reason (I haven't touched the code of the project for well over a week), I ended up with this error "LanguageURL cannot be resolved or is not a field", I managed to fix it by copying the same line from the same project. Would that have anything to do with it?
Thanks for the help
Happened to me before... Are you sure the icon fits the specs?
Look here: http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html
I'm developing an android app, I'm testing with samsung galaxy tab, for any reason my xxx_layout.xml is not working, it remains in its first version, if I modify it none of this changes are viewed, I make all the process to generate an signed apk, clear any data in the tablet before install but this problem still appearing.
Please any sugestion or solution is welcome, thanks
Greetings
Do you have another definition that is ovrriding this one?
Files in res/layout/ are "defaults" or fallback versions that are used when no better one is found. Now on a tablet,with a hdpi or xlarge screen, layouts in res/layout-hdpi or res/layout-xlarge are taken before the ones in res/layout.
can you make sure that this layout file is actually used.
also check if you have any errors in the layout file.