Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 26 08:35
    @freakboy3742 banned @HBanado_twitter
Alexander Görtz
@nylocx
I couldn't figure out so for testing I build and than run the AppImage with the parameters.
Alexander Görtz
@nylocx
@freakboy3742 I got another one now my glibc on the target system seems to be too old (Amazon Linux 2)
/tmp/appimage_extracted_00fbb87d198c41ca56a4432d5b9e5fa0/usr/bin/python3: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by /tmp/appimage_extracted_00fbb87d198c41ca56a4432d5b9e5fa0/usr/bin/python3)
Russell Keith-Magee
@freakboy3742
Can't say I know much about Amazon Linux; but if the GLibC it's using is earlier than 2018 (which is when Ubuntu 18.04 was released), then yes, that would be consistent.
Alexander Görtz
@nylocx
@freakboy3742 It was related to the python build. I rebuild with a python 3.7 (Amazon Linux 2 Python) venv and now it works, thanks.
Asheesh Laroia
@paulproteus
Howdy all. Today I looked more into the Android Canvas. I spent some time getting familiar with android.graphics.Path from Java and wrote some notes to self as I read through the iOS Canvas implementation carefully.
I discovered that (as far as I can tell...) to use the Android Canvas, we'd have to subclass android.view.View, but we cannot make subclasses from the rubicon-java world.
Russell Keith-Magee
@freakboy3742
Ah. That's... a pity.
Asheesh Laroia
@paulproteus
That's OK - we can make a fake subclass, which is to say, a Java class that gets bundled into the app template called PythonView (similar to PythonActivity.java), which passes all method calls into Java.
er, into Python
Russell Keith-Magee
@freakboy3742
Right - but we can't add interfaces dynamically, right?
i.e., it would need to be a very specific subclass of Android.view.View, and nothing else?
Asheesh Laroia
@paulproteus
True, but I don't see why that would be needed.
We can make as many instances of a Java class called (say) PythonView as we want, and pass them each their own Python object as the code that actually powers that PythonView.
So I think this wouldn't constrain us.
My next step is to set up the PythonView system and test that out, and if it works nicely, then the next-next step is to actually make Android Canvas. :)
FWIW, I'm pausing on DetailedList for the next week or two, since I think the only interaction it really needs next is delete, and I'm still blocked on scheduling Android expert advice.
I'm hopeful I can get canvas into a good shape as my current high level goal.
Asheesh Laroia
@paulproteus
Heading to bed for now; happy to chat more later. Hoping to give another update like this later in the week!
FunMod
@FunMod
Does the Numpy lib work on Android platform?
Paul m. p. P.
@pmp-p
it can but it may not be packageable
FunMod
@FunMod
I'm trying to build an app for Android using the numpy package
Is this feasible?
Paul m. p. P.
@pmp-p
i don't know that depends on your knowledge of packaging compiled binaries and libraries for android apk
i mean there is not a ready made tool to do that specific except perhaps python-for-android ( but i'm not sure )
FunMod
@FunMod
Well, thanks
J3R
@J3R
hello, is there anything special to do (or is it even possible) to input characters in Toga's webview forms? For instance, when I try to fill in the Beeware "Keep in Touch" form (https://beeware.org/community/keep-informed/) which can be accessed using the example code (https://github.com/beeware/toga/blob/master/examples/webview/webview/app.py), no character is captured and displayed. I'm on MacOS. Thanks in advance!
Asheesh Laroia
@paulproteus
@freakboy3742 Here's a pull request to enable fake subclassing for Views, for Canvas: beeware/briefcase-android-gradle-template#27
Russell Keith-Magee
@freakboy3742
@J3R What version of Toga are you using? I remember that coming up in the past; the issue was that the keyboard handler was hijacking keystrokes, and wasn't passing them to the view for "normal" handling. However, I thought we'd fixed that...
3 replies
Tom
@t-arn

Hello everybody, I'm trying to implement setting the background color of a Button on Android. For this, I'm trying the following code:

    def set_background_color(self, value):
        if value:
            PorterDuff = JavaClass("android/graphics/PorterDuff")
            bg = self.native.getBackground()
            bg.setColorFilter(native_color(value), PorterDuff.Mode.MULTIPLY)

But I get following error message:

2021-03-23 06:51:55.991 16930-16930/org.beeware.button E/Python: AttributeError: Java class 'b'android/graphics/PorterDuff'' has no attribute 'Mode'

Mode is a enum - why do I get this error message?
I also tried to pass the integer value instead of MULTIPLY, but then I get the error that setColor(int, int) does not exist

Tom
@t-arn

OK, got it: I need to specify it like this:

PorterDuff__Mode = JavaClass("android/graphics/PorterDuff$Mode")
bg.setColorFilter(native_color(value), PorterDuff__Mode.MULTIPLY)

Now, it works :-)

Tom
@t-arn
I thought that the $ notation in JavaClass only works for sub-classes. But it also seems to work for enums
ceo-of-programming
@ceo-of-programming
@freakboy3742 Do you happen to have any suggestion on the best way of doing pull to refresh on gtk.listbox?
ceo-of-programming
@ceo-of-programming
On that same topic, refresh is not always the appropriate "icon/action", sometimes "load more" might be more appropriate.
ceo-of-programming
@ceo-of-programming
@freakboy3742 in case you want to take a look at how things are going: https://github.com/ceo-of-programming/toga/tree/detailedlist_gtk_listbox
Russell Keith-Magee
@freakboy3742
@t-arn The $ notation isn't sub classes - it's inner classes; that is, classes defined inside the scope of another class. Enums are commonly defined this way (although you can define enums as standalone classes in their own .java/.class files)
@ceo-of-programming No particular suggestions; I know enough GTK to be dangerous, but I wouldn't claim to be an expert. The general approach I would take would be to find a pure C version of an app/widget that implements the behavior, and try to crib off that implementation to see what is needed.
Russell Keith-Magee
@freakboy3742
Hi folks! After many years of using Gitter, we've made a decision to move the chat community to Discord. To join the new Discord server, visit https://beeware.org/bee/chat/
nabin
@nabin44304355_twitter
image.png
image.png
please help to get rid of this error
Russell Keith-Magee
@freakboy3742
@nabin44304355_twitter FYI: We've moved our chat community to Discord. To join the discord server, visit https://beeware.org/bee/chat/
nabin
@nabin44304355_twitter
ok thanks
nabin
@nabin44304355_twitter
@freakboy3742 hey you
Russell Keith-Magee
@freakboy3742
@nabin44304355_twitter FYI - that’s a particularly rude way to try and get someone’s attention.
And, as I’ve already told you - we’ve moved the chat conversation to Discord. I won’t be answering questions here.
This message was deleted
Russell Keith-Magee
@freakboy3742:matrix.org
[m]
Testing the matrix bridge
callahad
@callahad:matrix.org
[m]
Hooray! It works!
santiago casaliglia
@santihcg_twitter
Hi @freakboy3742. Great job, I love Beeware! Please, I have a Python script with requests.post and the Android app ignores it completely. Simply it skip it, without any error. How can I solve this? I tried also with httpx with same results. The dev works perfectly
Russell Keith-Magee
@freakboy3742
@santihcg_twitter Hi - we’ve moved this community to Discord; if you post your question there, we may be able to help.