How to use Swift UI Zstack and Hstack for photo alignment - ionic-framework

I am using Widgetkit to create a widget that displays some photos and text undernearth. I want the final UI to look like the image below, but I can not get the Swift UI Hstack / Vstack / Zstack to align as in the image below.
Any working code that could create the layout in the image below?
I would like the images rounded and slightly overlap like below.

Related

Content isn't horizontally aligned - Swift UI

I am new to Swift UI, and am working on my first app on XCode. I just finished creating my app, and when I tried it with different versions and screen sizes everything was out of line horizontally. In some cases, it was just not in the center and others it was off of the screen. I thought Swift UI was supposed to align everything automatically, and so I think I might have messed something up in a VStack.
I tried adding an wrapping the main VStack inside an HStack with an alignment guide of .center. I expected it to align the VStack (which all the content is in) to the center horizontally. It ended up changing nothing.

How to make independent listview in draggableScrollableSheet in flutter?

I want to make my comment section scrollable without it expanding into fullscreen. Currently, my comment section will expand to fill the screen when I try to scroll up to view more comments. Instead, I want to be able to scroll through the comments while also being able to view the image / video content; Similar to youtube's comment layout:

Flutter Staggered Grid View Pin tiles

I'm using a staggered grid (flutter staggered grid view package) to display notes. It all works fine but I can't find any information on pinning tiles, like 'google keep' notes.
The notes are stored in a database (sqlite) and it's no problem to add a column (pinned), but how do I tell the staggered grid view widget to keep pinned notes at the top and preferably separate from the other notes? ideally I would like to add the "pinned" and "others" text as well.
pinned note example
don't do it in just one staggeredGrid, make them 2 separated grids, once remove and add to different grids

Blur Background for iOS14 Widgets

I've created some iOS14 Widgets and set a Rectangle with a custom Image as Background for it.
It have a corner Radius and a padding to all sides.
The Result is a black Background behind my custom Background and I don't know how to make it blur like other Widgets (for example the Shortcuts Widget you see in the picture at the bottom).
Has anyone an idea what I can do?
Update:
Ok I figured out that you can change the background color in the Widget struct itself. A nice way is to set the colors you want in Assets Catalog from the Widget -> WidgetBackground and add the following code in the struct:
#main
struct CoreDataWidget: Widget {
let kind: String = "CoreDataWidget"
var body: some WidgetConfiguration {
StaticConfiguration(kind: kind, provider: HomeWidgetTimeline()) { entry in
HomeWidgetEntryView(entry: entry)
.background(Color("WidgetBackground")) // <- this line
}
.configurationDisplayName("OhMyMoney")
.description("You want to know your current Money and add Expenses quickly with one Touch? \nThen use this Widget!".localized())
.supportedFamilies([.systemSmall, .systemMedium, .systemLarge])
}
}
But is there a way to make the background transparent like the Shortcuts Widget from the picture above?
It's impossible :(
3rd Party Apps cannot use blurred backgrounds for their Widgets
https://developer.apple.com/forums/thread/655990

Android development view pager show on widget

I want shown view pager on widget.Previously i used android list at
widget but i want to show only single item on widget view this
is change on swipe. please help
You can use the AdapterViewFilper - Simple ViewAnimator that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip between each child at a regular interval. - Example
And you can use:
Starting with API level 11 (Android 3.0.x) you can use "android.widget.RemoteViewsService.RemoteViewsFactory" and and assign a widget to use (from docs):
ListView: A view that shows items in a vertically scrolling list. For an example, see the Gmail app widget.
GridView: A view that shows items in two-dimensional scrolling grid. For an example, see the Bookmarks app widget.
StackView: A stacked card view (kind of like a rolodex), where the user can flick the front card up/down to see the previous/next card, respectively. Examples include the YouTube and Books app widgets.
See http://developer.android.com/guide/topics/appwidgets/index.html section Using App Widgets with Collections.