Android之旋转button视图
来源:互联网 发布:mysql存储过程示例 编辑:程序博客网 时间:2024/06/09 23:54
也许有时候我们的项目需要旋转按钮本身,而不是文本或按钮上的标签旋转。下面写一个小方法去实现旋转45°:
public class MyButton extends Button { public float degrees; public float sWidth; public float sHeight; public MyButton(Context context) { super(context); // TODO Auto-generated constructor stub } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub canvas.save(); canvas.rotate(45.0f); super.onDraw(canvas); canvas.restore(); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { // TODO Auto-generated method stub super.onSizeChanged(w, h, oldw, oldh); sWidth=w; sHeight=h; } }
- Android之旋转button视图
- Android视图组件: Button
- cocos2dx之旋转的button
- cocos2dx之旋转的button
- iOS之Button以及警告视图(简单)
- Android 笔记 之 Button
- Android之Button样式
- android之自定义button
- android之Button
- Android之Button
- Android之Button
- android之创建button
- android之Button
- Android控件之Button
- Android学习之button
- Android控件之Button
- android ui之Button
- Android之Button,ImageButton
- 表连接的三种方式
- 杭电acm阶段之理工大版
- 简单的excel读写
- 贝塞尔曲线
- wmsys.wm_concat的几个用法
- Android之旋转button视图
- FLANN 的使用问题
- Eclipse打开文件太多Error
- Naive Bayes分类示例
- Linux系统
- 动态内存分配
- 2.6内核上一步一步配置LVS(Linux Virtual Server)
- Aspose.Pdf使用教程分享
- Smartforms学习