7.5.1.1复合设计模式(THE COMPOSITE DESIGN PATTERN)
复合模式可以把几个对象组合成一个复合对象,使用这种的方法与使用基本对象一样。图 7.6 显示了面向对象实现这种模式的通常方法。
图 7.6CompositeComponent 是包含其他组件集合的类;它继承自 AbstractComponent,因此,能够使用基本组件的地方,也一样可以使用...
分类:
其他好文 时间:
2014-11-27 18:32:50
阅读次数:
213
1.Is Blocking Key assigned to material master in basic data 1 view in X plant material status, if yes, remove blocking key and create PR & PO. Or chec...
分类:
其他好文 时间:
2014-11-27 18:03:23
阅读次数:
282
先上一张图可以看到,对话框的标题颜色是蓝色的,下面还有一根线也是蓝色的,在某些情况下,我们想改变程序的主题风格,颜色必须做修改,但又懒得去定制Dialog,下面的方法就诞生了:
public static final void dialogTitleLineColor(Dialog dialog, int color) {
Context context = dialog.ge...
分类:
移动开发 时间:
2014-11-27 16:25:46
阅读次数:
181
官网地址:https://developer.android.com/intl/zh-tw/design/material/index.html
使用Material Design 需要api21,即Lollipop/5.0以上
Material Design 为应用提供了:一个新的主题,一些组合View的新Widget,一些自定义阴影和动画的新Api
Material 主题...
分类:
移动开发 时间:
2014-11-27 16:25:22
阅读次数:
278
官网地址:https://developer.android.com/intl/zh-tw/training/material/get-started.html
Apply the Material Theme 运用材料主题
name="AppTheme" parent="android:Theme.Material">
theme cus...
分类:
移动开发 时间:
2014-11-27 16:22:15
阅读次数:
214
官网地址:https://developer.android.com/intl/zh-tw/training/material/theme.html
新的Material主题提供了:
系统Widgets可设置它们的调色板
系统Widgets的触摸反馈动画
Activity的过渡动画
您可以自定义Material主题,根据你的品牌标识,用一个调色板来控制。
可...
分类:
移动开发 时间:
2014-11-27 16:18:27
阅读次数:
229
官网:https://developer.android.com/intl/zh-tw/training/material/shadows-clipping.html
Material设计为UI元素引入了一个depth值,depth帮助用户了解每个元素相对重要性,重点关注手头的任务
每个View的elevation值,相当于z属性,它决定了阴影的大小:z越大,阴影越大。
Vi...
分类:
移动开发 时间:
2014-11-27 16:17:45
阅读次数:
168
升级sdk 到5.0时,创建项目时会多创建一个库项目,叫appcompat_v7。
创建完成后,这个项目可能会报错,诸如出现:No resource found that matches the given name 'android:Widget.Material.ActionButton'等错误。
下面是一些解决方案:
解决方案1:
使用sdk ma...
分类:
移动开发 时间:
2014-11-27 12:48:28
阅读次数:
155
描述
农民约翰的农场里有N座山峰(1
不幸的是,约翰刚刚得知税法在滑雪训练营方面有新变化,明年开始实施。在仔细阅读法律后,他发现如果滑雪训练营的最高和最低的山峰海拔高度差大于17就要收税。因此,如果他改变山峰的高度(使最高与最低的山峰海拔高度差不超过17),约翰可以避免支付税收。
如果改变一座山x单位的高度成本是x^2单位,约翰最少需要付多少钱?约翰只愿意改变整数单位的高度。...
分类:
其他好文 时间:
2014-11-27 10:47:18
阅读次数:
398
题意:
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum prof...
分类:
其他好文 时间:
2014-11-27 00:17:48
阅读次数:
227