"If all you are wanting to do is change the color of one key, why don't you 
just subclass KeyboardView and override the following methods:"

Hmm... that's a possibility. If I can change mKeyBackground. I tried:

    @Override
    public void invalidateKey(int keyIndex) {
        mKeyBackground = getResources().getDrawable(R.drawable.key_space);
        super(keyIndex);
    }

But I get:

    [javac] Compiling 2 source files to 
/home/trans/workspace/microboard/bin/classes
    [javac] 
/home/trans/workspace/microboard/src/com/tabcomputing/android/microboard/PhoneticKeyboardView.java:45:
 
cannot find symbol
    [javac] symbol  : variable mKeyBackground
    [javac] location: class 
com.tabcomputing.android.zenboard.PhoneticKeyboardView
    [javac]         mKeyBackground = 
getResources().getDrawable(R.drawable.key_space);
    [javac]         ^


Am I wrong that protected variables should be accessible in the subclass?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to