Questions tagged [absolutelayout]

Deprecated Android layout that lets you specify exact locations (x/y coordinates) of its children views.

166 questions
56
votes
7 answers

Stick Layout in Xamarin Forms to bottom

I'm making an application in Xamarin forms but I have some trouble sticking a layout to the bottom of the device. I thought an AbsoluteLayout would work, but I cannot grasp how it works. So I made a RelativeLayout which I filled with the elements I…
Kuubs
  • 1,300
  • 1
  • 14
  • 42
23
votes
5 answers

Android: Change absolute position of a view programmatically

If you use an AbsoluteLayout (I know that it is deprecated, but it was the only way to solve my problem) you can give the childViews the tag android:layout_x and android:layout_y to set their absolute position within the AbsoluteLayout. However I…
Pascal Klein
  • 23,665
  • 24
  • 82
  • 119
17
votes
2 answers

Xamarin.Forms - how to absolutely center an element on the page?

I have a login page using a StackLayout for the content (username, password, login button). After the user clicks the login button, I want a "loading" block set in the absolute center of the page, on top of the existing StackLayout content. For some…
jbyrd
  • 5,287
  • 7
  • 52
  • 86
13
votes
6 answers

Xamarin Forms - AbsoluteLayout - How does works positions

I'm working with Xamarin.Forms with AbsoluteLayout, however, I'm not sure to understand how to works the positionning of elements. I'm working with Proportional Values so if I'm placing an element at AbsoluteLayout.LayoutBounds="1, 0.05, 0.15, 0.1"…
Emixam23
  • 3,854
  • 8
  • 50
  • 107
10
votes
4 answers

Changing position of a button

I have one button in an AbsoluteLayout in an XML file. From there I am able to set the (x,y) position of the button. How can I get and set the (x,y) coordinates of the button programmatically? Thanks all.
Vishal Arora
  • 543
  • 3
  • 8
  • 19
8
votes
3 answers

Different Layouts For Different Screen Sizes On Android?

So I made an app using in Eclipse using the Graphical Editor, AbsoluteLayout, fixed pixel values, etc... just bad practice in general. It defaulted to a 3.7in screen. Is there any way to design a separate layout for each screen size and have the…
Cistoran
  • 1,587
  • 15
  • 36
  • 54
8
votes
2 answers

non resizable window border and positioning

If i create non-resizable JFrames, and windows Aero is enabled setLocation does not seem to take account of the window border correctly. In the following code I would expect the second frame to be positioned to the right of the first frame, instead…
msam
  • 4,259
  • 3
  • 19
  • 32
7
votes
1 answer

why absolutelayout is deprecated?

why absolutelayout is deprecated? I know that it may cause problems in supporting multiple screens but was better for showing view at particular position.
Dhruv
  • 1,129
  • 2
  • 13
  • 32
5
votes
2 answers

How to remove Children from an AbsoluteLayout in Xamarin.Forms?

In my app I use a Xamarin.Forms AbsoluteLayout. I have a custom menu bar. When I clicked on a menu button, the main content (a View) of my AbsoluteLayout is supposed to be replaced. So far I can only achieve that by adding a new child and setting…
kaolick
  • 4,817
  • 5
  • 42
  • 53
5
votes
2 answers

How can we use a variable in R.id

The content of xml are
Marc Quebrar Tan
  • 497
  • 2
  • 6
  • 19
4
votes
3 answers

Android: how to change layout_x, layout_y in an AbsoluteLayout dynamically?

I have a fixed background-image and showing another image on top of it. Here is the xml-
Avisek Chakraborty
  • 8,229
  • 10
  • 48
  • 76
3
votes
1 answer

How to move a button programmatically in an absolute layout

i make a test application in eclipse with adt plugin. I want when a button is clicked to move it in a random position in the screen, i found some example around the internet by nothing works Button noBtn = (Button)…
ddarellis
  • 3,912
  • 3
  • 25
  • 53
3
votes
1 answer

java jbutton image png clickable area

I want to do a JButton with PNG icon but the clickable area have to be a pixel and not a transparency pixel, and position this JButton over other JButtons like position absolute in css. thanks in advance
Jean Michael
  • 117
  • 1
  • 2
  • 7
3
votes
0 answers

Scaling layout with invariant aspect ratio in Android

I want to create a GUI for my app which is essentially a background image with some controls on top of it. The important (and tricky) part is that the background image should keep its aspect ratio and scale (with black borders if it's not a perfect…
David
  • 31
  • 4
3
votes
1 answer

AbsoluteLayout - Measure Label Height without placing label on UI

I am manually positioning labels in an AbsoluteLayout. To do this correctly I would like to know the label height prior to placing it on the UI. I have found this solution, but not without actually placing a label: public double…
Sjors Miltenburg
  • 2,540
  • 4
  • 33
  • 60
1
2 3
11 12