I want to make image sticky in Android Xamarin layout for native App.I am using axml for layout rendering [closed] - android-layout

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I want to make the image sticky in the layout right end corner in axml.

EDIT
I Realize now OP needs Xamarin Android. This was written for Xamarin Forms. :)
Check this question as this is a possible duplicate:
Set the absolute position of a view
--
Try an absolute layout.
<AbsoluteLayout>
<!--If You have other content, like a stacklayout, put it before the image (like below)-->
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1">
<!--Content Here -->
</StackLayout
<Image Source="YOUR IMAGE SOURCE" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="1,1,0.2,0.2" />
</AbsoluteLayout>
Let me explain how absolute layout kinda works.
So an absolute layout allows you to place things on top of each other (Or just set a static position).
Absolute Layout Bounds work as follows:
(position X start, position Y start, Width, Height).
So by typing (0,0,1,1), I'm telling it to start at 0,0, and the width and height should be the same size as the window. If I were to do (0.5, 0.5, 0.2, 0.2), then I'd be telling it to start half way down and half way from the left, and make the object 0.2 of the total window size.
Ref Documentation:
https://developer.xamarin.com/guides/xamarin-forms/user-interface/layouts/absolute-layout/
Hope this helps

Related

how to implement quest pointer guide in godot 3? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last year.
The community is reviewing whether to reopen this question as of last year.
Improve this question
I am making a 2d platformer.(using gdscript)
I have been trying to make a guide arrow that shows you where to go and have been failing. I far as I can see there is no godot tutorial for this yet.
I have however managed to find a unity tutorial but have been having a hard time converting the instructions to godot.
https://youtu.be/dHzeHh-3bp4
Thanks in advance :)
I'll assume the indicator is a Sprite with whatever icon you want to show.
By the way, you are going to need a reference to the Camera2D. Unlike in 3D where you can ask Godot for the current Camera, you will have to handle references to the current Camera2D yourself.
I'll assume you already have the reference to the Camera2D (perhaps you have the code in the Camera2D script) and the reference to the indicator Sprite (which is another possible place to have the code).
I'll also assume you don't have a rotated Camera2D.
First we need the center of the screen:
var center := camera.get_camera_screen_center()
Then we can get the vector to the position we want:
var vec := target - center
Where target is the position in global coordinates you want to point to. By the way, if vec is Vector2.ZERO, then the target at the center of the screen.
Let us clamp it by the size of the Viewport. We are going to use half the size since we are measuring from the center of the screen. I'll also add a margin, I'll come back to that, for now, assume margin = Vector2.ZERO.
var helf_size := (get_viewport().size - margin) * 0.5
var clamped_vec := Vector2 (
clamp(vec.x, -half_size.x, half_size.x),
clamp(vec.y, -half_size.y, half_size.x)
)
If those are equal, it means the target is on the screen (it didn't need to be clamped):
if clamped_vec == vec:
# target on screen
pass
else:
# target out of screen
pass
Now, to place the indicator we need two things: a rotation and a position, correct?
The rotation is easy. It is the angle of our vec:
sprite.global_rotation = vec.angle()
And for the position, well, it will be our clamped_vec except we need to place the indicator. So we need to add a... Margin! Aha! So, adjust the margin to the size of the indicator you have, and clampled_vec will give us the position, we just need to add center back:
sprite.global_position = clamped_vec + center
And that should do it.

Svelte + dynamic SVG (chessboard usecase) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have the following code inside Svelte REPL:
https://svelte.dev/repl/b96c96bb3a654f5a81813525d22a8820?version=3.29.0
There's a problem: the chessboard doesn't appear, or at a better case (without onMount) flashes while appearing, and then disappears...
What's wrong in this code and how to fix that ?
I think the problem for you is coming from how you're attempting to push cells to defs. When you replace defs.push(cells) on line 36 with defs = [...defs, cells] it allows the columns and rows to be created properly. Then for some reason you're setting xmlns through a variable... this is the main thing preventing anything from showing up. There is no reason to use a variable to set xmlns, pretty sure it's preventing the SVG from being created properly when done this way and you don't actually need xmlns for inline SVGs, so you can trash that and all works well as shown here.
However, unless you're planning on using the empty space inside the 1000 x 1000 SVG area then I'd advise you to cut it down to 800 x 800 so the squares fit into the overall dimensions better.

JFreeChart gridline? paint set [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I have this chart and I want the line at 0 to be WHITE instead of BLACK, but I'm not sure which property I have to change.
I've already tried:
((CategoryPlot) chart.getPlot()).getDomainAxis().setAxisLinePaint(Color.WHITE);
((CategoryPlot) chart.getPlot()).setDomainGridlinePaint(Color.WHITE);
((CategoryPlot) chart.getPlot()).setRangeGridlinePaint(Color.WHITE);
And none of them seem to be what I need. I also tried searching for a solution, but I'm not sure what this line is called exactly, so I don't really know what to search for. Can someone please tell me which property I need to set to WHITE?
The line drawn perpendicular to the range axis (y-axis) at the value zero is referred to in JFreeChart as the rangeZeroBaseline. The method you need is:
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/CategoryPlot.html#setRangeZeroBaselinePaint-java.awt.Paint-

Vim Color Scheme Problems on Ubuntu 11.04 [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
When I change my color scheme in command-line Vim on Ubuntu 11.04, stripes on the bottom and right of the terminal (xterm) refuse to change color. While I can select any color scheme that I like, the two bands of color will remain at the default set for my xterm profile. Here's a link to an image to illustrate what I describe; my best guess is that xterm is not playing well with fullscreen mode in Unity. Do you have any suggestions for things I should try in order to fix this?
Vim is applying its colors to individual character cells.
Your expanded xterm window's width and height are probably not divisible by the width and height of a single character cell.
With my own font settings, a cell is 7 px by 15 px.
My display is 1600px wide and 1200 px tall, a fullscreen xterm would cover the entire area but the available cells would only cover an area of 1594 px * 1200 px, leaving a tiny 4 px wide vertical band on the right and — luckily — fit the whole height.
I see one easy way to get rid of your "stripes": set the background color of xterm to the same color you use in your colorscheme or vice-versa.

Photoshop CS5 - making text have effect but with a transparent fill....totally stuck [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have been using Photoshop for about three weeks now, finding it very different to fireworks...
Im trying to make a cool effect on my site, I want to use JQuery to slide a background image behind some text, and the background show through the text. I need to text to be placed in a white box, with the text itself "punched" out, so you can literally see through it (but only the text, the white box will cover everything else). The text also needs an inner shadow effect...just no fill. I am having real problems finding this info, can anyone help?
Many thanks, Dan
Create your white background layer
Create your text layer with the font and size you want
Ctrl+Click the text icon in the Layers panel to select the outline of your text
Select your white background layer and press delete to cut the text shape from your background
Select your text layer and delete it
Apply your drop shadow or glow filters to your background layer
Save as a transparent PNG-24
Your question doesn't sound too clear but i think animating the opacity of either of text or background would help.check this

Resources