Skip to main content

Home/ Android Dev/ Group items tagged control

Rss Feed Group items tagged

Vincent Tsao

Handling User Interaction with Android App Widgets - Developer.com - 0 views

  • An App Widget uses a special display control called RemoteViews. Unlike a regular View, a RemoteViews control is designed to display a collection of View controls in another process. Consequently, you can't simply add a button handler because that code would run in your application process, not in the process displaying the RemoteViews object (in this case, the Home Screen process).
  • In order to handle user interaction with an App Widget, the following tasks must be performed: Set a unique click handler for each App Widget control Have the click handler send a command to a registered receiver Process the command received and perform any action necessary Update the App Widget to reflect the changes
Snow Biker

Paul O'Dowd: Arduino, Smooth RC Servo Motor Control - 0 views

  •  
    using easing for servo motoers
Kiran Kuppa

Genymotion emulator - The faster Android Emulator - 0 views

  •  
    "Genymotion is a faster Android emulator for app testing and presentation. You can control simulated sensors like battery, GPS, accelerometer with the user-friendly interface, it includes powerful command line tools that allow you to build complex tests."
Jac Londe

XLP Energy Harvesting Dev Board | DigiKey - 0 views

  • XLP Energy Harvesting Development Board The XLP 16-bit Energy Harvesting Development Kit is a true development platform for realizing energy harvesting applications. The Microchip nanoWatt XLP PIC MCUs are ideal for these low power applications with sleep currents down to 20nA, active mode currents down to 50uA/MHz, code execution efficiency, and multiple wake-up sources. Powered only by light, the XLP kit enables rapid prototyping of low power applications such as RF sensors, temperature/environmental sensors, utility meters, remote controls, and security sensors to name just a few. For software development and programming, the kit includes the PICkit 3 programmer/debugger for use with the Microchip’s free MPLAB™ Integrated Development Environment.
  • UART to USB bridge for use in prototyping and PC communication
  • Solar Energy Harvester with EnerChip storage devices providing backup power
  • ...6 more annotations...
  • Individual disable jumpers for board components such as temperature sensors, LEDs, EEPROM, and potentiometer thereby removing unwanted standby current
  • Expansion PICtail connector with MCU controlled power supply
  • Prototyping area for adding additional sensors and circuits
  • PICkit 3 Programmer/Debugger and board level connector for application software development
  • PIC24F16KA102 eXtreme Low Power MCU with 20nA sleep currents(Can also be used with PIC24FJ64GA102)
  • Energy Aware software reports charge status as a percentage and charge state (Charging or Discharging EnerChips)
Simon Pan

Custom Drawing | Android Developers - 1 views

  • Creating objects ahead of time is an important optimization. Views are redrawn very frequently, and many drawing objects require expensive initialization. Creating drawing objects within your onDraw() method significantly reduces performance and can make your UI appear sluggish.
    • Simon Pan
       
      將物件在初始化時就實例化是很重要的概念,onDraw()的運作速度很快,如困每一個Paint畫圖物件都臨時才在onDraw()產生,將會大幅下降整体程式的流暢效能。
  • If your view doesn't need special control over its size, you only need to override one method: onSizeChanged().
  • is mandatory.
Vincent Tsao

前置摄像头意味着通过手势控制 Android | 谷安--谷奥Android专题站 - 0 views

  • 你可以在 EyE-Sight 站点了解到更多关于这一功能的消息,也可以通过下面的视频来了解更多细节。 继续观看视频:
Vincent Tsao

手势操作(自然用户界面)再探讨 | ifanr 爱范儿 ♂专注于拇指设备的小众讨论 - 0 views

  • 手势相对于无趣的触摸和点击来说,给用户带来了的动态感。但是,缺乏一致性,操作的不易发觉,加上极易触发的不可恢复的操作,使得整个系统的可用性遭到损害。  我们迫切的需要回到基本原则,为这些系统开发可用性指南,这份指南应该基于交互设计的坚实原则,而不是某个公司在人机交互指导中的奇思,或者一些开发者的妙想
  • 简单的宣称你的用户界面“有趣”和“自然”并不能证明你的界面可用,当你的用户使用软件时,对于如何操作茫然无措,并不是什么好玩的事情
    • Vincent Tsao
       
      good point!
  • 1.Android 许多重要的功能是不可见的,除非你长按界面上的某东西,我经常对此感到懊恼
  • ...2 more annotations...
  • 2.他们提到了“隐藏手势”和取消可见菜单。很明显的,在可视菜单上,WebOS 比其它系统做的好。Android 和 iPhone 在这方面都做错了。iPhone 没有菜单, Android 用一个硬件按钮来触发菜单,这意味者你永远不知道程序在什么情况下会有菜单。硬件按钮始终在那里,无论程序是否需要它。
    • Vincent Tsao
       
      尤其对于Android新用户,隐藏的menu会让人手足无措,这点远不如iphone (webos没有使用过,no comment)尚被人接受的原因是:学习成本还好并不高
  • 3.在使用一个 iPhone 应用记录我的购物清单的时候,我发现每次去购物我都会少卖几件东西。最终,我发现,在向购物车里放物品的时候,我经常无意的划过 iPhone 的屏幕,随机的把清单上的东西移除了。这个触摸删除功能是可以关掉的,但是作为默认操作,这个程序会表现的不可靠,在用户没有意识到的情况下出现错误,而且对于用户来说,这个后果不易发现,更无法恢复
    • Vincent Tsao
       
      这个例子应该算作这个app的用户体验设计缺陷,但是iphone对这类场景体验的原生设计是很不错的。举个经典的例子:用iphone接电话,偶尔需要用键盘输入东西。当手机靠近耳朵,屏幕就变黑,默认为不可触摸,当手机离开了耳朵,黑屏就变为了可触摸,并且默认将键盘显示,这一贴心的考虑让"误触摸"的几率尽量降低。而Android上的同一场景体验简直是个噩梦!
Vincent Tsao

How to update the GUI in Push/C2DM sample from advandroid book? - cw-android | Google G... - 0 views

  • > Now I just want to update the GUI from this method. > Can I somehow call a method in PushEndpointDemo.java? No, for two reasons: 1. Because C2DMReceiver is a manifest-registered BroadcastReceiver and therefore has no access to any activities 2. There might not be an activity, since you have no control over the timing of when the C2DM message is received (e.g., the user pressed BACK, the user pressed HOME) > Do I need a Broadcast Intent to do this? Possibly. -- If you want to update an activity or else ignore the message, have C2DMReceiver send out a private broadcast, picked up by a receiver registered via registerReceiver() in the activity -- If you want to update an activity or else raise a notification, have C2DMReceiver send out an ordered broadcast, as described here: http://commonsware.com/blog/2010/08/11/activity-notification-ordered-... -- If you want to update a database, call startActivity() on an IntentService, and have it do the database I/O, plus possibly broadcast an Intent to update an activity/raise a notification.
Simon Pan

Tech Droid: Android WebView, Javascript and CSS - 5 views

  • Calling a Javascript method from your Java code: webView.loadUrl("javascript:jsToggle()"); Calling a Java method from Javascript: window.jsinterface.nativeToggle(); /*   // Before using the above code, you have to inject the interface object which   // has a name "jsinterface"   webView.addJavascriptInterface(jsInterface, "jsinterface"); */
    • Vincent Tsao
       
      useful tips
    • Simon Pan
       
      Is it use to auto-fill the form on WebView?
    • Vincent Tsao
       
      JSInterface lets you bind Java objects into the WebView so they can be controlled from the web pages JavaScript, which means we can do anything to the content from webview via javascript interface, like what we can do with the html DOM content with javascrpit
    • Simon Pan
       
      So, Can I retain username and password by this manner?
    • Vincent Tsao
       
      i think so, you can fill form field with jsinterface
    • Simon Pan
       
      thank you...go on together
Vincent Tsao

Avoiding Memory Leaks | Android Developers - 0 views

  • As part of my job, I ran into memory leaks issues in Android applications and they are most of the time due to the same mistake: keeping a long-lived reference to a Context.
  • There are two easy ways to avoid context-related memory leaks. The most obvious one is to avoid escaping the context outside of its own scope. The example above showed the case of a static reference but inner classes and their implicit reference to the outer class can be equally dangerous. The second solution is to use the Application context. This context will live as long as your application is alive and does not depend on the activities life cycle. If you plan on keeping long-lived objects that need a context, remember the application object. You can obtain it easily by calling Context.getApplicationContext() or Activity.getApplication().
  • In summary, to avoid context-related memory leaks, remember the following: Do not keep long-lived references to a context-activity (a reference to an activity should have the same life cycle as the activity itself) Try using the context-application instead of a context-activity Avoid non-static inner classes in an activity if you don't control their life cycle, use a static inner class and make a weak reference to the activity inside. The solution to this issue is to use a static inner class with a WeakReference to the outer class, as done in ViewRoot and its W inner class for instance A garbage collector is not an insurance against memory leaks
1 - 10 of 10
Showing 20 items per page