I have been editing the stupid android studio layout for the last 3 hours, and I cant change the preview!
For some reason, android studio layout is stuck on wear square! I just want my layout to be a Nexus 6p, but when I click on that, instead of changing the layout editor phone, it just jumps to my layout-normal xml!
How can I change the phone shown on the layout editor? It is causing me way too much trouble
You can change the devices by pressing D from the keyboard into the Preview pane. Previous settings will be set to default when you will restart the studio.
Resize your layout by dragging the bottom-right corner of your layout to the far bottom right of your screen.
The "Device in Editor" drop-down will change to "Custom".
You should now be able to select any listed device.
I had a similar problem. Accidentally pressed "Force Refresh Layout" from the design toolbar (where you select design and blueprint) and it fixed the problem.
You might have made a different layout folder for watch and other screen resolution for device like layout, layout-large, layout-xlarge.
Try to check for your layout folder by cleaning and rebuilding project again.
Related
I have recently started using Android Studio and cannot work out how to access the properties window.
The following screenshot was taken from Google and shows exactly what I'm trying to access denoted by the red rectangle around the properties window.
Can anyone please tell me how I can access this?
Switch to design view. Click "Design" tab at bottom-left work area.
In the new Android Studio Version 3.1.2, the name of the Propierties Windows is "Attributes".
Look at this picture:
Attributes basic view
And, if you want to see the complete attributes, simply click on "View all attributes":
Attributes full view
How to restore windows?:
restore windows
I had the same issue than found that the properties window was always there but I had to drag it out with my mouse. Just go to the far right vertical bar in Design mode then drag to the right when your mouse turns into horizontal arrows pointing away from each other. Hope this helps!
You can just click on the design tab on your screen (at the left bottom corner below your code text window) and just click on anything whose property you want to change
make sure you are in the '.xml' file
I accidentally deleted the properties side bar and Window-->restore deafult layout helped.
Follow the doc.
Instead of editing your view properties in XML, you can do so from the Properties window (on the right side of the Layout Editor). This window is available only when the design editor is open, so be sure you've selected the Design tab at the bottom of the window.
When you select a view, the Properties window shows the following, as indicated in figure 5:
View inspector with controls for width/height style, margins, and bias (available only for views in a ConstraintLayout). For more information, see Build a Responsive UI with ConstraintLayout.
This happens all the time, to my opinion Android team should see as an improvement opportunity, here is the solution, click on the settings (gear symbol) on the right make sure that the attached side is set to None. also -See screen shot-> 1,
You have three ways to see the fields, design mode, split mode and code mode. THE ONLY ONE THAT shows the Attribute bar is on the SPLIT MODE, click on the Attribute see screenshot->
if that does not work, you can go to Windows -> Restore default Layout
if that still does not work you can do File -> Manage IDE Settings -> Restore Default Settings.
if that still does not work you can go in file explorer and delete the .android studio folder in C\users[your user].Androidstudio#.#
Hope this helps someone out there...
as You can see on the screen shot: all labels on my buttons in Android layout designing are moved right. Of course they are correct when using emulator, but this irritates me during designing layout.
Whan can I do to change this?!
Screenshot
OK I solved it myself: it requires to restart Eclipse, and if that doesn't help: restart computer and Eclipse ;-)
in my Eclipse installation I've lost the palette toolbar from where was possible to drag&drop widget on the Layout.
I'm currently opening layouts in Graphical Layout and can see everything (Structure browser, properties of widget) but no palette.
I've closed it for a mistake but now I'm no more able to open it again.
I tried to close and open Eclipse many times, I searched around in options but nothing.
What should I do? I'd like avoid to reinstall everything!
Thanks
You can try one of the following
1) Enlarge your Graphical Layout
2) Is your computer system language set to English? If not, switch it to English.
3) From the paleltte, click on the arrow pointing downwards and select "Refresh Preview"
How do I remove the android emulator's Status Bar inside Eclipse's Graphical Layout? My application is set to run in full screen mode, but I'm having a hard time in layouting because the status bar is present in the graphical layout of Eclipse.
You can just change the theme in the drop-down list (or perhaps better said in Android terminology: Spinner :)) at the top right corner in the layout editor to one of the *.NoTitleBar.Fullscreen options.
Edit: added screenshot.
By the way, if you have a hard time creating layouts that properly scale with or without the titlebar/actionbar, you may have to rethink if you're going down the right path. If you're developing for a specific (number of) device(s), then I haven't said anything.
you can select the theme spinner and select the "Theme.NoTitleBar.Fullscreen".
Using code:-
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
above written code placed in oncreate method
I had the same problem. In debugging process, my graphical layout was perfect on the Eclipse but not correct on my phisycal device because of the statu bar at the bottom of the graphical layout on Eclipse.
I resolved this problem modifying the Theme of the layout inside eclipe and choosing "SearchBar", as shown in the pictures below. I hope to solve this question.
See the setting on Eclipse
I'm not sure what happened exactly, but when I started up eclipse, there are no widgets in the graphical layout palette, as in the folders show nothing in them. It has worked before. Is there any way to fix this?
Got the same problem, just enlarge your Graphical Layout and it works.
Switch your computer system language from your country language to English! The widget folders in palette cannot read your country language; only English.
This fixed it for me.
I experienced a similar problem, where some of the widgets such as TextView and EditText were missing from the paleltte.
Here is what I did - from the paleltte, click on the arrow pointing downwards and select "Refresh Preview", here is a picture of what I'm talking about:
right click on palette then select DOCK ON then select left
It will not show if there is not enough space on your screen fr some reason. You need to minimize a window to open up your working space and it will show.
The same thing happened to me.
After trying everything, I changed the theme of the project. And oddly, the widgets reappeared.
The themes can be changed in the top bar of the design window.