i want to bring a widget to left,right,top,bottom of other widget !!
in Android we can use RelativeLayout , LinearLayout or ConstraintLayout ...
but in flutter how can i do it ?!
Thanks
Depending on the situation, several solutions are possible, but most of the time, you'll be able to get away with it by simply wrapping both widgets in a Row or a Column.
Related
I have been reading ListView is Scrollable and ScrollView is scrollable and you don't really want to put them together. Also, ListView is legacy (which I think means deprecated) in Android Studio 4. I am a complete newb so if I ask this question wrong, it's because I don't yet have enough knowledge to ask the right question.
I would like to do a list of contacts that is scrollable so I would think I want a ScrollView + some kind of list but that piece I am not sure of. What should I combine ScrollView with? Or is this the wrong question? My end goal is a simple scrollable list of contacts and a user can choose a single contact.
You can try to use RecyclerView. I think this is the best option when You load many items, in Your example contacts. RecyclerView is faster than a simple scroll view, it looks better, and has many many customization options. Useful docs:
Create a List with RecyclerView
RecyclerView
Good video explanation with an example:
If You use Java
If You use Kotlin
MotionLayout Extends ConstraintLayout and have all its feature while we can move a widget on click in Motionlaout scene and we can also move a widget via our old Animation. I just want to ask which one is better and which one to use and what is the difference.
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
I've got an layout which i really would like to use but I'm not sure it´s even possible!
I have tried FadingActionbar from github which works when I have a scrollview for content, but when I change to an ViewPager none of my fragments in it seems to load, and I¨m not able to swipe either to the sides or swipe up the top image.
My viewpager will consist of 3 views. One is an scrollview, and 2 of them are listviews.
I hope you understand what I want to achieve :) When swiping up I want the imageview to slide in under the actionbar and then stop when the PagerSlidingTabs are just under the acitonbar.
Mockup of what the layout looks like
This is the related github issue
https://github.com/ManuelPeinado/FadingActionBar/issues/23
What i want in my activity is two buttons on the top in one single line.. and below that i want a framelayout in which i want an imageview and i wil add my custom view on the top of imageview. I tried a lot but i am having a lot of confusion.
Shown in the image below is somewhat like i want.
I want to use framelayout because i want to add my custom view over my imageview. But if i add button on framelayout it comes above the image. It is getting really confusing and messy for me.
I did'nt know that we could nest two layouts in a single activity. I nested LinearLayout with FrameLayout and my problem got solved.. Cheers!