I was doing a code inspection with Android Studio and I accepted a change across multiple file which I now wish to undo.
When I go to VCS|Local History | Show History for one of the files, I can see the change was applied to 25 files, but I do not know how to show which files these are. I have version 0.3.5
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.. the same for layout folder etc..
You can use Shelve changes.
This is a great tool to view your changes.
Here is how to open the 'Shelve changes' dialog in Android Studio :
And here is what the dialog looks like :
You can also use this box to commit your changes if you want.
Related
For example, is there a way to the project view just show the appcenter module and hide the others from the view.
(Answer for Android Studio 4.2.2, not tested with previous versions)
Maybe Android Studio Scopes may do the trick.
Open File menu > Settings
Navigate to "Appearance & Behavior" > Scopes
Create a scope with "+" button, give it a name, and select in the tree the relevant part you want to show. Nodes can be include or excluded in a single way or recursively.
When done, valid and close the dialog with Ok.
On top of the "Project" tool window, click the dropdown button to show all the available views (Project, Packages, ...) Here, the scope you've just created should be listed and can be selected.
The project tree should only show the scope configured items.
I am importing an Android application in Eclipse as a Gradle build. The application is build and runs fine. When I try to see the layouts defined in XML I can, but when I switch over to the Graphical Layout I get
The project target is not set. Right click project, choose Properties | Android.
What I did:
Right click Project->Properties to find the Android tab but is not there.(*see picture 3)
On the Graphical Layout there is a switch that is supposed to be pointing to the latest API available. Instead it says: Null(*see first picture)
When I try to change it I get Resource ...... does not exist prompts (*see second picture).
How can I open the XML layouts in the Graphical Layout?
please check whether set SDK location.as follows:
Eclipse -> Preferences -> Android
LEFT click (not Right) and select Android worked for me.
I am trying to extract style in android studio 0.8.9 using the refactor option. But it seems to be disabled for some reason. I have tried cleaning and rebuilding the project just in case and even restarting Android Studio, but nothing seems to enable the extract style option.
Do let me know if anybody else is facing the same problem or is there a way to solve this ?
Screenshot image:
I had the same problem. Extracting styles is different in Android Studio:
You don't need to select text and choose Refactor->Extract->Style, just choose the menu option With no text selected.
So, just click anywhere inside the ImageView element (Do not select any text). The refactor option should become available.
Works fine for me without selecting any code. To extract layout you need to select the whole layout not just a part of it.
I am developing an AIR application (no flex, pure as3) for Android in Intellij IDEA, but I cannot find a way to disable orientation change. I remember when I was using flex builder, I could just tick a checkbox somewhere in the preferences and it updated the descriptor XML file with some lines. I cannot find the necessary lines and the actual XML file though.
How can be the orientation locked in portrait?
Thanks
Open "YourAppname-app.xml" in the default src folder.
Search for "autoOrients" and set it's value to "false".
Then go for "aspectRatio" and set it to "portrait".
Some of the values might be commented out, so you might need to remove the comment around it first.
Silly me.
It is a little bit cryptic, but here's how you do it:
Go to File > Project Structure (cmd+; on Mac)
Select Modules on the left pane
Choose your project (It will say something like "Project name (app)"
Select Android or iOS tab, depending on what you want to create a descriptor file for
Select Custom template
Press Create button
Select all your needed options, press Create and that's it!
I'm wondering if anyone knows how to open two windows of Android Studio with both having the same project. I know you can drag tabs out, but that allows you to only edit that one file. I want two fully-featured windows with each being able to see the Project Files/Structure.
I don't want to just split the editor, I want a separate window.
I want two of these windows, with both "looking" at the same project:
I don't want another one of these windows, as I can't view the project structure and change that, and it's hard to change it to a different file in this view:
Right click on tab of the file and click "Split vertical / Horizontal"
After splitting, you can just drag one of the tab titles to the second monitor - it will open up a new window. You can then edit the same file in two separate windows
If you click and drag a file's tab out of your current window (over onto the desktop, for example), the file will open in a new window. However, this window doesn't seem to have the whole package explorer, console etc.
Although, if you click on the gear on any of the modules, you can uncheck 'pinned' mode and you'll be free to move them around your two monitors just like the window you created above.
Window -> Editor Tabs -> Split Vertically
if you don't use files tabs
If you want to split tabs of android studio project beetween monitors, you can rigthclick to tab(project, debug, terminal etc) and check the "floating mode" option.
See the image: Floating mode tab option
After that you can drag this tab between your monitors as new window.
Could you just make a copy of android studio & run it side / side? You can run different versions of android studio side/side.. Maybe that is an option.
Just drag the tab outside the current window.
right click on tab and click on windowed mode, it will open up a new window.
One hacky way of doing this (but you will not be able to save in the same project) is to make a copy of the project folder and open it in Android Studio.