其中的LinearLayout使用了
来源:互联网 发布:数据库安全的重要性 编辑:程序博客网 时间:2024/05/22 18:33
1
2
3
4
5
6
7
8
9
10
11
12
<?
xml
version=”1.0″ encoding=”utf-8″?>
<
LinearLayout
xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical”
android:layout_width=”fill_parent”
android:layout_height=”fill_parent”
android:background=”@drawable/antelope_canyon”>
<
TextView
android:text=”@+id/TextView01″
android:id=”@+id/TextView01″
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” >
</
TextView
>
</
LinearLayout
>
其中的LinearLayout使用了 背景图片antelope_canyon。
如果仔细观察程序的运行过过程,我们首先看到了黑色的activity背景,然后才看到背景图被加载,那是因为在activity start以后,我们才能调用setContentView设置我们的layout,然后才绘制我们在layout中放置的背景图。而在此之前,程序中绘制的是android中默认黑色背景。 这样会给用户感觉我们的activity启动较慢。
然而,如果将背景图定义在一个主题中,如下:
1
2
3
4
5
6
7
<?
xml
version=”1.0″ encoding=”utf-8″?>
<
resources
>
<
style
name=”Theme.Droidus” parent=”android:Theme”>
<
item
name=”android:windowBackground”>@drawable/antelope_canyon</
item
>
<
item
name=”android:windowNoTitle”>true</
item
>
</
style
>
0 0
- 其中的LinearLayout使用了
- 第一章:Linearlayout的使用
- LinearLayout clipChildren的使用
- LinearLayout的嵌套使用
- LinearLayout 的layout_gravity使用
- LinearLayout实现其中一个控件填满剩下的空间
- LinearLayout的layout_weight的使用
- android布局LinearLayout的使用
- LinearLayout中的layout_weight的使用
- LinearLayout中addView的使用
- 线性布局LinearLayout的使用
- LinearLayout和RelativeLayout的使用
- 使用jsp首先的登录小案例,其中使用了cookie技术
- 使用jsp首先的登录小案例,其中使用了session技术
- Android中检查自动更新使用Service,其中包含了Service的使用然后还包含了几个自定义的dialog
- LinearLayout 使用
- junit4的变化:注意其中使用了java5的新特性
- junit4的变化:注意其中使用了java5的新特性
- Deep Learning(深度学习)学习笔记整理系列之(一)
- 20141030
- Deep Learning(深度学习)学习笔记整理系列之(二)
- Android轻量级数据保存方式
- 简单环形队列实现
- 其中的LinearLayout使用了
- UVa 11063 - B2-Sequence
- JAVA程序设计(11)-----面对对象初级设计 麻将 创建麻将牌 然后洗牌 发牌~ 恩 就这样
- 看别人写的一个多文件下载类
- Win7_64位_QT5.3.2_CMake2.8.12_OpenCV2.3.1
- 看编程书籍的一些体会
- Codeforces Round #189 (Div. 2)---A. Magic Numbers
- apache 反向代理
- Cocos2d-JS全貌