17.12 Converting Views
Changing a view in a layout from one type to another (such as converting a TextView to an EditText) can be performed easily within the Android Studio layout editor simply by right-clicking on the view either within the screen layout or Component tree window and selecting the Convert view... menu option (Figure 17-22):
Figure 17-22
Once selected, a dialog will appear containing a list of compatible view types to which the selected object is eligible for conversion. Figure 17-23, for example shows the types to which an existing TextView view may be converted:
Figure 17-23
This technique is also useful for converting layouts from one type to another (for example converting a ConstraintLayout to a LinearLayout).