I'm writing an application with kivy that scans a network and based on results it generates bunch of widget like labels and buttons or maybe a layout like Gridview.
I'm trying to position them by pos or center_x and center_y attributes. I can position them perfectly on my laptop but when I try my tablet or other devices with different screen sizes everything goes wrong and all widgets change their position.
My question is:Is there a elegant way to position widgets and layouts that pertain their position on any screen size?
P.S:
it's not working even when i maximize the window.
You have many different options here like::
Query the Window size and position your widget relative to the window using percentages instead of absulute values.
Use specific layout that fits the positioning style you need for you widgets.
Recomended
Use pos_hint in combination with your layouts
specify the widget pos using kivy.metrics.dp which gives you device independent pixels or use metrics.sp/cm/mm/in/...
Related
I'm trying to make an editor using Konva.js.
In the editor I show a smaller draw area which becomes the final image. For this I'm using a group with a clipFunc. This gives a better UX since the transform controls of the transformer can be used "outside" of the canvas (visible part for the user) and allow the user to zoom and drag the draw area around (imagine a frame in Figma).
I want to implement object snapping based on this: https://konvajs.org/docs/sandbox/Objects_Snapping.html. (just edges and center for now) However I want it to be able to work when having multiple elements selected in my Transformer.
The strategy I'm using is basically calculating the snapping based on the .back element created by the transformer. When I know how much to snap I apply it to every node within the transformer.
However when doing it, the items starts jittering when moving the cursor close to the snapping lines.
My previous implementation was having the draw area fill the entire Stage, which I did manage to get working with the same strategy. (no jitter)
I don't really know what the issue is and I hope some of you guys can point me in the right direction.
I created a codepen to illustrate my issue: https://codesandbox.io/s/konva-transformer-snapping-1vwjc2?file=/src/index.ts
I want to draw graph in iOS native app (Making app using auto layout and Xcode 6.1)..after googling I found core plot lib for drawing graph.
I am struggling with this library to do make pie,bar,donut and line chart as I want.
I used the examples which are in 'examples' folder of this library.
How do I make graph to adjust when app is rotating and takes auto
layout constraints?
For bar/line chart-I don't get idea to make graph compact or make
scroll when there is large data to show on x or y axis?
For any chart- How do I show legends(title or explanation for
graph)?
How do I show values on bar/pie/line itself(Value on each
pie slice / every bar/ every line point)?
Can I set X and Y axis start and end point?
Please help if anybody have an idea? Thanks in advance.
The Plot Gallery example app demonstrates all of these things. You'll need to use the latest code from GitHub (release 1.5.1 doesn't have some of the newer features like auto layout; 1.6 will be out soon, but isn't quite ready yet).
The iOS version of the Plot Gallery uses a storyboard and auto layout to control the UI.
Set allowsUserInteraction to YES on the plot space to enable pinch zoom and scrolling behavior. You can disable pinch gestures and keep the scrolling behavior with the allowPinchScaling property on the hosting view.
Many of the Plot Gallery demos have legends. Look for CPTLegend in the code. Ask a more specific question if you need more help with this.
These are known as "data labels" in Core Plot. Many of the Plot Gallery demos have them. You can set a formatter and text style on the plot to turn them on, or use a plot delegate to have more control over each label.
Set the xRange and/or yRange of the plot space associated with the axes to control the coordinate space of the plot area.
I am new to blackberry and i want to set one of my Field position to the left corner of screen & another field at right corner of screen at same level but i am unable to do it.how could it be possible?
I also don't want to give coordinate as a hard coded value but want to calculate using screen width & height cause i want to run same application on Torch I & Torch II model of blackberry.
Thanks in advance
Put AbsoulteFieldManager on screen and then you will have ability to set custom positions for your fields with add(field, x, y).
Take a look on this tutorial.
I have used the coin slider.But the coin slider is restricted by the width.I need to run my application in various screen size like 1280*768,800*600.is there any image slider in jquery without restrict width of image?Please help me.
Thanks in advance.
Most image sliders are designed for being placed within a container of a certain width, so that they fit within a specific slot in a layout. Given that the size of the screen/window(you don't specify) is irrelevant to that, it seems like what you're looking for is a gallery that adapts to the size of the entire window, rather than fit within a specific size.
You should probably widen your search to JS galleries in general, which might have that option or even function that way in the first place. As initial suggestions, have a look at the full-screen example for Galleria, or maybe the Supersized plugin
I have a problem when dealing with label component on AS3. The text was blurry on one application but not on the other. I have used the same code when dealing with the label component except the one with clear text used scaling to scale the label component and not being used on the other.
Is there because the scale that cause the problem?
Not sure if its scaling but it seems Z-Index causes the issue.
I fixed it by removing my x and z values (you may also consider removing y). In my case layout was relative with no layers, so these values were useless.