I need to design layout like image below and also I want such that when I press the button which is on top of image to slide up this layout having images.
You can achieve this by implementing bottom sheets.
I am giving you a perfect link for all types of bottom sheet examples, follow it you'll get the result.
Bottom Sheets
Related
I've researched a lot of examples with bottom sheet, but didn't find the answer. Do we have any option to open at the same time more than one bottom sheet? For example I need to overlay one bottom sheet of another(smth like onFragmentResult)
Hi guys I am an android beginner. I want to make an fragment at the right edge of the main layout and it could be expanded/collapsed by swiping from right to left/left to right (please watch sort video below).
https://youtube.com/shorts/HKOvfDVS03M?feature=share
My problem is I could not know how I can start implementing since I'm new to android. Please help to give a sample code. Thank you
You can achieve the same using navigation drawer. Navigation drawer is menu or layout which slides from edges of the screen. As you are a beginner you need to learn the concepts first. So, try to learn navigation drawer first. As per suggestion you can watch below video.
Navigation drawer
As you complete the video you will know what navigation drawer is and how to implement it. Now, as you mentioned in your video it's a calculator. So, drawer is given specific height and width as well as it is placed below the calculating screen. SO, I assume that you know basics.
Using relative layout and it's property You can use
...
android:layout_below = "calculating_screen"
...
This will place your drawer below the screen and you can specify `android:layout_height =match_parent" in your drawer file to cover the remaining screen. And then after specifying width you just need to adjust the gravity. you just need to change the gravity line.
...
GravityCompat.END
...
from
...
GravityCompat.START
...
GravityCompat.START allows drawer to expand from left-right. If you want right-left then use GravityCompat.END.
I am new to android i want to design a layout for my that is slide a hidden layout from the bottom of screen to middle screen in android.How can i achieve it please helpme out.Bellow is my sample screen
You can use this library.
Bottom Sheet
I'm making use of Siyamed's menu item in my app.. I would like to place the menu item in the bottom center of the screen.. and when I click on it, the child items should surround the center icon. Any ideas on how to start?
I recommend you tried another implementation: ArcMenu by daCapricorn.
As the author said on Google+:
If you want to put it align the screen bottom, you can set alignparentbottom="true" in xml and compute the marginBottom (it should be negative) programmatically.
PS: I personnality ended up using ArcMenu library rather than SatelliteMenu for the same issue.
I am writing an Android app but cannot figure out how to have a layout over another layout that can animate up and down to show and hide its contents, but have the bottom layout's imageview, shrink to fit the new area.
An example of what I am trying to do is in this iPhone app.
http://itunes.apple.com/gb/app/alex-ze-pirate-comic/id526432227?mt=8
Screenshots 2 & 4 show the states that I mean. When the top layout goes down to leave just the toolbar, the imageview gets taller to use the extra space provided.
Hope you understand me.
Thanks,
Ashley
The ImageView in this case will stay the same. Your second View will simply be covering it for some time. You can achieve this effect using a sliding drawer.