- 浏览: 1095503 次
- 性别:
- 来自: 郑州
文章分类
最新评论
-
baiyi168:
非常有用,多谢楼主
Android中的一个TextView中的字体设置不同大小 -
qq271629261:
[img] ...
android开发工具 Eclipse+Android SDK+ADT -
txlong_onz:
haotainan 写道Activity伪造Dialog,这个 ...
Activity伪造Dialog的时候不能全屏显示 -
haotainan:
Activity伪造Dialog,这个Dialog显示的时候界 ...
Activity伪造Dialog的时候不能全屏显示 -
gangbener:
cainingyouyou 写道7楼的,tag,怎么解决的啊1 ...
android中ListView点击和里边按钮或ImageView点击不能同时生效问题解决
1.控件配置 xml中有趣的属性:
android:background
可以通过以下两种方法设置背景为透明:"@android:color/transparent"和"@null"。注意TextView默认是透明的,不用写此属性,但是Buttom/ImageButton/ImageView想透明的话就得写这个属性了。
android:drawingCacheQuality
设置绘图时半透明质量。有以下值可设置:auto(默认,由框架决定)/high(高质量,使用较高的颜色深度,消耗更多的内存/low(低质量,使用较低的颜色深度,但是用更少的内存)。
android:fadingEdge
设置拉滚动条时 ,边框渐变的放向。none(边框颜色不变),horizontal(水平方向颜色变淡),vertical(垂直方向颜色变淡)。
android:fadingEdgeLength
设置边框渐变的长度。
android:scrollbarDefaultDelayBeforeFade
设置N毫秒后开始淡化,以毫秒为单位。
android:scrollbarFadeDuration
设置滚动条淡出效果(从有到慢慢的变淡直至消失)时间,以毫秒为单位。Android2.2中滚动条滚动完之后会消失,再滚动又会出来,在1.5、1.6版本里面会一直显示着。
android:scrollbarThumbHorizontal
设置水平滚动条的drawable。
android:scrollbarThumbVertical
设置垂直滚动条的drawable.
android:scrollbarTrackHorizontal
设置水平滚动条背景(轨迹)的色drawable
android:scrollbarTrackVertical
设置垂直滚动条背景(轨迹)的drawable注意直接设置颜色值如”android:color/white”将得出很难看的效果,甚至都不理解这个属性了,这里可以参见ApiDemos里res/drawable/scrollbar_vertical_thumb.xml和scrollbar_vertical_track.xml,设置代码为:android:scrollbarTrackVertical ="@drawable/scrollbar_vertical_track"
android:soundEffectsEnabled
设置点击或触摸时是否有声音效果
android:visibility
设置是否显示View。设置值:visible(默认值,显示),invisible(不显示,但是仍然占用空间),gone(不显示,不占用空间)
2.很经典的一个layout.xml
<?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:padding="8px" android:background="@color/lightblue" android:layout_height="fill_parent" android:gravity="center_horizontal"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:text="@string/qr_main_contents" android:textColor="@color/black" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <Spinner android:id="@+id/qr_main_contents" android:layout_width="wrap_content" android:layout_height="wrap_content" android:entries="@+array/qr_main_contents" android:prompt="@string/qr_main_contents" /> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="wrap_content" android:scrollbars="vertical"> <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:text="@string/qr_information_name" android:textColor="@color/black" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <EditText android:id="@+id/qr_information_name" android:textColorHint="@color/blue" android:singleLine="true" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="@string/qr_information_company" android:textColor="@color/black" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <EditText android:id="@+id/qr_information_company" android:singleLine="true" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="@string/qr_information_phone" android:textColor="@color/black" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <EditText android:id="@+id/qr_information_phone" android:singleLine="true" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="@string/qr_information_email" android:textColor="@color/black" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <EditText android:id="@+id/qr_information_email" android:singleLine="true" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> </ScrollView> </LinearLayout> <LinearLayout android:orientation="vertical" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:text="@string/qr_main_generate" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> </LinearLayout>
3.去掉页面的标题栏和信息栏
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏
注意,这个设置必须放在设置布局前面,不然会报错.
setContentView(R.layout.entrancebs);
发表评论
-
安卓自动编译工具Gradle
2015-09-02 15:15 1096https://developer.android.com ... -
图片的水平平铺效果
2014-03-10 15:45 2401Android要实现图片的水平平铺效果: 很简单也很强大, ... -
LinearLayout中的属性baselineAligned的使用
2013-10-19 18:54 34373Android线性布局中的属性主要的就是控制浮动方向的or ... -
Activity伪造Dialog的时候不能全屏显示
2013-05-31 08:42 14198使用Activity伪造Dialog的时候出现不能全屏的问 ... -
修改局部源码烧录手顺
2012-08-16 09:23 20901. 添加命令到PATH路径下,方便全局使用: andro ... -
备份我的源码烧录的sh文件
2012-07-16 10:39 1333烧录编译的img文件: 01.tofastboot.sh ... -
备份我的源码编译的sh文件
2012-07-16 10:34 1546编译命令写一次就可以了。以后直接使用。 01-extra_s ... -
ADT20安装报错
2012-06-29 23:44 9149Cannot complete the install bec ... -
ubuntu12.04(VirtualBox) 64-bit build android source
2012-05-20 17:33 29831.download VirtalBox(Virtual ... -
搭建android源码编译开发服务器
2012-05-20 17:32 72861.android服务器,其实也就是台式机器的增强版本。基本上 ... -
ADT离线安装报错
2012-04-23 09:37 3340最近使用ADT的离线zip包安装ADT总是报错。说是 Can ... -
Android源码编译中的Makefile文件
2012-04-18 09:09 24551.和大多shell文件一样,makefile中的#表示注释, ... -
遍历android根目录的简单资源查看器
2012-04-16 17:02 3694效果如图: package com.txl.sua; ... -
Nexus s与android4.0
2011-12-14 13:15 13821.内核源码链接 http://android.git.ke ... -
Android编译生成系统-译文
2011-12-08 11:21 3450生成 4.0.1 系统 下边 ... -
Android中设置TextView的颜色setTextColor
2011-11-10 11:34 182275android中设置TextView的颜色有方法setTex ... -
Android中设置activity的background为Wallpaper
2011-08-15 08:34 3850<activity android:name=&q ... -
android程序中怎么实现平铺效果
2011-08-10 17:06 4891很简单,就像window桌面图片一样,如果图片小的话就会平铺。 ... -
一个android应用向Home screen添加多个Widget
2011-08-09 15:12 5137如Twitter客户端或者HTC的日历应用,可以添加大小不 ... -
怎么实现Widget中的动画效果,如渐入等
2011-08-09 11:22 3027怎么在Widget中添加animation,如渐入渐出,淡入淡 ...
相关推荐
今天小编给大家分享php那些琐碎的知识点,非常不错,具有参考借鉴价值,需要的朋友参考下吧
数据库表的琐碎知识2.sql
Oracle琐碎知识点,帮助学习和使用。
它从Android繁杂的源代码中抽取出了Android开发的“精华”和“要点”,剥离了大量琐碎的底层实现细节,进行了高度概括和总结,不仅能帮助开发者迅速地从宏观上理解整个Android系统的设计理念,而且能帮助开发者迅速...
它从Android繁杂的源代码中抽取出了Android开发的“精华”和“要点”,剥离了大量琐碎的底层实现细节,进行了高度概括和总结,不仅能帮助开发者迅速从宏观上理解整个Android系统的设计理念,而且能帮助开发者迅速从...
数据库表的琐碎知识.sql
数据库表的琐碎知识3.sql
数据库表的琐碎知识6.sql
数据库表的琐碎知识5.sql
数据库表的琐碎知识4.sql
NoteBook整理面试琐碎知识点:fire::collision:常见排序算法PHP
剥离了大量琐碎的底层实现细节,进行了高度概括和总结,不仅能帮助开发者迅速从宏观上理解整个Android系统的设计理念,而且能帮助开发者迅速从微观上掌握核心知识点的原理,从而编写出高质量的Android应用。...
数据库表的琐碎知识8_表的约束.sql
数据库表的琐碎知识7_高级分组子句.sql
Linux Shell编程艺术.7z...本书通过大量的应用实例,以循序渐进的方式,由浅入深地逐步介绍shell的各个知识点,从而引领读者轻松跨过shell程序设计的门槛,最终摆脱繁忙而且低效率的工作状态,达到轻松管理系统的目的。
它从Android繁杂的源代码中抽取出了Android开发的“精华”和“要点”,剥离了大量琐碎的底层实现细节,进行了高度概括和总结,不仅能帮助开发者迅速从宏观上理解整个Android系统的设计理念,而且能帮助开发者迅速从...
它从Android繁杂的源代码中抽取出了Android开发的“精华”和“要点”,剥离了大量琐碎的底层实现细节,进行了高度概括和总结,不仅能帮助开发者迅速从宏观上理解整个Android系统的设计理念,而且能帮助开发者迅速从...
一直以来,shell编程是系统管理员必备的高级技能,通过学习shell编程,可以让计算机系统完成那些繁重并且琐碎的管理任务,从而可以节约大量的工作时间。本书通过大量的应用实例,以循序渐进的方式,由浅入深地逐步...
C++学习过程的琐碎点和注意点,不断总结中。
offer收割机必看-CV算法岗知识点及面试问答汇总(含计算机视觉、机器学习、图像处理和 C++基础四大块).zip 【资源介绍】 很多公式和图片,资源下载本地然后下载安装Typora查看,Typora 是一款支持实时预览的 Markdown...