`
hooroger
  • 浏览: 13341 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

android programming- the big nerd ranch guide

 
阅读更多

Widgets are the building blocks you use to compose a user interface. A widget can show text or graphics, interact with the user, or arrange other widgets on the screen. Buttons, text input controls, and check boxes are all types of widgets.

    The Android SDK includes many widgets that you can configure to get the appearance and behavior you want. Every widget is an instance of the View class or one of its subclasses (such as TextView or Button).

 

LinearLayout inherits from a subclass of View named ViewGroup. Other ViewGroup subclasses are FrameLayout, TableLayout, and RelativeLayout.

 

<Button

      android:id="@+id/false_button"

      android:layout_width="wrap_content"

      android:layout_height="wrap_content"

      android:text="@string/false_button" />

 

Notice that there is a + sign in the values for android:id but not in the values for android:text. This is because you are creating the IDs and only referencing the strings.

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics