tools:context=".MainActivity的作用
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_centerVertical="true"
- android:text="@string/hello_world"
- tools:context=".MainActivity" />
一直对于 tools:context=".MainActivity"这句不懂,今天查了下,发现是这样的:
tools:context="activity name"这一句不会被打包进APK。只是ADT的Layout Editor在你当前的Layout文件里面设置对应的渲染上下文,说明你当前的Layout所在的渲染上下文是activity name对应的那个activity,如果这个activity在manifest文件中设置了Theme,那么ADT的Layout Editor会根据这个Theme来渲染你当前的Layout。就是说如果你设置的MainActivity设置了一个Theme.Light(其他的也可以),那么你在可视化布局管理器里面看到的背景阿控件阿什么的就应该是Theme.Light的样子。仅用于给你看所见即所得的效果而已。
tools:context=".MainActivity的作用的更多相关文章
- Android tools:context=".MainActivity"的作用
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content& ...
- tools:context=".MainActivity的作用 (转载)
转自:http://blog.csdn.net/caiwenfeng_for_23/article/details/8373569 <TextView android:layout_width= ...
- tools:context=".MainActivity的作用(转)
android:layout_width="match_parent" android:layout_height="match_parent" android ...
- Android 之 tools:context和tools:ignore两个属性的作用
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools= ...
- 【转】Android tools:context
tools:context="com.example.guolin.scrollertest.MainActivity" 有时候可以看到有这个东西,但是从来没有用过,不知道有什么作 ...
- xmlns:tools="http://schemas.android.com/tools"以及tools:context=".ConfActivity"是什么意思
xmlns:tools="http://schemas.android.com/tools"这个是xml的命名空间,有了他,你就可以alt+/作为提示,提示你输入什么,不该输入什么 ...
- Spring 注解<context:annotation-config> 和 <context:component-scan>的作用与区别
<context:annotation-config> 是用于激活那些已经在spring容器里注册过的bean(无论是通过xml的方式还是通过packagesanning的方式)上面的注解 ...
- spring <context:annotation-config/> 注解作用
<context:component-scan>包含<context:annotation-config/>的作用 <context:annotation-config/ ...
- Spring中<context:annotation-config/>的作用
spring中<context:annotation-config/>配置的作用,现记录如下: <context:annotation-config/>的作用是向Spring容 ...
随机推荐
- 手动在Windows上创建kafka环境
一 主要内容请移步 参考文章 二 一点小问题 安装上面的参考文章完成配置,并且尝试传输消息后,我尝试去查看kafka的消息数据,目录是{logdir}/test-0/00000000000000.lo ...
- 使用树莓派实现(山寨)高清视频叠加(HDMI OSD)
项目需要在HDMI上叠加一些字符包括汉字和数值,要求不能使用台式机,本身也没有HDMI采集卡驱动开发能力,所以通过海思的HDMI编码器将HDMI编码为h.264网络视频流,然后通过树莓派解码显示,做字 ...
- Fluent Python: @property
Fluent Python 9.6节讲到hashable Class, 为了使Vector2d类可散列,有以下条件: (1)实现__hash__方法 (2)实现__eq__方法 (3)让Vector2 ...
- Calculation PartⅡ
GitHub/object-oriented 误删内容--周末修复
- HTTP 请求头 & 响应头
HTTP请求头概述 HTTP客户程序(例如浏览器),向服务器发送请求的时候必须指明请求类型(一般是GET或者POST).如有必要,客户程序还可以选择发送其他的请求头.大多数请求头并不是必需的, 但Co ...
- ASP.NET 最全的POST提交数据和接收数据 —— (1) 用url传参方式
//1.对象提交,字典方式 //接口方:public ActionResult GetArry(Car model) public void PostResponse() { HttpWebReque ...
- AWVS使用基础教程
什么是AWVS Acunetix Web Vulnerability Scanner(简称AWVS)是一款知名的网络漏洞扫描工具,它通过网络爬虫测试你的网站安全,检测流行安全漏洞,现已更新到10.(下 ...
- poj 1422 Air Raid (二分匹配)
Air Raid Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 6520 Accepted: 3877 Descript ...
- [NOIP2017]逛公园 最短路图 拓扑序DP
---题面--- 题解: 挺好的一道题. 首先我们将所有边反向,跑出n到每个点的最短路,然后f[i][j]表示从i号节点出发,路径长比最短路大j的方案数. 观察到,如果图中出现了0环,那么我们可以通过 ...
- BZOJ2120:数颜色——题解
https://www.lydsy.com/JudgeOnline/problem.php?id=2120 https://www.luogu.org/problemnew/show/P1903#su ...