摘要: 1、直接插入排序 1 #include 2 3 struct node 4 { 5 int key; 6 }; 7 typedef struct node DataType; 8 9 int Ins_Sort(DataType Ar[],int n);10 11 int main(voi... 阅读全文
posted @ 2015-10-27 20:29 默默笙萧 阅读(10066) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 struct node 3 { 4 int key; 5 }; 6 typedef struct node DataType; 7 8 int Bub_sort(DataType Ar[],int n); 9 10 int main(void)11 {12 ... 阅读全文
posted @ 2015-10-27 20:26 默默笙萧 阅读(3427) 评论(0) 推荐(0) 编辑
摘要: 当在Android的layout设计里面如果输入框过多,则在输入弹出软键盘的时候,下面的输入框会有一部分被软件盘挡住,从而不能获取焦点输入。或者是有使用framentlayout悬浮在底部的button也会挡住输入框。一、解决办法方法一:在你的activity中的oncreate中setConten... 阅读全文
posted @ 2015-10-18 15:43 默默笙萧 阅读(37211) 评论(0) 推荐(0) 编辑
摘要: 1、RelativeLayout属性android:layout_above="@id/xxx" --将控件置于给定ID控件之上android:layout_below="@id/xxx" --将控件置于给定ID控件之下android:layout_toLeftOf="@id/xxx" --将控... 阅读全文
posted @ 2015-10-14 23:18 默默笙萧 阅读(2046) 评论(0) 推荐(0) 编辑
摘要: 一、layout设置分界线,给线性布局设置分隔线drawable的配置 布局里面的调用形势: android:divider="@drawable/shape_divider" android:showDividers="middle" 二、去掉listview分隔线1、设置a... 阅读全文
posted @ 2015-09-19 13:05 默默笙萧 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 一、重写父类finish();函数。 @Override public void finish() { //其他结束之前的操作,这里写的手机"back"键都有效 //使用关键字super调用父类的... 阅读全文
posted @ 2015-09-19 09:01 默默笙萧 阅读(1868) 评论(0) 推荐(0) 编辑
摘要: 如果在TextView的append后面马上调用fullScroll,会发现无法滚动到真正的底部,这是因为Android下很多函数都是基于消息的,用消息队列来保证同步,所以函数调用多数是异步操作的。 有消息队列是异步的,消息队列先滚动到底部,然后textview的append方法显示。所以无法正确滚动到底部。 阅读全文
posted @ 2015-09-19 08:39 默默笙萧 阅读(3496) 评论(1) 推荐(0) 编辑