android - Kankan.wheel on desktop widget -


kankan.wheel (http://code.google.com/p/android-wheel/) library include in project.

if add wheel widget activity layout - that's ok , work perfectly, if add component desktop widget layout - @ moment adding widget desktop have this:

08-08 21:02:17.630: w/appwidgethostview(30529): error inflating appwidget       appwidgetproviderinfo(provider=componentinfo{com.snake.vahta.counter/com.snake.vahta.counter.v ahtaappwidgetprovider}): android.view.inflateexception: binary xml file line #89: error inflating class kankan.wheel.widget.wheelview 

and widget doesn display, string: unable show widget

my xml layout file:

<?xml version="1.0" encoding="utf-8"?>    <linearlayout   xmlns:android="http://schemas.android.com/apk/res/android"   android:orientation="vertical"   android:layout_width="match_parent"   android:layout_height="match_parent"   android:gravity="center"   android:layout_margin="4dp"   android:id="@+id/widgetframelayout"   android:background="@drawable/background">       <linearlayout         android:layout_margintop="24dp"         android:layout_gravity="center_horizontal"         android:layout_width="wrap_content"         android:layout_height="wrap_content">          <kankan.wheel.widget.wheelview android:id="@+id/w_counter_100k"             android:layout_height="wrap_content"             android:layout_width="wrap_content"/>         <kankan.wheel.widget.wheelview android:id="@+id/w_counter_10k"             android:layout_height="wrap_content"             android:layout_width="wrap_content"/>         <kankan.wheel.widget.wheelview android:id="@+id/w_counter_1k"             android:layout_height="wrap_content"             android:layout_width="wrap_content"/>         <kankan.wheel.widget.wheelview android:id="@+id/w_counter_100"             android:layout_height="wrap_content"             android:layout_width="wrap_content"/>         <kankan.wheel.widget.wheelview android:id="@+id/w_counter_10"             android:layout_height="wrap_content"             android:layout_width="wrap_content"/>         <kankan.wheel.widget.wheelview android:id="@+id/w_counter_1"             android:layout_height="wrap_content"             android:layout_width="wrap_content"/>         <kankan.wheel.widget.wheelview android:id="@+id/w_counter_dot"             android:layout_height="wrap_content"             android:layout_width="wrap_content"/>         <kankan.wheel.widget.wheelview android:id="@+id/w_counter_01"             android:layout_height="wrap_content"             android:layout_width="wrap_content"/>         <kankan.wheel.widget.wheelview android:id="@+id/w_counter_001"             android:layout_height="wrap_content"             android:layout_width="wrap_content"/>     </linearlayout>      <textview         android:layout_height="wrap_content"         android:layout_width="wrap_content"         android:padding="3dip"         android:gravity="center"         android:text="@string/total_sum" />  </linearlayout> 

desktop widgets have limited set of allowed parts. restrictions necessary due potential security issues of allowing arbitrary code execution in home screen.

here's relevant part of appwidget docs:

a remoteviews object (and, consequently, app widget) can support following layout classes:

framelayout

linearlayout

relativelayout

gridlayout

and following widget classes:

analogclock

button

chronometer

imagebutton

imageview

progressbar

textview

viewflipper

listview

gridview

stackview

adapterviewflipper

descendants of these classes not supported.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -