How to remove highlight of the views in preview in Android Studio - android

After the 3.3 update, I've noticed that most of the views in my XML file has this weird highlight in the preview screen on the right and it very annoying and preventing me of know what my views really look like.
any idea how to remove it?

I guess just tap on the gray background and this removes all selections highlights.

Related

android studio issue: complex Layout is not showing in design view but just as XML

I have a somewhat complex layout.xml file (353 xml lines, 16kb) with multiple nested constraint layouts. This particular xml file is only showing a blank white screen in the design tab but works well when I run it on device and emulator. I have other smaller layout files which show the design normally on android studio but it seems that there is a bug with viewing larger xml files.
Is this a known issue? I tried refreshing layout and removing android studio cache but nothing seems to work. any ideas?
I do not think it has anything to do with the code since it runs normally on device and I am not sure posting the whole xml file on SO is a good idea.
update
What I realised is that all the elements in the layout seem to be 'invisible' at the top left corner since when I hover over them the pointer turns into a hand and when I click , certain elements get highlighted in the component tree. This is a screenshot of what I am seeing:
I added android:visibility="gone" which is vital to my app. Little did I know that it also applies to the design view which I find to be really useless. I want the visibility to be gone during runtime, not on a platform where I am supposed to be tweaking the design of the UI. This is ridiculous to me.
Does anyone know If I can keep visibility="gone" but still see the design in the design view of the layout?
You can use tools:visibility="visible" for designing purposes.
It has zero effect on the view in real use.
Don't forget to keep your android:visibility="gone".
In general, use tools attributes whenever you'd like to manipulate a preview in the designer while keeping your view attributes valid for real use.
Edit:
Keep in mind that there is a huge difference between invisible and gone. More about that

Action Bar doesn't appear in latest update of Android Studio

After latest update of the Android Studio, the ActionBar doesn't appear in the preview screen. I reloaded the program several times, but it didn't help. Also, the text on the button looks a bit weird, but that isn't the main issue.
enter image description here
It looks like I just needed to enable "Show Layout Decorations", but rendering problem hasn't gone rendering problem

How to refresh preview on Android Studio 2.2?

Now on Android Studio 2.2 on new Preview mode, there are no more refresh button:
Image 1: Preview on Android Studio 2.2 (without refresh button)
Image 2: Preview on Android Studio 2.1 (with refresh button)
Does anyone know how to display it again? Or with shortcut maybe?
Edit: If I change a drawable by example and that the change does not appear in the layout, the only method that works for me is closed and restart the project. If I close the layout and as I re-opens nothing happens. Same result using the "Synchronized" button.
Refresh feature is not removed, it is there; It's pretty simple to refresh:
Click on the preview screen to make sure preview window has the focus and press R. It should display the progress in the right-top corner while refreshing.
If it doesn't work for any reason, switch to 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 modify the 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 that:
next step, click refresh icon(sometimes it is 'clear cache' label). it is works for me.
I have try to change the orientation, but it not works when I replace a exist image file.
May your problem is same as : http://stackoverflow.com/questions/39646639/android-studio-2-2-layout-editor-refresh-button
Display again?
I guess you cant. Apparently the refresh functionality has been removed because they think the processing will happen much faster and will auto-refresh the previews real time. The Layout Editor's document has no mention of refresh functionality.
Shortcut?
If you are faster in making changes to your layout than Android-studio refreshes, you could try toggling between the design and blueprint views using the shortcut B
Refer the Layout Editor Official Documentation for other shortcuts you might feel comfortable with or works for you.
So do the Simple Step. When you change your layout then save it and clean your project.
go to menu Build -> Clean Project.
I Hope this will help you.
There is no refresh button in stable version of android studio 2.2 for preview. But there is a work around to do so. By toggling the orientation button in an editor will refreshes the changes!
I too had the same Problem , sometimes changing the Android Version worked
and it'll sure work if you clean/Rebuild the project
Find the double diagonal lines below your preview layout and click them. It will refresh your layout.

Trouble Dragging Android Views

I'm trying to learn Android development and using the Android SDK in Eclipse. I'm following a tutorial to build the Main.XML file on the Graphical Layout tab. It instructs me to drag several Views onto the screen surface, including: EditText, Button, RadioGroup and RadioButton.
My issue is that these Views do not seem to drag. I place the mouse cursor over them, press the right button but the Views are not captured for dragging. There are other Views (such as Gallery) that seems to drag OK but those I'm interested in (to complete the tutorial lesson) do not drag.
Any help making this work properly would be appreciated.
Forget about dragging Android elements. The best approach is to hand code them. Eclipse helps a lot, since it can show you a preview of what you wrote.
you can try to edit the properties of the button i do believe that eclipse lets you do that
Goto Help->Check for New Updates and update
And then, You'll be able to drag n drop the View components onto your xml Graphical Layout. As #MEGA said, its advisable to hand code them. But, still as a beginner, I use Graphical Layout and the set properties using the Properties tab, which is more handy (since we donno what each property is for!)

How To Move Layout Items After SDK Update?

I just updated my Android SDK/etc (Eclipse IDE) and, while there seems to be some nice, new aspects/features of the Graphical Layout part for xml's, the previous ability of moving items using the Red Arrows up/down is missing and I'm not able to move items around (in or out of layouts).
Yes, I know I can (and guess I'll have to) move the actual xml code around but, I really like the ability to move items graphically.
Am I missing something?
Thanks
I don't think you are missing anything. Whoever wrote the new plugin is though, see:
Layout Outline in Eclipse lacks Up/Down Plus/Minus buttons

Categories

Resources