I am very confused as it seems I am getting conflicting information.
Basically I using the Keyboard and KeyboardView code as a basis for building
my one Keyboard. I would have like to subclassed these classes, but certain
issues arose that made that approach too limiting (namely adjusting the
background image of each key). So I am having to re-implement these classes.
The code for these classes contains references to
`com.android.internal.R.styleable.Keyboard` and the like. But they can't be
found. So I tried replacing it with just `R.styleable.Keyboard` and get the
error that `R.styleable` can't be found, though I am using `import
android.R;`.
At this point I did some more research and decided I must need to create all
the style attributes myself in a resource file. So I created a resource file
in xml/values/resources.xml with:
<declare-styleable name="Keyboard">
<attr name="keyWidth" format="dimension|fraction" />
<attr name="keyHeight" format="dimension|fraction" />
<attr name="horizontalGap" format="dimension|fraction" />
<attr name="verticalGap" format="dimension|fraction" />
</declare-styleable>
But I still get an error:
[javac] Compiling 4 source files to
/home/trans/workspace/microboard/bin/classes
[javac]
/home/trans/workspace/microboard/src/com/tabcomputing/android/microboard/Keyboard.java:170:
cannot find symbol
[javac] symbol : variable styleable
[javac] location: class android.R
[javac] TypedArray a =
res.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.Keyboard);
Any help would be very appreciated.
--
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