Home java Where is RelativeLayout?

Where is RelativeLayout?




The author of the book, which is now studying, offers in Android Studio to drag on the Preview Panel RelaViveLayout.

I have Android Studio 3.6.2. But there is no such layout in it. There are other options: constreintlayout, FrameLayout and others. Lee RelativeLayout renamed, whether they were replaced. I do not understand this badly.

Tell me how to replace relativeLayout (or where to find) so that I can perform the task described in the book?

Answer 1, Authority 100%

Add such kind of layout can also be manually, if for some reason it is missing. To do this, go to the text or mixed view of the XML file and add layout:

& lt; relativeLayout
Android: layout_width = "Match_Parent"
Android: layout_height = "wrap_content" & gt;
& lt; / relativeLayout & gt;

or if it is the parent Layout:

& lt; xml version = "1.0" encoding = "UTF-8"? & gt;
& lt; RelativeLayout XMLNS: Android = "http://schemas.android.com/apk/res/android"
  XMLNS: App = "http://schemas.android.com/apk/res-auto"
  XMLNS: Tools = "http://schemas.android.com/tools"
  Android: layout_width = "Match_Parent"
  Android: layout_height = "Match_Parent" & gt;
& lt; / relativeLayout & gt;

also advise you to search for widgets when choosing Palette in Preview:

As you can see such Layout, there is never anyway) as one of the options – you are not looking there 🙂

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions