Aren't focus states supposed to bubble to child Views?

by patbenatar » Mon, 19 Apr 2010 16:31:45 GMT


Sponsored Links
 Hey all-

When using a View within a View, for example an ImageView within a
LinearLayout, both of which have xml drawable resources (the
LinearLayout as a background) specifying PNG drawables to use for the
on/off states, shouldn't children Views receive the focus state when
their parent gets focus? So as far as I understand, both my
LinearLayout and ImageView should be switching to their focus
states...right? Apparently not... Or, more likely, apparently my
implementation is incorrect..

The focus state works on the LinearLayout but my ImageView never
receives focus.. I have both Views set to android:focusable="true".

Thanks,
Nick

--



Other Threads

1. Error 41 when doing make without any changes.

Hi,

I'm trying to compile Android but when i do make it says Error 41.
I've been searching in this group but i can't find the same that
happens to me.
Here are the errors:
,boolean,boolean,boolean,boolean,boolean,java.lang.String,java.lang.String,MethodInfo,TypeInfo,ParameterInfo[],ClassInfo[],SourcePositionInfo,AnnotationInstanceInfo[])
at MethodInfo to ()
                MethodInfo result = new MethodInfo(
                                    ^
build/tools/droiddoc/src/Converter.java:482: cannot find symbol
symbol: class FieldDoc
            FieldDoc f = (FieldDoc)o;
            ^
build/tools/droiddoc/src/Converter.java:482: cannot find symbol
symbol: class FieldDoc
            FieldDoc f = (FieldDoc)o;
                          ^
build/tools/droiddoc/src/Converter.java:483: internal error; cannot
instantiate
FieldInfo(java.lang.String,ClassInfo,ClassInfo,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,TypeInfo,java.lang.String,java.lang.Object,SourcePositionInfo,AnnotationInstanceInfo[])
at FieldInfo to ()
            return new FieldInfo(f.name(),
                   ^
build/tools/droiddoc/src/Converter.java:507: cannot find symbol
symbol: class PackageDoc
            PackageDoc p = (PackageDoc)o;
            ^
build/tools/droiddoc/src/Converter.java:507: cannot find symbol
symbol: class PackageDoc
            PackageDoc p = (PackageDoc)o;
                            ^
build/tools/droiddoc/src/Converter.java:522: cannot find symbol
symbol: class Type
           Type t = (Type)o;
           ^
build/tools/droiddoc/src/Converter.java:522: cannot find symbol
symbol: class Type
           Type t = (Type)o;
                     ^
build/tools/droiddoc/src/Converter.java:524: cannot find symbol
symbol: class ClassDoc
           if (t instanceof ClassDoc) {
                            ^
build/tools/droiddoc/src/Converter.java:525: cannot find symbol
symbol: class ClassDoc
               simpleTypeName = ((ClassDoc)t).name();
                                  ^
build/tools/droiddoc/src/Converter.java:529: internal error; cannot
instantiate
TypeInfo(boolean,java.lang.String,java.lang.String,java.lang.String,ClassInfo)
at TypeInfo to ()
           TypeInfo ti = new TypeInfo(t.isPrimitive(), t.dimension(),
                         ^
build/tools/droiddoc/src/Converter.java:537: cannot find symbol
symbol: class Type
            Type t = (Type)o;
            ^
build/tools/droiddoc/src/Converter.java:537: cannot find symbol
symbol: class Type
            Type t = (Type)o;
                      ^
build/tools/droiddoc/src/Converter.java:543: cannot find symbol
symbol: class ClassDoc
            else if (t instanceof ClassDoc) {
                                  ^
build/tools/droiddoc/src/Converter.java:544: cannot find symbol
symbol: class ClassDoc
 
ti.setTypeArguments(Converter.convertTypes(((ClassDoc)t).typeParameters()));
                                                             ^
build/tools/droiddoc/src/Converter.java:559: cannot find symbol
symbol: class Type
            Type t = (Type)o;
            ^
build/tools/droiddoc/src/Converter.java:559: cannot find symbol
symbol: class Type
            Type t = (Type)o;
                      ^
build/tools/droiddoc/src/Converter.java:564: cannot find symbol
symbol: class Type
              for(Type ty : t.asParameterizedType().typeArguments()){
                  ^
build/tools/droiddoc/src/Converter.java:574: cannot find symbol
symbol: class Type
              for(Type ty : t.asTypeVariable().bounds()){
                  ^
build/tools/droiddoc/src/Converter.java:584: cannot find symbol
symbol: class Type
              for(Type ty : t.asWildcardType().superBounds()){
                  ^
build/tools/droiddoc/src/Converter.java:589: cannot find symbol
symbol: class Type
                for(Type ty : t.asWildcardType().extendsBounds()){
                    ^
build/tools/droiddoc/src/Converter.java:614: cannot find symbol
symbol: class MethodDoc
            if (o instanceof MethodDoc) {
                             ^
build/tools/droiddoc/src/Converter.java:615: cannot find symbol
symbol: class MethodDoc
                return Converter.obtainMethod((MethodDoc)o);
                                               ^
build/tools/droiddoc/src/Converter.java:617: cannot find symbol
symbol: class ConstructorDoc
            else if (o instanceof ConstructorDoc) {
                                  ^
build/tools/droiddoc/src/Converter.java:618: cannot find symbol
symbol: class ConstructorDoc
                return Converter.obtainMethod((ConstructorDoc)o);
                                               ^
build/tools/droiddoc/src/Converter.java:620: cannot find symbol
symbol: class FieldDoc
            else if (o instanceof FieldDoc) {
                                  ^
build/tools/droiddoc/src/Converter.java:621: cannot find symbol
symbol: class FieldDoc
                return Converter.obtainField((FieldDoc)o);
                                              ^
build/tools/droiddoc/src/Converter.java:649: cannot find symbol
symbol: class AnnotationDesc
            AnnotationDesc a = (AnnotationDesc)o;
            ^
build/tools/droiddoc/src/Converter.java:649: cannot find symbol
symbol: class AnnotationDesc
            AnnotationDesc a = (AnnotationDesc)o;
                                ^
build/tools/droiddoc/src/Converter.java:651: package AnnotationDesc
does not exist
            AnnotationDesc.ElementValuePair[] ev = a.elementValues();
                          ^
build/tools/droiddoc/src/Converter.java:715: cannot find symbol
symbol  : class Type
location: class Converter
        if (orig instanceof Type) {
                            ^
build/tools/droiddoc/src/Converter.java:717: cannot find symbol
symbol  : class Type
location: class Converter
            converted = Converter.obtainType((Type)orig);
                                              ^
build/tools/droiddoc/src/Converter.java:719: cannot find symbol
symbol  : class FieldDoc
location: class Converter
        else if (orig instanceof FieldDoc) {
                                 ^
build/tools/droiddoc/src/Converter.java:721: cannot find symbol
symbol  : class FieldDoc
location: class Converter
            converted = Converter.obtainField((FieldDoc)orig);
                                               ^
build/tools/droiddoc/src/Converter.java:723: cannot find symbol
symbol  : class AnnotationDesc
location: class Converter
        else if (orig instanceof AnnotationDesc) {
                                 ^
build/tools/droiddoc/src/Converter.java:725: cannot find symbol
symbol  : class AnnotationDesc
location: class Converter
            converted =
Converter.obtainAnnotationInstance((AnnotationDesc)orig);
                                                            ^
build/tools/droiddoc/src/Converter.java:727: cannot find symbol
symbol  : class AnnotationValue
location: class Converter
        else if (orig instanceof AnnotationValue[]) {
                                 ^
build/tools/droiddoc/src/Converter.java:728: cannot find symbol
symbol  : class AnnotationValue
location: class Converter
            AnnotationValue[] old = (AnnotationValue[])orig;
            ^
build/tools/droiddoc/src/Converter.java:728: cannot find symbol
symbol  : class AnnotationValue
location: class Converter
            AnnotationValue[] old = (AnnotationValue[])orig;
                                     ^
build/tools/droiddoc/src/Converter.java:745: cannot find symbol
symbol  : class AnnotationValue
location: class Converter
            HashSet<AnnotationValue> set =
mAnnotationValuesNeedingInit;
                    ^
build/tools/droiddoc/src/Converter.java:747: cannot find symbol
symbol  : class AnnotationValue
location: class Converter
            for (AnnotationValue o: set) {
                 ^
build/tools/droiddoc/src/DroidDoc.java:342: cannot find symbol
symbol  : variable LanguageVersion
location: class DroidDoc
        return LanguageVersion.JAVA_1_5;
               ^
build/tools/droiddoc/src/DroidDoc.java:994: cannot find symbol
symbol  : class MemberDoc
location: class DroidDoc
        if (doc instanceof MemberDoc) {
                           ^
build/tools/droiddoc/src/DroidDoc.java:999: cannot find symbol
symbol  : class ClassDoc
location: class DroidDoc
        if (doc instanceof ClassDoc) {
                           ^
build/tools/droiddoc/src/DroidDoc.java:1000: cannot find symbol
symbol  : class ClassDoc
location: class DroidDoc
            ClassDoc classDoc = (ClassDoc) doc;
            ^
build/tools/droiddoc/src/DroidDoc.java:1000: cannot find symbol
symbol  : class ClassDoc
location: class DroidDoc
            ClassDoc classDoc = (ClassDoc) doc;
                                 ^
build/tools/droiddoc/src/DroidDoc.java:1009: cannot find symbol
symbol  : class ClassDoc
location: class DroidDoc
            ClassDoc current = classDoc;
            ^
build/tools/droiddoc/src/DroidDoc.java:1040: cannot find symbol
symbol  : class Doc
location: class DroidDoc
                if ((entry instanceof Doc) && isHidden((Doc) entry)) {
                                      ^
build/tools/droiddoc/src/DroidDoc.java:1040: cannot find symbol
symbol  : class Doc
location: class DroidDoc
                if ((entry instanceof Doc) && isHidden((Doc) entry)) {
                                                        ^
build/tools/droiddoc/src/DroidDoc.java:1080: cannot find symbol
symbol  : class Type
location: class DroidDoc.HideHandler
            if (proxy instanceof Type &&
methodName.equals("toString")) {
                                 ^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
136 errors
make: *** [out/host/common/obj/JAVA_LIBRARIES/droiddoc_intermediates/
javalib.jar] Error 41

I'm using Debian squeeze with JDK 1.5.0_21.
I've set $JAVA_HOME as well as ANDROID_JAVA_HOME pointing to my JDK/
bin dir.

Thanks in anticipation

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. WAP Push Support

HI All

Doing some investigating and having troubles find specifics or how to
raise issues.

I send WAP push message to handsets yet have been testing the android
handsets yet they are not recieving them. All versions of Android are
affected. Other devices platforms dont have any issues "WinMo, Symbiam
list goes on"

Wierd thing I have tested it on a an HTC running Android with Sense UI
and messages are recieved.

What I would like to know if possible is anything happening to these
messages or ...

Could the device be intercepting it and trying to interprt in another
applicatiuon?
Could the device be recieving these messages yet not know what to do
with them discard them?

I have tried the dirreferent versions of WAP yet none work.

Is there a module inside android not turned on. How would I request a
change for android "if thats even possible"

Thanks

-- 

3. Loading a layout from XML inside of a derived class

4. How to determine if Activity is on screen

5. AccountManager.getAuthToken() problem with more than one app

6. Debugging in Android Open Source

7. Loading a layout from XML inside of a derived class