How to toggle bookmark in current file - android

I usually used bookmark in Android Studio and
when I use short cut to next bookmark or previous bookmark, will only be on current file.
But now in Android Studio new version, it will go to bookmark in other file, what a annoying change.
how to change it back? thanks for help.

Related

Android Studio Can't Undo

Some times when I try to undo changes in Android Studio I get this:
Can't Undo
Following files affected by this action have already been changed.
That's nice but I don't care about the files affected. I only care about the current file. I will deal with those files later. Is there a way to force Android Studio to undo my textual changes in the current file and worry less about what's in other files? This is one of those situations when devs think they know better than the user. Makes me scared of using that undo button tbh.
The reason for this is
You have first done some action(A) which has affected some set of files including some file called F.
Then you have done some changes which has affected another set of files which including some files on previous set but not F.
Now you go to file F & try to undo. The action(last) on the top of the action stack for F is A. But when you request it to revert back, it has to revert back with all the other files because you are reverting the action not just text. But since some set of other files has over changed with your later actions, your request cannot bypass them. So you are getting message.
Can't Undo
Following files affected by this action have already been changed.
So you want only to revert your changes locally to F(or some folder). For that purpose you have a tool called Local History.
You can go to your file and then VCS -> Local History -> Show History. Or Right click your file or folder -> Local History -> Show History.
You can see your multiple revision histories and restore anyone you want. :))

Huge unusable font size in Android Studio

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

Is it possible to find out last modified date in android studio project?

I an had exam in Android App development in my university. It was a home exam and we had 5 days for our projects. Deadline was last Friday and I delivered the wrong project with almost same name. Now I have to send complaint for exams office and explain that I actually had made project until the deadline.
So I was wondering is it possible to find out last modified date that I could use as a clue or evidence that I have made my project at the right time and that other project I have sent was by mistake.
Right click on your project in project structure on the left, then
Local History -> Show History
If you want to show history only for src folder, click on it then
Local History -> Show History
... the same for layout folder
Or
VCS -> Local History -> Show History
Right click on the project src then go to Local History and then Show history

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.

How to change default app icon shape in Android Studio

I started using Android Studio recently and I found one thing different (notably) that unlike in Eclipse, Android Studio does not provide any option to choose app icon and its shape & size while creating a new app.
While finalizing my app development I tried to change default 'ic_launcher.png' with my own image but I am not able to change its shape (which is square by default) to circular.
So my question is - Is there any way of changing app icon shape in Android Studio ?
And if this question is already been solved on some other thread then please share that link with me. (P.S.- I tried to search with similar question here but couldn't find probable solution, therefore posting this question on my own)
Just add new Icons in all drawable folder and update the icon name in manifest file.
To change the icon shape following tool can be usefull:
http://romannurik.github.io/AndroidAssetStudio/
Sorry for the late answer first of all. Here is my answer:
While launching Android Studio 1 RC in Beta Channel, they did not add this feature of adding image assets to the app directly from the Android Studio.
But since Android Studio 1.1 update, this feature is available to use.
Here is how you get different icons:
Click on res under app directory of you project.
New --> Image Asset
Choose Asset Type (Launcher Icon | Action Bar and Tab Icons | Notification Icon).
Choose your Image from the directory and perform other necessary changes to get the icon you desire.
Click next and then select
Type Module and Res Directory and click Finish.
You will see your icons under res folder directory.
I hope this was helpful, thank you!

Categories

Resources