Stuck on layout format - android

Recently did a refreshers course in Android. I see that they changed a lot with the update. I have run into a few problems which I hope someone can help me figure out. The course gave me this code to be able to add in a button and make it activate for Android. However, this code is slightly outdated and I have attached the screenshot of the code I tried to fix according to what Andriod wants. think most of the problem is that with the new andriod sutidio I am working with this layout :androidx.constraintlayout.widget.ConstraintLayout
I would like to know in the ain activity how can I fix the problem in the screenshot attached to get this right. Please help because I can't move forward until I figure out the problem. I would like to know how do I change the "R" to the right code for constraint layout.

If you have error of R, then follow below steps.
Go to File menu in android studio and click on Invalidate cache / restart option.
Then clean your project.

Related

How can you permanently disable palette and component tree in android studio

I have a problem because I am using a tiling window manager, everytime I open an XML file, in Android studio, then these two small windows open op and block my view of the code. I don't know how I can permanently disable the windows/toolbars/view, (or what you call them)
I use Mod+Q to exit them every time I open the XML file, and it is quite tiring, so I am wondering if there is a way to get rid of these useless panels for goods :-)
I already searched alot in the settings of android studio, and I tried to click remove from sidebar and I even found out that you can click Shift+Escape to hide it, but my fingers gets tired from all this extra clicking everytime I enter XML split mode... :-)
Please Help Me - and thanks in advance! :-)
Thanks in advance.
right click on the title, and click on attached side
then left
then you can minimize it

Android Studio's review layout did not show text. Why this happen?

This problem happen after android studio suddenly close itself. I feel relieve when i see the interface output can show it's text but, it annoy me when i try to codes the interface and there is no text shown there. How can i solve this problem and what make this problem occur?
I already solve this problem by use the new render layout. I kind a hesitate to use it at first because i have face this problem before and it is also render problem. No matter how many time i change my codes according to suggestion and change the render layout. Still nothing works. I need start from scratch because i can't find the solution. But this time it's work.

Android Studio: Auto Refresh view when editing the xml for a layout

I'd like to work with they layout.xml code open on one monitor where I am editing the code, and the layout preview running on my other monitor. I can get this setup working, but what I really want is for the layout to refresh automatically everytime the code is changed, or at least every time the code is saved. Currently, I have to click the preview, at which point it updates.
Jimu Mirror
see this
Actually I have not used this. But it might be the one you are looking for.
ps - It seems that it is not free :(
also you could report from here to android studio

Why alt+/ doesn't work in the ADT

All, Forgive me I am a newbie for the Android world, I have a problem with the preference of IDE(ADT), Because The content assist short cut (alt+/) doesn't work for me. Please help to review it .thanks.
In the following code, I hope content assist can automatically make suggestions for me ,But it does't show anything when I press Alt+/. So far what I can do is right-click mouse, and select source\Override/implement methods... But I think it still seems verbose for overriding method. Is there any better way to make it? thanks.

Eclipse - Clicking in XML content deletes/rearranges it?

I'm working in Eclipse and in my Android app, if I click around inside my XML file, it randomly re arranges the text and even deletes some of it! Has this happened to any of you, and if so, what is going on here?!
It is probably because there is some error in eclipse. Usually, just save it where you are and just reopen it. Yes, I do agree that you will lose the ability to undo once you close the file and reopen it :( but what can you do. hopefully, they fix i :)

Categories

Resources