1

I am following a udemy tutorial series in which the instructor is using a different version of Andriod-Studio and I am currently using the latest version and there is a difference in layout. The instructor is doing stuff using the device component where as i am unable to do all that.

I am a beginner so I have no idea how to manage or where to find it

The instructor is editing in the text field in his device's screen whereas I don't even see a text field in my screen

Here is my screen :

enter image description here

And here is my instructor screen:

enter image description here

Tamir Abutbul
  • 7,301
  • 7
  • 25
  • 53
Faraz Zaidi
  • 103
  • 8

1 Answers1

1

You need to drag your textView into the layout editor screen :

enter image description here

After you have done that open the attributes sidebar:enter image description here

And now click on the textView, in the attribute bar that you opened type "text" and change the text of your view :

enter image description here

Edit according to the comments:

Press the text tab : enter image description here

And now just change your layout :

enter image description here

Tamir Abutbul
  • 7,301
  • 7
  • 25
  • 53
  • This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as layout_editor_absoluteX). These attributes are not applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections – Faraz Zaidi Apr 15 '19 at 18:40
  • i get the error i mentioned above and plus when i drag and drop textview i can't see it on the screen – Faraz Zaidi Apr 15 '19 at 18:41
  • You need to give your view proper [constraints](https://developer.android.com/training/constraint-layout) so you can see it. In my answer, I only answered how to put your view on your screen. if you want to see it set the proper constraints. – Tamir Abutbul Apr 15 '19 at 18:43
  • something like this : `` – Tamir Abutbul Apr 15 '19 at 18:43
  • Also, if this answer solved your problem please accept it so others with the same problem could know to use it. – Tamir Abutbul Apr 15 '19 at 18:46
  • sorry to bother you tamir but it didnt and brought a bunch of more problems – Faraz Zaidi Apr 15 '19 at 19:01
  • I think that this is your first time using constraint layout, go to the XML and change your layout to `RelativeLayout` from `androidx.constraintlayout.widget.ConstraintLayout`. – Tamir Abutbul Apr 15 '19 at 19:02
  • - rendering problem -missing constraints in constraintslayout -hardcoded text -failed to instanstiate more than one classes – Faraz Zaidi Apr 15 '19 at 19:02
  • and how do i do that? – Faraz Zaidi Apr 15 '19 at 19:04
  • Ok my bad, I jumped a bit ahead, in your instructor screen he is using `RelativeLayout`, so go to the XML display and change it to `RelativeLayout ` as i showed in previous comment – Tamir Abutbul Apr 15 '19 at 19:04
  • and how do I do that? - On the left bottom corner, you can see the Design and text tab, swap to text. change your layout and return to the design option. – Tamir Abutbul Apr 15 '19 at 19:05
  • can you kindly guide me through the steps? i am a complete beginner and unfamiliar with the UI of android studio – Faraz Zaidi Apr 15 '19 at 19:07
  • I will add an image of it – Tamir Abutbul Apr 15 '19 at 19:07
  • than you so much bro <3 – Faraz Zaidi Apr 15 '19 at 19:11
  • Check the answer now – Tamir Abutbul Apr 15 '19 at 19:11
  • Render Probelm "Failed to load AppCompat ActionBar with unknown error" still can't see it :'( and also failed to instantiate error – Faraz Zaidi Apr 15 '19 at 19:20
  • i dont see a text field on the white screen when i drag and drop like you or my instructor . is there any way my view can look exactly like my instructor's? – Faraz Zaidi Apr 15 '19 at 19:22
  • For this problem check [this](https://stackoverflow.com/questions/44449275/failed-to-load-appcompat-actionbar-with-unknown-error-in-android-studio) – Tamir Abutbul Apr 15 '19 at 19:23
  • Bro tysm <3 it worked! i had to change apptheme to – Faraz Zaidi Apr 15 '19 at 19:33
  • Glad it helped you, kindly accept the answer. happy coding – Tamir Abutbul Apr 15 '19 at 19:35