摘要: public void showToast(String msg) { Toast.makeText(this, msg, Toast.LENGTH_LONG).show(); }//showtoast函数,传入一个信息参数即可 阅读全文
posted @ 2014-07-26 10:22 墨棋 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 本文创建一个简单计算器,应用简单工厂模式:程序功能,用户输入俩个数字和一个运算符(+-*/),输出答案.//创建基类Class Operation{double mnumberA,mnumberB,result=0;getmnumberA(){return mnumberA;}setmnumberA... 阅读全文
posted @ 2014-07-24 08:49 墨棋 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 按钮背景透明:android:background="@android:color/transparent"字体太多设计滚动:android:ellipsize="marquee"此外,还需要设置:android:fousebale=true;android:fouseableintouchmode... 阅读全文
posted @ 2014-07-22 15:36 墨棋 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 名称背景数值背景颜色名称中文名称十六进制RGB十进制RGB粗细字体配色参考淡紫色#da70d6218,112,214淡紫色[中国搜] darkkhaki暗黄褐色#bdb76b189,183,107暗黄褐色[中国搜] rosybrown褐玫瑰红#bc8f8f188,143,143褐玫瑰... 阅读全文
posted @ 2014-07-22 15:36 墨棋 阅读(893) 评论(0) 推荐(0) 编辑
摘要: private Bitmap CreatMatrixBitmap(int resourcesID, float screen_width, floatscreen_height) {//screen_width,screent_height是屏幕的宽和高,resourcesID是所要资源的图片idB... 阅读全文
posted @ 2014-07-22 15:36 墨棋 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1.在Android应用程序的第一个Activity的onCreate()函数中加以下代码即可: this.requestWindowFeature(Window.FEATURE_NO_TITLE); this.getWindow().setFlags(WindowMan... 阅读全文
posted @ 2014-07-22 15:36 墨棋 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1,最普通的,略去2.通过实现接口,适用于按钮不同,处理情况不同 publicclassmainActivityextendsActivityimplementsOnClickListener{ protectedvoidonCreate(BundlesavedInstanceState){ su... 阅读全文
posted @ 2014-07-22 15:36 墨棋 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 安卓开发当中TextView是最常用的组件之一了,那么现在就来详细的了解下TextView的属性: Android:autoLink设置是否当文本为URL链接/email/电话号码/map时,文本显示为可点击的链接。可选值(none/web /email/phone/map/all) andro... 阅读全文
posted @ 2014-07-22 15:36 墨棋 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 名称背景数值背景颜色名称中文名称十六进制RGB十进制RGB粗细字体配色参考 white白色#ffffff255,255,255白色[中国搜] ivory象牙色#fffff0255,255,240象牙色[中国搜] lightyellow亮黄色#ffffe0255,255,224亮黄色[中... 阅读全文
posted @ 2014-07-22 15:36 墨棋 阅读(1040) 评论(0) 推荐(0) 编辑
摘要: (一):使用ArrayAdapter进行适配数据: ①:首先定义一个布局文件:[html]view plaincopy[html]view plaincopy 【注意:】上面的Spinner有两个属性1:prompt是初始的时候,Spinner显示的数据,是一个引用类型 2:entries是直接在... 阅读全文
posted @ 2014-07-20 15:24 墨棋 阅读(1302) 评论(0) 推荐(0) 编辑