Skip to main content

Home/ Android Dev/ Group items tagged components

Rss Feed Group items tagged

Vincent Tsao

CommonsWare Android Components - 1 views

  • The CommonsWare Android Components, or CWAC, are open source libraries to help solve various tactical problems with Android development. Each CWAC component is packaged as a tiny JAR file that you can add to your project (e.g., drop it in libs/), requiring at most other CWAC JARs as dependencies.
Kiran Kuppa

Android Essentials: Creating Android-Compliant Libraries - Tuts+ Code Tutorial - 1 views

  •  
    For a library to be compatible with Android, it can only reference classes available as part of Android and other classes implemented specifically in the library itself.Android Libraries can contain Java classes, resources, and other project information, but not assets. They can reference other libraries and leverage third party JAR files. They have Android manifest files just like regular Android projects. However, they differ from normal Android projects in an important way: they cannot be compiled into their own application packages or deployed onto devices. They can also not be exported as standalone JAR files. Once referenced from an Android project, the library components are incorporated into the Android application that references them at build time and added to the application package. There is no need to declare the component as the library classes are rolled into the APK directly. In terms of compatibility, the Android project must have an API Level higher than or equal to the API Level set in the Android library.
Simon Pan

Building Custom Components | Android Developers - 2 views

  • When the class is nested in the NoteEditor class, this technique will not work.
    • Simon Pan
       
      当自己复写的View写在内部类时,在xml呼叫这个新类是没有用的!
  •  
    有什么具体案例么?
  •  
    这句话是写在第4点 Use the Custom Component中∶ Notice that the MyEditText class is now a separate class file. 1.When the class is nested in the NoteEditor class, this technique will not work. 我还没真实遇到,Diigo先! 总之告诉我们如果将自己写的View写成内部类时, XML会找不到!
Vincent Tsao

Is it possible to update a widget from an Activity? - Android Developers | Google Groups - 0 views

  • An AppWidgetProvider is a BroadcastReceiver. That gives you two possibilities right off the bat: 1. Have it also handle whatever other Intents you were planning on setting up with a separate BroadcastReceiver, or 2. Send an Intent from whatever component you want to the AppWidgetProvider. In other words, don't worry about trying to talk directly to the app widget (which I suspect is impossible) -- just talk to your code that already talks to the app widget.
    • Vincent Tsao
       
      good explanation
  • I update my widget from within my app, when I delete/add entries to a list. To do this, I have a method (updateWidget) and a static String (UPDATE_ACTION). My updateWidget() method sends a broadcast which is received by the widget class and then calls onUpdate() with the appropriate params: private void updateWidget() {                 Intent i = new Intent(this, TVWidget.class);                 i.setAction(TVWidget.UPDATE_ACTION);                 sendBroadcast(i);         } In TVWidget class: @Override         public void onReceive(Context context, Intent intent) {                 String action = intent.getAction();                 if (action != null && action.equals(UPDATE_ACTION)) {                         final AppWidgetManager manager = AppWidgetManager.getInstance (context);                         onUpdate(context, manager,                                         manager.getAppWidgetIds(new ComponentName(                                                         context, TVWidget.class)                                         )                         );                 }                 else {                         super.onReceive(context, intent);                 }         } This seems to work fine.
Vincent Tsao

Android 3.0 Preview SDK | Android Developers - 0 views

  • Once you have installed these components, open your SDK directory and navigate to docs/sdk/ and open index.html in your browser.
    • Vincent Tsao
       
      这个文档还真是藏得很隐蔽!
Vincent Tsao

kaeppler/droid-fu - GitHub - 6 views

  • Droid-Fu offers both support classes meant to be used alongside existing Android code, as well as self-contained, ready-to-be-used components like new adapters and widgets. The areas tackled by Droid-Fu include: application life-cycle helpers support classes for handling Intents and diagnostics better support for background tasks super-easy and robust HTTP messaging powerful caching of Objects, HTTP responses, and remote images custom adapters and views I suggest you read this introductory article, and anything that follows.
  •  
    大哥你有覺得這個比AsyncTask好用嗎?
  • ...2 more comments...
  •  
    BetterAsyncTask本质就是AsyncTask,我想在用法上应该没有太大区别 但AsyncTask有个硬伤就是它的life-cycle对当前的activity的life-cycle有依赖,容易引起FC,而BetterAsyncTask解决了这个问题,Ref: http://groups.diigo.com/group/android_related/content/introducing-droid-fu-for-android-betteractivity-betterservice-and-betterasynctask-brain-flush-2838716 当然还有其他解决办法,我自己偏向于 IntentService + Broadcast mechanism的解决方案
  •  
    難怪你會搜尋到我布落格 呵呵
  •  
    哈哈,其实是我几个月前看了你的blog后,才有了更多的认识的
  •  
    在我最近的案子裡 幾乎很少機會用到IntentService。 我目前唯一用到的是AsyncTask, 而且那還是我硬用,才有機會用到它。
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)
1 - 7 of 7
Showing 20 items per page