Huge unusable font size in Android Studio - android

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

Related

Android Studio detects no changes with copied files so can't PUSH to Git

A very common thing that I tend to do is when I need to update a graphic or something in the drawable-nodpi folder, or any other folder for that matter, Android Studio doesn't detect the change so of course when I try to "PUSH" to GitHub it doesn't actually push and just tosses me the "No Changes Detected" message.
Is there a way to push anyways? Just to force a commit on specific files that I want to push because I know for a FACT there was a change and I need it submitted?
Lately I been having to delete it first from within Android Studio, then save the file, then add it to GIT then try a commit, but even this works only 70% of the time and is very annoying.
Perfect Example.... I have a splashimage.png in the drawable folder, I am in Photoshop and I change something then do an override to the splashimage.png with my change, but of course Android Studio doesn't see this as a change so I can't Commit this file to Git or anything.
Are you using external editors like photoshop when editing files? If so, press refresh in Android Studio to make it detect changes in file system. Then it says something has changed and suggest you to commit. Of course you can use command line to add changes anyway and commit without even using Android Studio.
Apparently the item I was looking for was the Synchronize. I just go to the file and Right Click > Synchronize and it then does a check against the last one manually and see's if it was different. Kind of a Refresh like Kuitsi had stated, but its called Synchronize. Also some reason I can't get it to work by just clicking Synchronize next to the SAVE icon at the top under File menu. Not sure why.
Whats your git status after you copy the file? Do you commit the changes, before pushing?
Have the same problem. Resolved.
The multi-root project used to work just fine for years, detecting changes in sub gits, properly pushing/pulling per sub, but not anymore. After some playing with a broken merge, it has stopped working. And that's not a local git repo issue. Cloned it from scratch - same issue. Changes (doesn't matter internal or external) are not detected by the Studio VCS facility, though git from console shows changes, View/Recent Changes shows them, Local Changes tab doesn't show any (single Default changelist).
It looks like something has happened with the VCS roots detection or related settings. Fixed with Preferences/version Control adding missing roots manually. I wish there is an option to rescan a folder or to delete some settings file and have the studio detecting these roots again.

Android: What is the bin/res/crunch folder used for?

While modifying a white label app, I needed to change a logo and found it was located in 2 locations (duplicated):
res/drawable and similar folders (for other screen depths)
bin/res/crunch/drawable and similar folders (for other screen depths)
So I would like to know if I should care about the second folder, or if it's something generated by Eclipse/ADT.
They are automatically generated on build. You can ignore them.
The crunch is used to export the app by eclipse and I've experienced a problem that a drawable was not updated in a crunch. If you want to be really sure that you deliver what you see, just clean the res/crunch/drawable before exporting.
Based on my experience, i believe that this is because of import from one machine to another one. (mostly, like 64-bit to 32-bit)
Just delete the folder crunch... activity will run fine.

default selector for imageButton in Android

I'm trying to locate the Android XML and drawable files that are used by default for imageButtons.
I'm trying to customise an imageButton using a selector. When I create a new project, by default the background color of an imageButton is transparent-grey and it gets highlighted in blue when touched. (I'm SDK-19 and .Light theme). To avoid the hassles of re-creating lots of icons, I want to find the default XML selector code and 9.pngs Android uses for an imageButton.
Looking in the SDK android-19/data/res/drawable folder there are a bunch of XML selectors defined in files with names like "btn_default_holo_light" "btn_default_transparent" etc., and a bunch of button drawables in .../drawable-hdpi.
I can pick any of these, copy it into a "my_selector.XML" file in my project's drawable folder (plus copy the necessary drawables into my projects drawable_hdpi), and set "my_selector" as my imageButton's background. This all works fine...Except none of the SDK files I've found results in the default "blue when touched" effect (some turn the imageButton orange, others do nothing...).
I'm sure the default files are right there under my nose but I'm pulling my hair out trying to find them!
Any help appreciated
I am afraid you won't find the default images you are looking for in the SDK files. The default images can vary from device to device, rather than from android version to android version. The effect you are looking for is probably specific to your device/emulator.
"The appearance of your button (background image and font) may vary from one device to another, because devices by different manufacturers often have different default styles for input controls."
Reference^^
If you just want to get the images and copy them, you may be able to find them on the actual device by activating USB Debugging and searching through the usually hidden folders on your particular device. The storage of those files probably vary between devices so I am afraid I can't tell you where they are (some files are kept hidden even with Debugging active. In those cases apps such as ES File Explorer might be able to help). Although this probably wasn't the answer you were looking for I hope this helps.

Why won't Android Eclipse project update graphics?

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?

Previewing resolution specific layout in Eclipse

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.

Categories

Resources