Can't move or arrange the tabs in android studio - android

For example I want to move the MainActivity code window/tab (highlighted in yellow in the screenshot below) to the left, but I when I drag and drop it goes back to being on the right. I can't move or arrange any number of open tabs.

Right click on MainActivity.kt, then select "configure editor tabs".
Make sure "sort tabs alphabetically" is unchecked.
Probably one of the checks there is in charge of your problem.
You can click on the top right "reset" there, it should solve your problem.

Move with holding ctrl (or alt)

I encountered the same problem, although in my case the Sort tabs alphabetically option wasn't checked.
Since I wasn't able to solve this issue otherwise, I resorted to restoring the default setting i.e.
File > Manage IDE Settings > Restore Default Settings...
which worked for me.

Related

android studio 2.2 layout editor refresh button

can someone help me find the refresh layout button which was there before studio 2.2 to refresh the layout changes?
Have searched every where but cannot find it.The problem is sometimes drawables are not refreshed and reflected in the preview window.
It's pretty simple to refresh.
Click on the preview screen, make sure that the preview window has the focus, and press R. It should display the progress in the top-right corner while refreshing.
If it doesn't work for any reason, switch to the design tab and press R. It refreshes the layout instantly.
I think it is a small bug, but I find a hack solution to resolve the problem.
You can change a resource id to a wrong name. For example, you have a resource named ic_launcher. When you input ic_launcher1, you can find the interface like this:
Next, click the refresh link (sometimes, it says 'clear cache').
I tried changing the orientation, but it does not work when I replace an existing image file.
Toggle the Orientation button in Editor, it is refreshing the changes.
Can't seem to find the refresh layout button too, it's as if it is deliberately removed.
However, I found a temporary refresh layout solution: On the screen orientation button, click the dropdown and then change the Night Mode. See this page for reference on where to find the screen orientation button. Hope this helps.
Close edited layout file and reopen.
You can do this with following shortcuts:
Ctrl+F4 (close tab)
Ctrl+Shift+E (open Recently edited files)
Enter
(select recent file to open, your layout file should be already
highlighted if edited last)

ExpandableListView clear animation when opening

I developed two menu like in Facebook app.
One of them contains expandableListView.
UseCase:
I open the menu, then I open a section. Now, My translation is closed by the redrawn, So it hides my menu.
To open my menu, I apply translation and then remove it and use offsetLeftAndRight to keep it open:
mainlayout.clearAnimation();
mainlayout.offsetLeftAndRight(pxTranslateMenu);
I tried to create my own view to solve this problem. But I have the same result when my items go from GONE to VISIBLE. When items go from INVSIBLE to VISIBLE all is OK, but i have a wrong render (free space where my items are placed).
Is there anyway of doing what i want : Keeping my menu open after clicking on section?
Thanks.
I tried to use some other component to avoid Accordion.
But i have the same problem when an EditText take focus or when i select an item in an AlertDialog.
I just found a way to overpass this problem.
I just create a new activity wich has a translucent part.
In this way, i can do what i want.
I hope that i'm gonna be able to resolve all demand by this way.

Unable to cmd+click on Java method in Eclipse in Mountain Lion

Yesterday I upgraded from Lion to Mountain Lion and today my productivity went down. I cannot perform "cmd + click" on a method or variable to go its declaration because the popup shown in eclipse contains a horizontal scrollbar which overflows the last option.
Does anyone have a solution how to fix this?
UPDATE: Just to be clear- neither "When Scrolling", nor "Automatically based on mouse or trackpad" options remove the problem for me. Only "Always" does work, but its consequences to the whole system UX are not acceptable
Try doing this. In Mountain Lion, go to Preferences -> General and for Show scroll bars choose Always like so :
That should prevent the scroll bar from covering the last option and allow you to click it. Does this help ?
Update
I just checked that this indeed works. In fact for me it's only the When Scrolling option that creates a problem. With either of the remaining settings, things are peachy :
Unfortunately, I can't post a screen shot since the cmd + click popup disappears as soon as I press the shortcut key for taking a screenshot (Cmd + Shift + 4).
Update 2
I just made this quick screen cast to show the relation between the Mountain Lion Preferences and how it effects eclipse. Take a look at it here.
If you press F3 while the cursor is on a variable or method then Eclipse will 'open declaration'. Fix the problem by removing the mouse-based workflow?

How to go back to default xml layout interface?

i don't how how this happens.. but i don't know how to use this format..
i just wanna go back to the default layout option in which you can drag n drop buttons,text fields and in back-end coding is automatically created..
i just don't find any option and don't know how to Google the problem..
thank you
When You are in Coding part and you want to go to Graphical layout you can press ALT + PAGE UP.
This will go to Graphical layout where you can Drag and Drop.
Hope this is what you are Searching for.
EDITED :
Right Click on that file --> open with --> Android layout Editor.

Android avd is off-screen

When I run my Android app in Eclipse I can see the emulator on the toolbar but the window appears to be off the screen. Clicking on the icon in the toolbar makes it flash in or out from the right but I cannot see it.
I have had this problem before but I cannot remember how I resolved it.
You could try this.
or
(Windows 7 only)
Hover over the window icon in the task bar so that the preview appears, right click on the preview and select "move." You should then be able to move the window with the arrow keys. You may have to hold down the arrow key for what seems to be a very long time.
As dell116 said:
Hover over the window icon in the task bar so that the preview
appears, right click on the preview and select "move." You should then
be able to move the window with the arrow keys.
But as soon as you have used one of the arrow keys, then move the mouse, and... voilĂ , the window turns up in front of us, just following the mouse movements. Place the window where you want and click the mouse's left button to release it.
None of the tricks here worked for me. What I had to do was in Windows right click background (desktop) select screen resolution. From there change the resolution to a smaller resolution. The window provided me with the window bar that was cut off, simply drag like normal. After I got it where I got it where I wanted it, I just changed the resolution back.
You can also right click on taskbar->properties change Taskbar location on screen to something else, Apply, and then you can set it back this will put your windows on screen.
Another one is right clicking on the taskbar->Cascade windows - this will put every window together in cascading order which is annoying but it does guarantee all windows will go on the screen.
In Windows 10,I faced the same problem. My solution is like that;
Start Android Studio
Select the Android Studio from ALT+TAB Menu(If'nothing happens,just relax :) )
Now press ALT + Space combination
Click Maximize
Now you may use the ide :)))
I faced the exact same problem. I tried the solutions suggested by Daniel and dell116. At first it did not work as the "Move" option seems to be disabled. However, during my final attempt it worked. I found out that you can only use this method only when the OS is starting up (i.e. when it is showing the android logo).
Good news is that after doing this once, it will stay in the desired position for future runs.

Categories

Resources