Tools:context= ". The role of Mainactivity

Source: Internet
Author: User

 
  1. <TextView
  2. android:layout_width="wrap_content"
  3. android:layout_height="wrap_content"
  4. android:layout_centerhorizontal="true"
  5. android:layout_centervertical="true"
  6. android:text="@string/hello_world"
  7. tools:context=". Mainactivity " />


Always for tools:context=. " Mainactivity "This sentence does not understand, today looked under, found is this:

tools:context= the phrase "activity name" will not be packaged into the APK. Just the layout editor of ADT sets the corresponding render context in your current layout file, indicating that the rendering context of your current layout is the activity that the activity name corresponds to. If the activity has a theme set in the manifest file, the ADT Layout Editor will render your current layout based on this theme. That is, if you set the mainactivity set a theme.light (others can also), then you see in the visual layout manager of the background of a control ah or something should be theme.light look. Just to show you what you see and what you get.

Tools:context= ". The role of Mainactivity

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.