Android常见UI组件之ListView(二)--定制ListView 这一篇接上篇.展示ListView中选择多个项及实现筛选功能~ 1.在位于res/values目录下的strings.xml文件里加入例如以下代码: <? xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">BasicView5</str…
1.XML文件中的OnClick 属性可以指定在Activity中处理点击事件的方法,Activity中必须定义该属性指定的值作为方法的名字且有一个View类型的参数,表示此物件被点击. 2.使用selector配置可以实现不同模式下按钮的样式. selector文件属性说明: android:drawable 默认状态 android:state_pressed 是否按下,如一个按钮触摸或者点击. android:state_focused 是否取得焦点,比如用户选择了一个文本框. andro…
AdapterViewAnimator:当在视图间切换时会显示动画. android:animateFirstView 定义ViewAnimation首次显示时是否对当前视图应用动画. android:inAnimation 标识显示视图时使用的动画. android:loopViews 定义当动画执行到列表尾部后,是否循环执行到第一个视图.   android:outAnimation 标识隐藏视图时使用的动画. 代码中 //淡入淡出效果  picFlipper.setInAnimation(…
1.侧边栏 ion-menu 组件的基本使用 1.创建项目 ionic start myApp sidemenu 2.配置项目 属性 作用 可选值 side 配置侧边栏的位置 start end menuId 侧边栏的唯一标识   type 配置侧边栏的弹出方式 overlay, reveal, push swipe-gesture 滑动弹出侧边栏 true false <ion-menu side="start" menuId="first"> <…
1.日期组件的基本使用 官方文档:https://ionicframework.com/docs/api/datetime 模板中: <ion-datetime display-format="YYYY-MM-DD" [(ngModel)]="day"></ion-datetime> <ion-datetime display-format="MM/YYYY" picker-format="MMMM YYY…
Slides 轮播图组件 Ionic4.x 中的轮播图组件是基于 swiper 插件,所以配置 slides 的属性需要在 swiper 的 api 中 找 Swiper Api:http://idangero.us/swiper/api/ <ion-header> <ion-toolbar> <ion-buttons slot="start"> <ion-back-button defaultHref="/tabs/tab1&quo…
1.ion-input 单行文本框 2.ion-toggle 开关 3.ion-radio-group.ion-radio 单选按钮组 4.ion-checkbox 多选按钮组 5.ion-select 选择框 6.ion-textarea 多行文本框 <ion-list> <ion-item> <ion-label>用户名:</ion-label> <ion-input [(ngModel)]="peopleInfo.username&qu…
JQ插件模式开发UI组件 JQ插件开发方法: 1.$.extend() 扩展JQ(比较简单,功能略显不足) $.extend({ sayHello:function(){ console.log("hello~"); } }); $.sayHello(); 2.$.fn  向JQ添加新方法(这次选择这种方法) $.fn.blue=function(){ this.css("background","blue"); } $("div&qu…
Rating是一个用于打分或排名的控件.看一个最简单的例子: <!DOCTYPE html> <html ng-app="ui.bootstrap.demo" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&…
Collapse折叠控件使用uib-collapse指令 <!DOCTYPE html> <html ng-app="ui.bootstrap.demo" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />…