16.8 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 16-12):
Figure 16-12
Once selected, a dialog will appear containing a list of compatible view types to which the selected object is eligible for conversion. Figure 16-13, for example shows the types to which an existing TextView view may be converted:
Figure 16-13
This technique is also useful for converting layouts from one type to another (for example converting a ConstraintLayout to a LinearLayout).