Can we open Sliding drawer from somewhere middle on the screen? - android

I want sliding drawer to open from middle of the screen, not from the left, right, top or bottom of the screen as it does normally .
Is it possible?
How can I do it ?
Any suggestion would be much appreciated.

Finally i have solved my problem. Solution is- take parent layout Relative Layout . In Sliding Drawer put
android:layout_above="#+id/your_below_layout .
My problem was, i was using Linear Layout.
Thanks

Related

Android swipe right to left to expand fragment

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.

Layout over layout that can move

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.

How to create floating menu which effect from left to right

Am developing android application which contains floating menu effect from left to right. I have one linear layout when i click any button on some other layout i need to call this linear layout with effect from left to right.
Please help me thanks in advance..
just refer the quick menu concept.
http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
It may be helps You Floating Menu

Android - SlidingDrawer handle at the right top corner

I am working with the android Sliding Drawer and have it working more or less. However, I am running into one problem.
I want it to slide from the right to left which works fine (set orientation to horizontal). However, the handle for the sliding drawer is at the center right of the screen. Is there anyway I can position it at the top right hand corner of the screen? Perhaps with a padding fo 20dp at the top?
There is a SlidingDrawer 'android:topOffset' property. However, this does not seem to do anything irrespective of whether I put the property on the slidingDrawer tag itself or on the handle (ImageView) tag.
Any advice or suggestions would be greatly appreciated.

How to do Android - Sliding Drawer to slide from Left-to-Right..?

How to put android sliding Drawer to slide from LTR?
When using android:orientation="horizontal" it slide from RTL.
How can I do LTR?
Thanks
................................
I found answer form Here
Thanks everybody
You will need to implement your own SlidingDrawer.
There is no simple way to let it slide from the left like by changing some settings.
Check out these links:Panel and android-sliding-drawer.
Try next widget
https://github.com/xPutnikx/SlidingDrawerWithButtons
make it left to right, or another directions.

Categories

Resources