Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: type object 'android.widget.AbsoluteLayout' has no attribute 'LayoutParams' #175

Closed
lc-soft opened this issue Sep 15, 2015 · 2 comments

Comments

@lc-soft
Copy link

lc-soft commented Sep 15, 2015

After reading the android document, I want use AbsoluteLayout.LayoutParams, but I can't use this.

adb logcat printed a message:

AttributeError: type object 'android.widget.AbsoluteLayout' has no attribute 'LayoutParams'

This is my code snippet:

AbsoluteLayout = autoclass('android.widget.AbsoluteLayout')
lp = AbsoluteLayout.LayoutParams(320, 240, 0, 100)

Is there a problem with my code?

@lc-soft
Copy link
Author

lc-soft commented Sep 15, 2015

With autoclass('android.widget.AbsoluteLayout.LayoutParams') also can not use.
error message:

JavaException: Class not found 'android.widget.AbsoluteLayout.LayoutParams'

@lc-soft
Copy link
Author

lc-soft commented Sep 17, 2015

It can not seem to directly access a nested class,.

Finally, I use the Java code to solve it.

@lc-soft lc-soft closed this as completed Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant