
android ui篇
清澈见底-66
此人很懒
展开
-
get point from line
static void lineFromPoints(Point P, Point Q,int x){ int a = Q.x - P.x; int b = P.y - Q.y; int c = a*(P.x) + b*(P.y); if(b < 0) { Log.d("jia","-The line passing through points P and Q is: " + a + "x " + b + ".原创 2020-07-23 18:21:19 · 192 阅读 · 0 评论 -
android ActivityThread 与Binder关系
原创 2016-12-30 10:53:42 · 403 阅读 · 0 评论 -
android炫酷导航源码
此项目为一个图层导航工程,图层构成有精灵对象,碰撞监测点,及位置示意图。操作方式采用游戏式风格,支持碰撞监测点的定义添加,图层图层可拖动。工程地址:https://github.com/jiabailong/android-spriteLayer希望大家多提提意见。 ...原创 2016-06-01 11:49:40 · 1689 阅读 · 0 评论 -
opencv 比较图片
Mat img1 = Highgui.imread("storage/external_SD/a.png");Mat img2 = Highgui.imread("storage/external_SD/b.png");MatOfKeyPoint keypoints1 = new MatOfKeyPoint();MatOfKeyPoint keypoints2 = new MatOfKeyP原创 2017-05-12 15:29:59 · 573 阅读 · 0 评论 -
设置TextView可复制
设置TextView的属性 enable,focusable, longClickable and textIsSelectable <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="" android:id="@+i原创 2016-12-05 15:47:53 · 11380 阅读 · 3 评论 -
android 场景转换Scene配合动画的使用
android Scene android Scene保存了view层级的状态,并保存了层级中所有view的属性值。动画框架能使用动画进行场景的切换,一般只需要制定exit(退出)动画,不需要制定enter(进入)动画,系统会自动帮我们创建进入动画。用Layout创建一个场景 用layout创建Scene时,一般这个layout是不变的,只有在layout创建的时候才会加载场景。原创 2016-08-31 16:35:28 · 4528 阅读 · 0 评论 -
设计模式(讲的比较好-思路清晰,非泛泛而谈)
设计模式(Design pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性。 毫无疑问,设计模式于己于他人于系统都是多赢的,设计模式使代码编制真正工程化,设计模式是软件工程的基石,如同大厦的一块块砖石一样。项目中合理的运用设计模式可以完美的解决很多问题,每种模式在现在中都有相应的原理来与之对应,每转载 2016-08-23 11:56:34 · 8071 阅读 · 1 评论 -
android属性动画-Property Animations
Animation – Property Animations属性动画出现前,View Animation 必须作用在 View 上而且只有四种受限的动画效果,并且不好用,他改变只是View的快照,View的实际属性并没有改变,实在是很不方便。属性动画可以改变任意你想改变的东西,不再限制于view上使用,看属性动画的工作流程。原创 2013-11-05 16:37:58 · 3014 阅读 · 0 评论 -
android 仪表盘控件
android 仪表盘控件,支持多分辨率,手绘UI,无需添加图片资源,支持刻度设置。源码下载原创 2016-08-19 14:00:12 · 2781 阅读 · 0 评论 -
android RecyclerView浅谈
伴随着android 5.0的发布,系统为开发者提供了一个优化了的列表控件RecyclerView。RecyclerView支持横向和纵向的列表,它依靠LayoutManager的子类来控制RecyclerView的方向。 LayoutManager同时负责了对RecyclerView的测绘以及对Item view的定位,并提供了列表的滚动及Item View 的回收利用;开发者可以原创 2016-08-11 15:18:12 · 621 阅读 · 0 评论 -
android 子线程刷新view
android 子线程内不能刷新view呢?答案是可以。那么为什么我们用子线程刷新view时会抛出"Only the original thread that created a view hierarchy can touch its views."那是因为VIew和windowManager之间的协议处理类ViewRootImpl对Thread进行了校验,void checkThrea原创 2016-04-29 11:14:58 · 1837 阅读 · 0 评论 -
android Scroller
canvas.translate(-mScrollX, -mScrollY);原创 2016-05-12 14:40:11 · 274 阅读 · 0 评论 -
android mask setXfermode
public class MymaskActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(save原创 2013-01-21 13:44:12 · 1916 阅读 · 0 评论 -
Xfermode
当绘制出现问题时可在绘制前使用saveLayer原创 2015-01-14 10:20:59 · 568 阅读 · 0 评论 -
afreechart
BarRenderer renderer = (BarRenderer) plot.getRenderer();renderer.setMaximumBarWidth(10);renderer.setMinimumBarLength(10);//柱状图宽度renderer.setItemMargin(-2);原创 2014-04-14 14:26:40 · 740 阅读 · 0 评论 -
android RecycleBin
android BaseAdapter的使用大家都知道,ListView如果直接设置高度那么getV原创 2014-09-24 17:26:07 · 1463 阅读 · 0 评论