Random appwidget unresponsiveness

by Niall » Fri, 20 May 2011 06:18:28 GMT


Sponsored Links
 Hey,

I have an appwidget that works fine most of the time.  

Sometimes though, the buttons don't respond. When I press on them nothing 
happens. If I swipe to the left and back to the right it seems to sometimes 
fix it. Nothing gets put in logcat so I'm out of ideas about what might be 
happening. 

Can anyone help? Do you need more information? 

It sounds to me that the intents aren't set properly... but they are! I 
can't figure it out. 

-- 



Other Threads

1. Just beginning

Currently I have a tmobile behold, and I am replused by the operating
touch wiz system.  What do i need to do to get the android operating
system on my phone.  I am new to this, but find it very intresting.  I
have read alot but am unsure of the "how- to " process.

Please help.

--~--~---------~--~----~------------~-------~--~----~

2. adding and reading new attributes from/to a declare-styleable

Hi,
i was wondering if anyone could give me hints on this one (i am re-posting
an older version of a question i once had):
i created a new attrs.xml that adds some functionality to the soft keyboard
sample code.
i would appreciate any insight you may have on this:

i added: <attr name="keysImg" format="reference" /> to:

<declare-styleable name="Keyboard">
        <!-- Default width of a key, in pixels or percentage of display
width -->
        <attr name="keyWidth" format="dimension|fraction" />
       ....
       ....
         <!-- The image used for keys  -->
        <attr name="keysImg" format="reference" />
    </declare-styleable>

and added: <attr name="keysImgTemp" format="reference" /> to:
<declare-styleable name="Keyboard_Key">
.....
<attr name="keyIcon" format="reference" />
<attr name="keysImgTemp" format="reference" />
......
</declare-styleable>

in the xml layout file the data look like this:
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:jk="
http://schemas.android.com/apk/res/com.example.android.softkeyboard"
    ......
    jk:keysImg="@drawable/sym_keyboard_shift"
    >
and the key looks like this:
<Key android:codes="49" android:keyIcon="@drawable/sym_keyboard_shift"
jk:keysImgTemp="@drawable/keypad1low"/>

in my code i try to reference these values
 TypedArray a1 = res.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard);//get all attrs for the keyboard as defined in
attrs.xml
The line below DOESN'T WORK! (has null value) - WHY????
BitmapDrawable orgBmpDraw=
(BitmapDrawable)a1.getDrawable(R.styleable.Keyboard_keysImg);

TypedArray a = res.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard_Key);
//the kine below WORKS!
BitmapDrawable orgBmpDraw=
(BitmapDrawable)a.getDrawable(R.styleable.Keyboard_Key_keysImgTemp);
//The kine below DOESN'T WORK - has null value - I eventually solved it by
changing the attribute from android: to jk: so i needed to override the
existing internal attr.xml with mine
BitmapDrawable orgBmpDraw=
(BitmapDrawable)a.getDrawable(R.styleable.Keyboard_Key_keyIcon);

what am i missing here?
thanks,


-- 
Yaron Spektor

--~--~---------~--~----~------------~-------~--~----~

3. How do I know when my view will be displayed?

4. Layout with all cells the same size

5. Preference screen for IME

6. Listner for Click and Touch events:

7. Dynamic text movement