当前位置: 首页 > news >正文

葛洲坝机电建设有限公司网站做网站赚广告费多么

葛洲坝机电建设有限公司网站,做网站赚广告费多么,注册一个公司需要什么资料,wordpress游客发帖插件六年前写的一个控件#xff0c;一直没有时间总结#xff0c;趁年底不怎么忙#xff0c;整理一下之前写过的组件。供大家一起参考学习。废话不多说#xff0c;先上图。 一、效果图 实现思路使用的是radioGroup加radiobutton组合方式。原理就是通过修改RadioButton 的backgr…        六年前写的一个控件一直没有时间总结趁年底不怎么忙整理一下之前写过的组件。供大家一起参考学习。废话不多说先上图。 一、效果图 实现思路使用的是radioGroup加radiobutton组合方式。原理就是通过修改RadioButton 的background样式实现radioGroup嵌套radiobutton已经实现单选互斥故直接监听其选中监听处理数据就好。 dp_0.5就是0.5dp的意思自行替换成自己的值。 dp_15代表15dp 二、布局代码 采用的是RadioGroup嵌套RadioButton的方式。 !-- 日期标题 --RadioGroupandroid:idid/rg_dateandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:layout_marginRightdimen/dp_24android:layout_marginTopdimen/dp_15android:orientationhorizontalandroid:padding1dpRadioButtonandroid:idid/rb_date_dayandroid:layout_widthdimen/dp_34android:layout_heightdimen/dp_17android:backgrounddrawable/day_checkedandroid:buttonnullandroid:checkedtrueandroid:gravitycenterandroid:text今日android:textColorcolor/whiteandroid:textSizedimen/sp_10 /RadioButtonandroid:idid/rb_date_weekandroid:layout_widthdimen/dp_34android:layout_heightdimen/dp_17android:buttonnullandroid:backgrounddrawable/week_checkedandroid:text本周android:gravitycenterandroid:textColorcolor/whiteandroid:textSizedimen/sp_10 /RadioButtonandroid:idid/rb_date_monthandroid:layout_widthdimen/dp_34android:layout_heightdimen/dp_17android:gravitycenterandroid:backgrounddrawable/month_checkedandroid:buttonnullandroid:text本月android:textColorcolor/whiteandroid:textSizedimen/sp_10 //RadioGroup 三、样式代码 a.day_checked样式 ?xml version1.0 encodingutf-8? selector xmlns:androidhttp://schemas.android.com/apk/res/androiditem android:drawabledrawable/day_chart_seleced android:state_checkedtrue/itemitem android:drawabledrawable/day_chart_unseleced/item /selectora.1 day_chart_seleced样式 ?xml version1.0 encodingutf-8? shape xmlns:androidhttp://schemas.android.com/apk/res/androidsolid android:color#ff2775de /strokeandroid:widthdimen/dp_0.5android:color#2775DE /cornersandroid:bottomLeftRadius5dpandroid:bottomRightRadius0dpandroid:topLeftRadius5dpandroid:topRightRadius0dp / /shape a.2  day_chart_unseleced样式 ?xml version1.0 encodingutf-8? shape xmlns:androidhttp://schemas.android.com/apk/res/androidsolid android:color#06103A /strokeandroid:widthdimen/dp_0.5android:color#2775DE /cornersandroid:bottomLeftRadius5dpandroid:bottomRightRadius0dpandroid:topLeftRadius5dpandroid:topRightRadius0dp / /shape b.week_checked样式 ?xml version1.0 encodingutf-8? selector xmlns:androidhttp://schemas.android.com/apk/res/androiditem android:drawabledrawable/week_chart_seleced android:state_checkedtrue/itemitem android:drawabledrawable/week_chart_unseleced/item /selectorb.2 week_chart_seleced样式 ?xml version1.0 encodingutf-8? shape xmlns:androidhttp://schemas.android.com/apk/res/androidsolid android:color#ff2775de /strokeandroid:widthdimen/dp_0.5android:color#2775DE /corners android:radiusdimen/dp_0 / /shape b.3 week_chart_unseleced样式 这个样式要特别做下说说明因为“本周”那个控件位于组件的中部所以边框样式会出现跟左右两边叠加的现象从而造成边框过粗的视觉。为了解决这个问题我采用的是layer-list层级布局通过颜色覆盖的方式影藏掉 “本周”那个控件的左右边框来解决这一问题。下面是实现代码。 ?xml version1.0 encodingutf-8? layer-list xmlns:androidhttp://schemas.android.com/apk/res/androiditemshapesolid android:color#06103A /strokeandroid:widthdimen/dp_0.5android:color#2775DE /corners android:radiusdimen/dp_0 //shape/itemitemandroid:bottomdimen/dp_0.5android:topdimen/dp_0.5shapestrokeandroid:widthdimen/dp_0.5android:color#06103A //shape/item /layer-listc. month_checked样式 ?xml version1.0 encodingutf-8? selector xmlns:androidhttp://schemas.android.com/apk/res/androiditem android:drawabledrawable/month_chart_seleced android:state_checkedtrue/itemitem android:drawabledrawable/month_chart_unseleced/item /selectorc.1 month_chart_seleced样式 ?xml version1.0 encodingutf-8? shape xmlns:androidhttp://schemas.android.com/apk/res/androidsolid android:color#ff2775de /strokeandroid:widthdimen/dp_0.5android:color#2775DE /cornersandroid:bottomLeftRadius0dpandroid:bottomRightRadius5dpandroid:topLeftRadius0dpandroid:topRightRadius5dp / /shape c.2 month_chart_unseleced样式 ?xml version1.0 encodingutf-8? shape xmlns:androidhttp://schemas.android.com/apk/res/androidsolid android:color#06103A /strokeandroid:widthdimen/dp_0.5android:color#2775DE /cornersandroid:bottomLeftRadius0dpandroid:bottomRightRadius5dpandroid:topLeftRadius0dpandroid:topRightRadius5dp / /shape 四、java代码 由于使用了databinding双向绑定,故就不演示findviewbyid如果没有使用databinding自行去实现就好只需在onCreate()中调用就好。想了下还是加上findviewbyid方式就怕遇到啥都不懂的新手抱怨。 方法一 //findviewbyid调用方式findviewbyid(R.id.rg_gender).setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {Overridepublic void onCheckedChanged(RadioGroup radioGroup, int id) {switch (id) {case R.id.rb_date_day:Log.d(RadioGroup, 天);break;case R.id.rb_date_week:Log.d(RadioGroup, 周);break;case R.id.rb_date_month:Log.d(RadioGroup, 月);break;}}});方法二 //databindig调用方式 //绑定数据mDataBinding.rgDate.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {Overridepublic void onCheckedChanged(RadioGroup radioGroup, int id) {switch (id) {case R.id.rb_date_day:Log.d(RadioGroup, 天);break;case R.id.rb_date_week:Log.d(RadioGroup, 周);break;case R.id.rb_date_month:Log.d(RadioGroup, 月);break;}}}); 给予新手的寄语 对于新手来讲开发总会遇到各种各样的问题逐个解决就好注意沟通协调。
http://www.pierceye.com/news/322820/

相关文章:

  • 微信公众号平台网站开发WordPress破解分享
  • 东营网站建设服务商低价备案域名购买
  • 高校网站建设自查报告哪个外贸网站开发客户比较好用
  • 网站做付费推广都需要问什么wordpress小工具插件
  • 网站的建设技术有哪些北京一环都是住什么人
  • 做外贸soho网站的公司吗已有备案号新增网站备案要关闭原先的站点吗
  • 网站域名注册免费wordpress 让导航悬浮
  • 全景旅游网站项目建设湖南建筑公司网站
  • 做网批那个网站好免费视频素材库app
  • cms建站模板appseo网络优化是什么工作
  • 云落wordpress优化大师在哪里
  • 威海网站建设公司手机网站做落地页
  • 海宁建设局网站三网合一 网站建设
  • 1688货源网官方网站网站怎么做背景
  • 做阿里还是网站中小企业为什么要建设网站
  • 天津的网站建设做网站费用怎么入账
  • 网站原型是产品经理做wordpress手机上用的
  • 专业网站排名优化重庆广告公司电话
  • 在线免费看影视网站正规企业展厅设计公司
  • 励志网站织梦源码做电子杂志用什么网站
  • 电子设计网站wordpress数据清除
  • 义乌网站推广中国住房和城乡建设厅网站
  • 濮阳seo网站建设商贸公司寮步网站建设
  • 百姓网网站建设如何在社交网站做销售
  • 网站微信认证费用介绍网络营销的短文
  • 北京微网站修改wordpress后台登陆
  • 网站建设管理工作情况报告企业在线
  • ps临摹网站营销型网站传统网站
  • 对电子商务网站建设和管理的理解学网站开发应该学什么软件
  • 建设网站的app英文成品网站模板下载