Android到默认UI比iOS到默认UI在美观程度上还是有一定到差距的,我们希望能够美化UI,并且替换掉系统默认的UI风格,使得程序在使用这些UI的时候都默认使用我们自定义到UI。本文以ToggleButton为例,介绍如何使用,下图是效果图。 在这里,我们使用layer-list把...
分类:
移动开发 时间:
2015-02-09 22:50:43
阅读次数:
160
1,TextView :走马灯效果2,EditText ,AutoCompleteText MutiAutoCompleteTextView3,Button,ImageButton,RadioButton,ToggleButton(开关状态),CheckBox。4,ImageView,ImageSw...
分类:
移动开发 时间:
2015-01-30 17:28:52
阅读次数:
177
在 Android 中使用各种控件(View)DatePicker- 日期选择控件TimePicker-时间选择控件ToggleButton-双状态按钮控件EditText -可编辑文本控件ProgressBar -进度条控件SeekBar -可拖动的进度条控件AutoCompleteTextVie...
分类:
移动开发 时间:
2015-01-26 16:47:27
阅读次数:
161
//activity_main.xml<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:contex..
分类:
移动开发 时间:
2015-01-14 18:12:58
阅读次数:
242
自定义类继承View,并复写三个构造方法 在构造方法中对背景图片,按钮图片,按钮滑动最大距离进行初始化,设置点击事件 在点击事件中,对开关状态进行反向操作,并使用invalidate(),重新调用onDraw(),在onDraw()中改变按钮图片的位置,实现开关状态的效果 实现触摸事件,(注意要调用...
分类:
其他好文 时间:
2014-12-25 09:51:06
阅读次数:
187
一、废话 今天将介绍android系统为我们提供的常用控件中的TextView,Button,EditText,RadioButton,CheckBox,ToggleButton,RatingButton七个控件的声明和事件响应。二、正文 1、 TextView 类似ASP.NET中的La...
分类:
其他好文 时间:
2014-12-22 19:27:25
阅读次数:
143
ToggleButton,就是开关按钮,包括选中和未选中状态,并且需要为不同的状态设置不同的事件处理; 例如:使用图片来展示ToggleButton不同的状态;MainActivity.javapackage com.xiaozhang.autocomplete1;import android...
分类:
移动开发 时间:
2014-12-05 17:14:37
阅读次数:
199
介绍ToggleButton(开关按钮)和Swith(开关)概念和其XML属性及相关方法,通过一个实例示范,并简要介绍了LinearLayout的Orientation属性的不常见使用方法。
分类:
移动开发 时间:
2014-11-29 13:02:25
阅读次数:
160
1.定义一个菜单模型类,用于保存Key、Title以及子菜单_Submenus,FormFullName是用来保存菜单对应的控件。 2.MainWindow的构造方法里加入了一个程序集,洪水预报用的服务。 初始化系统菜单这里,用List保存系统主菜单(主菜单用ToggleButton显示),...
ActionLintsner是所有监听器的父类,其它监听器可以监听的事件都可以被它捕获ItemListener用于捕获带有item的组件产生的事件,如ComboBox,CheckBox,RadioButton,ToggleButton,接口中定义的itemStateChanged(ItemEvent...
分类:
编程语言 时间:
2014-10-17 00:48:33
阅读次数:
431