5

What is the difference between a view and a subview in Android?

Reg Edit
  • 6,719
  • 1
  • 35
  • 46
ina
  • 19,167
  • 39
  • 122
  • 201

3 Answers3

2

there is no such thing called a 'subview', its just used to refer to a view inside another view.

Vinay W
  • 9,912
  • 8
  • 41
  • 47
2

View is the base class for widgets, which are used to create interactive UI components (buttons, text fields, etc.). and if we insert a view inside the another the its become Subview like a linear Layout containing a button view, here button is a subview

Rajendra
  • 1,700
  • 14
  • 17
2

Like Vinay said, there is no such a thing. But you have ViewGroup that contains other Views. For example, LinearLayout, RelativeLayout etc are derived from that class. If you wish, you can read more about it here: http://developer.android.com/reference/android/view/ViewGroup.html

KwahuNashoba
  • 244
  • 3
  • 13