android
共 6 篇文章
android 图片加边框 ImageView border 效果
[b]1、布局文件[/b] res/layout/some_page.xml [code="xml"] [/code] [b]2. 背景设置文件[/b] res/drawable/shape_image_border.xml [code="xml"] [/code] 效果图: [img]http://dl2.iteye.com/upload/attachment/0102/7183/b0581463-fecc-37a9-b879-02aa68e5d6b3.png[/img] 更多阅读:[url=http://nodebook.info/book/view?bid=5354725719980e…
2014-11-01 15:47 · android · 边框 · ImageView · border
android ListView 样式 item样式,条目样式
下面是一个 ListView 的定义: [color=green]res/layout/news_list_main.xml[/color] [code="xml"] [/code] 解释: [color=red]android:cacheColorHint:ListView 处于滚动状态时背景的颜色。#00000000:表示透明 android:divider:条目间的分隔线。可以是图片,也可是一个颜色。#00000000:表示透明 android:dividerHeight:条目间分隔线的高度。[/color] 条目的样式: [color=green]res/layout/news_li…
2014-10-30 16:48 · android · Android · listview · item · 样式
android 圆角和阴影效果
[b]先看看效果:[/b] [img]http://dl2.iteye.com/upload/attachment/0102/3624/638ab99b-1ad4-324d-9358-d0fcfb257a68.png[/img] [code="xml"] [/code] 附: [b]只是圆角效果:[/b] [code="xml"] [/code] [b]如何使用?[/b] 我们知道,android 提供的这些特效处理类,最终都将被解析为一个 Drawable 对象(即:图片), 那么我们就可以像使用图片一样(把它们放到 draw 目录下,引用 资源的id)使用这些特效文件了。 比如将这些特效…
2014-10-23 16:48 · android · Android · 阴影 · 圆角 · 效果 · shadow
android : 圆角按钮 shape属性
[code="xml"] [/code] 更多:[url=http://nodebook.info/book/view?bid=5354725719980e913e9be3f1]http://nodebook.info/book/view?bid=5354725719980e913e9be3f1[/url] -
2014-10-22 16:27 · android · Android · 圆角 · 按钮 · shape
android TabHost
先看一下效果: [img]http://dl2.iteye.com/upload/attachment/0102/2894/fe1c3013-7a80-3073-93a4-e85ebda8bab2.png[/img] [b]TabHost是整个Tab的容器[/b],包括两部分:[b]TabWidget[/b]和[b]FrameLayout[/b]。TabWidget就是每个tab的标签,FrameLayout则是tab内容。 [b]TabHost的二种实现方式:[/b] 第一种:继承TabActivity 第二种:只是单纯的继承Activity类 [b]下面是实现的效果:[/b] 第一种:继…
2014-10-22 11:39 · android · Android · Tabhost
Android - gravity and layout_gravity 区别
[size=x-large][color=darkblue][b]Android学习[/b][/color][/size] Their names should help you : android:gravity sets the gravity of the content of the View its used on. android:layout_gravity sets the gravity of the View or Layout in its parent. android:gravity :设定View中内容的对齐方式 android:layout_gravity :设…
2014-10-21 15:29 · android · Android · 区别 · gravity · layout_gravity