摘要: 在编写Android自定义按钮示例基础上,如果要指定字体大小产生这样的效果:其实是不需要自定义变量的,可以直接使用TextView的配置属性:在这里字体大小使用了sp,这里要说一下sp与dp(dip)的区别,dip是:dpDensity-independent Pixels – an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. 阅读全文
posted @ 2013-10-22 11:17 Rex.. 阅读(14657) 评论(2) 推荐(0) 编辑
摘要: wiondow-->preferences-->general-->appearance-->colors and fonts-->java-->java editor text font然后点change,在弹出的框里选字号 阅读全文
posted @ 2013-10-22 10:31 Rex.. 阅读(1788) 评论(0) 推荐(0) 编辑
摘要: activity主窗口与软键盘的交互模式,可以用来避免输入法面板遮挡问题,Android1.5后的一个新特性。这个属性能影响两件事情:【一】当有焦点产生时,软键盘是隐藏还是显示【二】是否减少活动主窗口大小以便腾出空间放软键盘它的设置必须是下面列表中的一个值,或一个”state…”值加一个”adjust…”值的组合。在任一组设置多个值——多个”state…”values,例如&mdash有未定义的结果。各个值之间用|分开。例如:在这设置的值(除"stateUnspecified"和"adjustUnspecified"以外)将覆盖在主题中设置的值各值的含义 阅读全文
posted @ 2013-10-21 17:15 Rex.. 阅读(14203) 评论(0) 推荐(0) 编辑
摘要: Androiddeveloper, I have met a strange problem when I want use a thirdpartyjar, it remained me that:Dex Loader] Unable to execute dex: nullConversion to Dalvik format failed: Unable to execute dex: nullout ofmemoryerror…An internal error occurred during: “Build Project”.Java heap spaceThis is the DE 阅读全文
posted @ 2013-10-21 15:09 Rex.. 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 使其在触摸的时候没有触感反馈。接着设置长按事件的监听。代码在:launcherlauncher-》setupViews方法// Setup the workspacemWorkspace.setHapticFeedbackEnabled(false);mWorkspace.setOnLongClickListener(this);mWorkspace.setup(dragController);dragController.addDragListener(mWorkspace); 阅读全文
posted @ 2013-10-18 16:35 Rex.. 阅读(1273) 评论(0) 推荐(0) 编辑
摘要: Interpolator英文意思是: 篡改者; 分类机; 校对机SDK对Interpolator的描述是:An interpolator defines the rate of change of an animation. This allows the basic animation effects (alpha, scale, translate, rotate) to be accelerated, decelerated, repeated, etc。简而言之Interpolator就是一个“变化率”,一个基本动画的“变化率”。比如:从A到B的一个平移动画,移动,当然后速度的快慢,那 阅读全文
posted @ 2013-10-17 11:03 Rex.. 阅读(4158) 评论(0) 推荐(0) 编辑
摘要: 【一】Android 设置Activity窗体 不显示标题android:theme="@android:style/Theme.NoTitleBar" 1 5 6 7 8 9 10 【二】Android 设置Activity窗体 全屏显示 1 5 6 7 8 9 10 阅读全文
posted @ 2013-10-16 15:05 Rex.. 阅读(10051) 评论(0) 推荐(0) 编辑
摘要: webView.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_UP: if (!v.has... 阅读全文
posted @ 2013-08-14 19:41 Rex.. 阅读(12029) 评论(0) 推荐(0) 编辑
摘要: 【Arduino】Arduino接收字符串相关文章【Arduino】开发入门【十】Arduino蓝牙模块与Android实现通信在【Arduino】开发入门【十】Arduino蓝牙模块与Android实现通信中,只实现了,单个字符的发送。Arduino的Serial.read()每次只能读一个字节,下面的方法说明如何实现字符串通信。编译只要一块Arduino,当然可以结合【Arduino】开发入门【十】Arduino蓝牙模块与Android实现通信。 用Arduino编译器的串口监视器即可看到结果,我们打什么文字进去,下面就会返回什么文字。实现代码,网上贴了很多String comdata = 阅读全文
posted @ 2013-08-06 10:17 Rex.. 阅读(36230) 评论(0) 推荐(0) 编辑
摘要: 【Android】Android 代码判断当前设备是否为模拟器方法比较简单,直接粘贴代码 //判断当前设备是否是模拟器。如果返回TRUE,则当前是模拟器,不是返回FALSE public static boolean isEmulator(Context context){ try{ TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imei = tm.getDeviceId()... 阅读全文
posted @ 2013-08-01 15:23 Rex.. 阅读(9056) 评论(3) 推荐(0) 编辑
摘要: 【Android】Android 代码判断是否获取ROOT权限方法比较简单,直接粘贴代码 /** * 判断当前手机是否有ROOT权限 * @return */ public boolean isRoot(){ boolean bool = false; try{ if ((!new File("/system/bin/su").exists()) && (!new File("/system/xbin/su").exists())){ bool = false; ... 阅读全文
posted @ 2013-08-01 09:06 Rex.. 阅读(9941) 评论(0) 推荐(0) 编辑
摘要: 你是否常常看到别人创建的专业信息图而眼红呢?来看看这十个工具吧,你也一样可以创建牛逼的图表哦! 1. Visual.Ly 这是一个非常好用的应用,你可以用它来快速创建自定义的信息图。你不需要任何设计相关的知识。 2. StatSilk 这个工具有web和桌面两个版本,可以让你简易的分析数据。它可以让你创建非常好看的地图,表格,图形以及各种视觉元素来展示数据。通过StatPlanet的Flash模板你可以创建Flash地图! 3. Infogr.Am 这个工具可以让你快速的创建静态的或者交互的信息图。你只需要导入数据,然后就可以通过这个工具的各种功能来创建绚丽的图表。 ... 阅读全文
posted @ 2013-07-23 09:23 Rex.. 阅读(708) 评论(1) 推荐(0) 编辑
摘要: 侧滑菜单已经成为app一个极常用的设计,不管是事务类,效率类还是生活类app。侧滑菜单因Path 2.0和Facebook为开发者熟知,本文搜集了一些时髦的,精致的侧滑菜单设计案例。优雅的纯色背景,逼真的翻页动画效果。微妙的阴影和渐变增加了视觉立体感。暗色侧滑菜单和柔和的单色背景图文并茂地展示了视频... 阅读全文
posted @ 2013-07-22 11:50 Rex.. 阅读(694) 评论(1) 推荐(0) 编辑
摘要: 在Android工程中,设置apk的默认安装位置在AndroidManifest.xml文件Manifest标签中添加android:installLocation属性android:installLocation这个属性设置的是默认安装位置, 共有三个有效值,auto、internalOnly、preferExternal对应表auto 表示自动,由系统决定安装位置internalOnly 安装在手机内存preferExternal 安装在外部存储中ConstantValueDescriptionauto0Let the system decide install locationinter 阅读全文
posted @ 2013-07-14 08:50 Rex.. 阅读(20759) 评论(0) 推荐(0) 编辑
摘要: 【Android】Android 代码判断是否获取ROOT权限方法比较简单,直接粘贴代码public synchronized boolean getRootAhth() { Process process = null; DataOutputStream os = null; try { process = Runtime.getRuntime().exec("su"); os = new DataOutputStream(process.getOutputStream()); ... 阅读全文
posted @ 2013-07-11 12:00 Rex.. 阅读(8862) 评论(0) 推荐(1) 编辑
点击右上角即可分享
微信分享提示