These are chat archives for AvaloniaUI/Avalonia

31st
Jan 2019
Nikita Tsukanov
@kekekeks
Jan 31 05:05 UTC
Why would we need to target a new SDK? Last time I was testing with android 4.4
My plans regarding the backend are:
1) make a special popup mode that would render it inside parent (usable for both ios and android)
2) enable hw-acceleration
3) implement touch support
There are things like keyboard management that needs to be fixed too
Benedikt Stebner
@Gillibald
Jan 31 05:11 UTC
@grokys It looks like the PR uses an older version.
Benedikt Stebner
@Gillibald
Jan 31 05:19 UTC
Benedikt Stebner
@Gillibald
Jan 31 05:43 UTC
Hmm had to pull the latest changes by Hand now I am on AvaloniaUI/Portable.Xaml@99d2b0e
Benedikt Stebner
@Gillibald
Jan 31 05:55 UTC
@kekekeks It is always recommended to compile against the latest SDK. You can always set <uses-sdk android:minSdkVersion="19" /> to support older versions.
Nikita Tsukanov
@kekekeks
Jan 31 06:04 UTC
I had issues with missing types/methods when compiling using latest SDK
Using runtime checks is painful
Benedikt Stebner
@Gillibald
Jan 31 06:07 UTC
The tooling should give you compile errors when you set your target Android version
Milosz Kukla
@miloszkukla
Jan 31 09:09 UTC
@kekekeks I don't know much about Android yet but I had these reasons in mind:
-Newer SDK means newer/better/more apis
-When I last run ControlCatalog.Android I was getting exception:
"The type initializer for 'ReactiveUI.RxApp' threw an exception." -> "You are referencing the Portable version of ReactiveUI in an App. Please change your reference to th…"
Changing SDK to 8.0 solved the problem.
I suppose 4.4 it will get more and more not compatible (and supported) with 3rd party libraries.
Benedikt Stebner
@Gillibald
Jan 31 09:57 UTC
Don't confuse SDK version with Android version
Milosz Kukla
@miloszkukla
Jan 31 10:14 UTC
yeah, I mean API level 26 I think
Milosz Kukla
@miloszkukla
Jan 31 10:34 UTC
but maybe indeed for compatibility reasons minSdkVersion 24 or 23 would be better
Nikita Tsukanov
@kekekeks
Jan 31 12:10 UTC
We used to ship our own rxui build
Without platform-specific hacks that we dont need anyway
Milosz Kukla
@miloszkukla
Jan 31 12:33 UTC
@kekekeks but you don't do that anymore?
@kekekeks about this touch support - is it completely not done or simple Button click/TextBox focus would work?
Benedikt Stebner
@Gillibald
Jan 31 12:35 UTC
In general monoandroid44 is totaly fine to support most smartphones
Milosz Kukla
@miloszkukla
Jan 31 12:42 UTC
(I'm not sure if when I click using mouse in emulator is it emulating touch or Android's mouse click (I would bet the touch)
Benedikt Stebner
@Gillibald
Jan 31 15:04 UTC
SkiaTextDecorations.PNG
TextDecorations with Skia
Benedikt Stebner
@Gillibald
Jan 31 15:14 UTC
Direct2D1 only supports Underline and Strikethrough. BaseLine and Overline are not possible out of the box.
Nikita Tsukanov
@kekekeks
Jan 31 15:16 UTC
@miloszkukla touch events are converted to mouse events
Wiesław Šoltés
@wieslawsoltes
Jan 31 16:18 UTC
@Gillibald Nice, been waiting for this for very long time :smile:
Wiesław Šoltés
@wieslawsoltes
Jan 31 16:49 UTC
@kekekeks The X11PlatformOptions does not have UseDeferredRendering as the Gt3 version had
Nikita Tsukanov
@kekekeks
Jan 31 17:39 UTC
Yep, it doesn't support immediate renderer
Any reason to add it?
Wiesław Šoltés
@wieslawsoltes
Jan 31 17:41 UTC
Not really, just had code that used this option in my app (mainly for testing).
Milosz Kukla
@miloszkukla
Jan 31 17:45 UTC
what about this custom rxui build? is there other way of not getting that exception in ControlCatalog.Android than using newer SDK?
Nikita Tsukanov
@kekekeks
Jan 31 17:51 UTC
No idea
We'll probably update the SDK
And target Android 4.4 as minimum platform
stropheum
@stropheum
Jan 31 22:09 UTC

Hey I have a quick question. I currently have a scrollview contained in a window as my root element. I wanted to add a dockpanel for menu items locked to the top of the screen and I'm a bit stuck.

If i put the dockpanel at the same level ass the scrollviewer, the designer crashes.

If i contain both at the same level in a parent stackpanel, the menu shows up in the correct place but I can no longer use the scroll function of the scrollviewer.

If I put the dockpanel inside the scrollviewer, it will function, but the menu disappears when I scroll down (which makes sense due to it being a child but this is the closest thing I got to the expected behavior)

What should I do if i want a menu docked to the top, and immediately below it, a scrollviewer whose scroll function will work when it gets over-filled?

oh, of course the moment I ask the question i find the answer for myself
so the DockPanel has to be the single root object of the window, and after the definitio of the menu but before the end of dockpanel i define my scrollviewer
<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="Uploader" SizeToContent="1" MinHeight="300" MinWidth="520" CanResize="False" Background="LightGray">

    <DockPanel>
      <Menu DockPanel.Dock="Top">
        <MenuItem Header="_File">
          <MenuItem Header="_Open..."/>
          <Separator/>
          <MenuItem Header="_Exit"/>
        </MenuItem>
        <MenuItem Header="_Edit">
          <MenuItem Header="Copy"/>
          <MenuItem Header="Paste"/>
        </MenuItem>
      </Menu>

      <ScrollViewer VerticalScrollBarVisibility="Visible">
        <StackPanel Name="Root" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="510">

        </StackPanel>
      </ScrollViewer>

    </DockPanel>

</Window>
if anyone else was curious
dfkeenan
@dfkeenan
Jan 31 23:07 UTC
Is there a nice way of hosting AvaloniaUI elements in a WPF application? Sort of looking at a migration path.
jp2masa
@jp2masa
Jan 31 23:10 UTC
there's WpfAvaloniaHost in this package: https://www.nuget.org/packages/Avalonia.Win32.Interoperability/
dfkeenan
@dfkeenan
Jan 31 23:10 UTC
Oh, Nice!