Questions tagged [absolutelayout]

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

166 questions
2
votes
1 answer

How to inflate new copies of an ImageView object on a layout?

What I am trying to do is create N (in this case 9) copies of the ImageView object R.id.tile, place each of them at different coordinates on the layout, and give each its own unique identifier. board_layout.xml:
2
votes
1 answer

location and size of jtextarea in jscrollpane is not set

I am working on the editor. I am using Java swing for it. I have embedded a JTextArea with JScrollPane. i want to position the jtextarea of particular size at the middle of JScrollPane. To do this I used setLocation function. But this is not…
Abhiram Behera
  • 69
  • 1
  • 10
2
votes
1 answer

positioning picture on GUI JFrame in java

I was wondering if there is a quick and easy way of trying to position an image at a particular position in GUI. In addition to this is it possible to put Jlables/Buttons on this picture. That picture should only form a section of the JFrame. I know…
Marcello
  • 423
  • 1
  • 5
  • 12
2
votes
1 answer

Getting data from JTextField that is one of several local variables

So I am reading a file and I get the amount of lines in that file. Based on that I generate my interface. Now I need to have the ability to edit valus trougth UI . Rows is the variable that has how lines the input document has . Of course the code…
user1633277
  • 510
  • 2
  • 7
  • 14
2
votes
1 answer

JScrollPane with JPanel inside doesn't show scroll bar when picture is bigger

I'm making an utility to define footholds in a map for my game and i am displaying the preview of the map inside a JPanel that's inside a JScrollPane. I would like to be able to scroll when the map is bigger than the JScrollPane. How should i do…
Nicolas Martel
  • 1,641
  • 3
  • 19
  • 34
2
votes
2 answers

How to absolutely position a JPanel over another JPanel with setLayout(null) and a background image?

I'm working with JFrames in Java, specifically with absolutely positioned elements that need to overlap. I understand that to overlay components, one should make a JPanel (with setOpacity(false);), and position it with either setBounds(x,y,x2,y2);…
Exac
  • 53
  • 1
  • 2
  • 7
1
vote
4 answers

Using scrollbars with absolute layout in Swing

I am not able to use scroll bars with absolute layout in Swing. I don't wish to use this layout but I have to display dynamic objects on my panel on click of a button and align them using setBounds which can be done using this layout only (I…
gursahib.singh.sahni
  • 1,559
  • 3
  • 26
  • 51
1
vote
1 answer

How to add a component into a JComponent with absolute positioning?

Here is my current settings: private JComponent upperContent = new GeneralContent(); private JComponent lowerContent = new GeneralContent(); // GeneralContent extends JComponent jframe.setLayout(new GridLayout(2, 0)); …
skystar7
  • 4,419
  • 11
  • 38
  • 41
1
vote
2 answers

Alternative to AbsoluteLayout

the question "What is a usefull alternative to AbsoluteLayout?" seems to be a question which is often asked, but never really answered. My situation is as follows: I want to position Circles (for the sake of simplicity i used RadioButtons for…
stefan
  • 10,215
  • 4
  • 49
  • 90
1
vote
1 answer

.NET Maui Code Stopping after Children.Remove()

I've run into a very odd problem with .NET Maui that has never happened to me with Xamarin before. On occasion, when I remove a child element from its parent, the rest of the code in the function fails to execute and there is no exception…
iPaul
  • 75
  • 1
  • 6
1
vote
1 answer

Xamarin.Forms: Layout Rectangles where X, Y, Width, Height are given by Data Binding

I want to draw some rectangles into an outer one. Coordinates (X, Y, Width, Height) and some more parameters like background colors are given by a View Model. The result should look like I tried AbsoluteLayout and CollectionView (see this post).…
1
vote
2 answers

How to Find Reference to Dynamically Added Xamarin.Forms Element

In Xamarin.Forms we want to add a new button using f001content = new Xamarin.Forms.AbsoluteLayout; f001content.Children.Add(new Button { Text = "Button", AutomationId = "MyButton", }, new…
1
vote
0 answers

How can I make a view constrained to 16:9 in Xamarin forms?

I need to make a view which matches the height of the device in landscape orientation but locks the aspect of the view to a 16:9 ratio. I assume I need to do this programmatically as I need to get the screen width/height. I cannot seem to get this…
Salbrox
  • 143
  • 1
  • 15
1
vote
0 answers

Xamarin.Forms iOS AbsoluteLayout child layout bounds not updated properly when adding the child view content as ScrollView

Description AbsoluteLayout child layout bounds not updated properly after translate y position when adding the child view content as ScrollView in Xamarin.Forms iOS. Code [XAML]
1
vote
1 answer

AbsoluteLayout.LayoutBounds doens´t work after I updated to Xamarin.Forms 5.0

After I updated to Xamarin.Forms 5.0 this line of code has been broken: 0.5,0.49,0.4,0.5 0.5,0.52,0.4,0.5
1 2
3
11 12