像这样的分隔符,通常我们首先想到的是用两个1px的View去做分隔符,在API 11 (Android )以及之后,又更人性的实现方式
1.separator.xml
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <size android:width="1dp" /> <solid android:color="#90909090" /> </shape>
2.在布局中使用
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:divider="@drawable/separator"
android:showDividers="middle"
android:orientation="horizontal">
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?android:attr/buttonBarButtonStyle"
android:text="Yes"
android:layout_weight="1"
android:id="@+id/button1"
android:textColor="#00b0e4" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?android:attr/buttonBarButtonStyle"
android:text="No"
android:layout_weight="1"
android:id="@+id/button2"
android:textColor="#00b0e4" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?android:attr/buttonBarButtonStyle"
android:text="Neutral"
android:layout_weight="1"
android:id="@+id/button3"
android:textColor="#00b0e4" />
</LinearLayout>
来源: http://envyandroid.com/archives/1193/view-separators?utm_source=Android+Weekly&utm_campaign=ac89b26b9e-Android_Weekly_107&utm_medium=email&utm_term=0_4eb677ad19-ac89b26b9e-337843225
相关推荐
Android Study之跳转自启动管理页,详情请查阅博文,地址如下: http://blog.csdn.net/u012400885/article/details/65515941
A Study of Android Application Security 学术论文
ANDROID STUDY PDF ANDROID STUDY PDF ANDROID STUDY PDF
android study!!!!good
Android study notes 安卓学习笔记
It's possible to arrange for two applications to share the same user ID, in which case they will be able to see each other's files. To conserve system resources, applications with the same ID can ...
笔记 所有笔记可以通过wiki查看: 更新 增加深入剖析 JavaScriptCore: 增加读 SnapKit 和 Masonry 自动布局框架源码: 增加Swift 项目中涉及到 JSONDecoder,网络请求,泛型协议式编程的一些记录和想法: ...
AndroidStudy [CommonHolderAndAdapter][] :通用ViewHolder&Adapter [CommonHolderAndAdapter]: 支持ListView,RecyclerView 单类型,多类型条目 [CustomView][] : 自定义控件1 [CustomView]: [RxJavaTest][] : RxJava...
资源名称:Android Study 资源目录:【】AndroidStudio入门指南【】Android开发艺术探索【】疯狂Android讲义【】第一行代码第2版PDF 源码 资源截图: 资源太大,传百度网盘了,链接在附件中,有需要的同学自取。
好东西,一看就会,非常简单的安卓学习代码,安卓学习资料1 android,安卓学习资料 android
Android学习过程的一些总结AndroidStudy。。。。。。。
Android-Study Android 学习笔记
Android-Study一个简单的android学习demo2015-07-101.sdk:android172.jdk:1.63.ide:eclipse
ServiceStudy,博客讲解中的实例代码,使用Android studio开发,供大家学习使用。
android SQLite实现本地登录注册功能,SQLite简单应用(android studio)
STUDY ON ANDROID EMULATOR • To understand important details of emulator. • To get familiar with recent upstream changes and possibly ongoing plans. • To evaluate upstream contribution process (for ...
android学习 android学习实例
非常简单的学习android源代码,可以模范学习Study02Android 安卓学习资料