Skip to main content

Home/ Android Dev/ Group items tagged code

Rss Feed Group items tagged

Vincent Tsao

andro-views - Project Hosting on Google Code - 1 views

  • The workspace in a viewgroup which creates virtual views (or screens). The user is able to navigate between screens by swiping the screen with his finger.
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会找不到!
Jac Londe

Getting Started | Android Developers - 0 views

  • Getting Started Welcome to Training for Android developers. Here you'll find sets of lessons within classes that describe how to accomplish a specific task with code samples you can re-use in your app. Classes are organized into several groups you can see at the top-level of the left navigation. This first group, Getting Started, teaches you the bare essentials for Android app development. If you're a new Android app developer, you should complete each of these classes in order:
Kiran Kuppa

Modern Android UI Patterns | Javalobby - 2 views

  •  
    " In the latest Android Design in Action Roman Nurik (watch in YouTube) did a great roundup of UI design patterns that have not yet made their way to the official guidelines but are starting to appear in apps more frequently"
Kiran Kuppa

HoloEverywhere · GitHub - 1 views

  •  
    Holo Everywhere is an android library /extension to be able to use Holo theme on older android devices as well 
Kiran Kuppa

NDEF Tools for Android - Google Project Hosting - 0 views

  •  
    This site hosts a library for Near Field Communication on Android using the NDEF format.. In particular the site provides an eclipse plugin for the developers to create NDef records for various use cases - URI, Smartposter, Event etc. There is also an associated application hosted on Google Play store which is very useful in composing complex NDEF records and burning on Tags
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
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

webView load Data problem - Android Beginners | Google Groups - 0 views

  • sagar wrote: > Hello, > I have following code to display webview's background. > wv.loadData("<html><body background=\"file:///android_asset/lbh.png > \">"+data[0],"text/html","utf-8"); > here the data[0] contains the data to be displayed... > Data is displayed fine.. > but background is not displayed. > I can only use this method..i dont knw why i can t access android > assets.. > I have placed that image in assets folder already.. Try loadDataWithBaseUrl() instead of loadData(), supplying some bogus value for the base URL (e.g., fake://why/o/why/is/this/needed).
    • Vincent Tsao
       
      用loadDataWithBaseURL接口才能访问asset中的资源文件,且baseurl不能为null
Vincent Tsao

Possible to change between "full screen" and "with status bar"? - Android Developers | ... - 0 views

  • // go full screen WindowManager.LayoutParams attrs = mActivity.getWindow().getAttributes (); attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; mActivity.getWindow().setAttributes(attrs); // go non-full screen WindowManager.LayoutParams attrs = mActivity.getWindow().getAttributes (); attrs.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN); mActivity.getWindow().setAttributes(attrs);
    • Vincent Tsao
       
      these code can be simplified as below: //go full screen getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); //go non-full screen getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
  •  
    How to toggle fullscreen / non-fullscreen
Vincent Tsao

Vladimir Kroz blog - 0 views

  •  
    Author of "android-active-record": http://code.google.com/p/android-active-record/
Vincent Tsao

Google I/O - Turbo-charge your UI: How to Make your Android UI Fast and Efficient - 1 views

    • Vincent Tsao
       
      youtube视频在highlight中不能展示了,:( 手动添加先
Vincent Tsao

Android Cloud to Device Messaging Framework - Google Projects for Android - 1 views

  • It allows third-party application servers to send lightweight messages to their Android applications. The messaging service is not designed for sending a lot of user content via the messages. Rather, it should be used to tell the application that there is new data on the server, so that the application can fetch it. C2DM makes no guarantees about delivery or the order of messages. So, for example, while you might use this feature to tell an instant messaging application that the user has new messages, you probably would not use it to pass the actual messages. An application on an Android device doesn’t need to be running to receive messages. The system will wake up the application via Intent broadcast when the the message arrives, as long as the application is set up with the proper broadcast receiver and permissions.
  • It uses an existing connection for Google services. This requires users to set up their Google account on their mobile devices.
  • C2DM imposes the following limitations: The message size limit is 1024 bytes. Google limits the number of messages a sender sends in aggregate, and the number of messages a sender sends to a specific device
  • ...1 more annotation...
  • The ClientLogin token authorizes the application server to send messages to a particular Android application. An application server has one ClientLogin token for a particular 3rd party app, and multiple registration IDs. Each registration ID represents a particular device that has registered to use the messaging service for a particular 3rd party app.
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, 而且那還是我硬用,才有機會用到它。
Vincent Tsao

svg-android - SVG parsing and rendering for Android - Google Project Hosting - 1 views

  • This is a compact and straightforward library for parsing SVG files and rendering them in an Android Canvas. By using vector art, the pain of supporting various screen sizes and densities in Android can be reduced. This was the library used to render the artwork and the interface of Androidify. The project also includes a Live Wallpaper app extracted from Androidify. The app shows off the SVG library, and demonstrates the rendering pipeline used to draw the Androids.
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)
Vincent Tsao

Java Code Geeks - 2 views

  •  
    Anyone who familiar with this community?
« First ‹ Previous 81 - 100 of 103 Next ›
Showing 20 items per page