Hey there I have been wanting to implement a layout that is responsive and scaleable. I have been looking into the Linear Layout with the layout_weight attribute but to no success.
Could you give me a hint or point me in the right direction as one would achieve a responsive layout similar to this one in the picture?
After some intense search I found this can be achieve by a couple of ways. Either by using GridLayout or GridView or by just manipulating LinearLayout with elements inside it.
Related
I'm generating Views inside FlexBox layout by pressing the Start button. As you can see every item on even line has random size. It works almost as it supposed to be but there is a problem, I need to get rid of vertical gaps between two vertically adjacent views. I've tried all properties of Flex Box Layout but didn't find one that can help to solve my problem. I will be happy if you help me to solve this problem.
I've solved this problem. If you have the same task you should use Relative Layout and its' flags inside your android code. It'll give you all control under the positions of Views. If it will be necessary I can expand this answer to provide more detail.
How to use both vertical and horizontal ScrollView in Xamarin iOS ?
I am using CollectionView but with it I only get one scrollview working at a time.
It's because it's nature of collection view, you can make it scroll in one direction at a time i.e. either horizontal or vertical. What you exactly want to achieve that you have not mentioned. if you are going to use collection view inside the scroll view, you have to manage it properly.
The best solution would be use a UICollectionView for the horizontal
scroll and the UITableView for the vertical scroll.
But if you want to make it work only using UICollectionView you have to use Subclassing UICollectionViewLayout.
here is link you can refer to make it work, hope this might help you:
1.https://www.brightec.co.uk/ideas/uicollectionview-using-horizontal-and-vertical-scrolling-sticky-rows-and-columns
2.Subclassing UICollectionView
3.UICollectionView scrolling in both directions
While running the application the design layout is not same as in the preview as all the widgets are overlapping at the top-left corner no matter where I place them.
Can we see your code please.
Perhaps you're using a Relativelayout without specifying the position with its attribute.
can you provide you xml code.
and in my case i faced the same issue. when i using the relative layout. just use linear layout and check it again...
I am programming a SAPUI5 application and I would like achieve a vertical menu seemed IconTabBar. IconTabBar only allows me horizontal configuration.
Can I simulate that behavior with another components?
I was trying to create a "different" IconTabBar that only has one IconTabFilter as an aggregation and add it in a Vertical layout but it isn't work.
Short answer, No.
There is no out-of-box solution for your requirement. The IconTabBar is only available in the horizontal orientation and there isn't a provision (atleast not yet) to change it to vertical.
PS: If there is something that you have tried in particular, post code snippets to help others analyze better.
greetngs, i am trying to learn Java and Swing by writing a simple game of connect4.
i am hoping you could guide me regarding the following issue:
to emulate the connect4 grid should i use a JTable or rely on Grid layout?
thank you.
I think Grid layout would be better
alt text http://stevemcc.com/wp-content/uploads/2008/12/connect4.png
An example of grid layout: http://leepoint.net/notes-java/GUI/layouts/30gridlayout.html
You can use a JLabel to add the images.
You can create an array of JLabels and add each one to one cell of the panel. If you need to modify the picture you just modify the Jlabel picture.