I am trying to get an effect that is similar to navigation drawer only the swipe would come from the top of the screen, much like the notifaction center in android:
this is what i need to do:
what i want is for a specific fragment to always be there and can be brougt to the view by pulling down, anyone knows how to do that?
Eventually mennaged to get this effect using this awsome and grate library!:
https://github.com/umano/AndroidSlidingUpPanel
Free to user and amasingly effective.
Related
I want to make a tab host in such a way that if I swipe left inside the tab host, a new tab will appear from the right and pushes the rest towards the left. I want the new tab that would appear will be able to position itself properly. I want smooth transition effect in swiping, so can anyone give me idea on how to achieve this effect? any sample codes? or any useful links containing tutorials? I googled this up and sadly no result showing what I want.
One way that I could think of is applying a scroll view there that could only be scrolled horizontally. But one problem I am worrying is the automatic positioning of the item. How can I achieve that?
Please help. Many Thanks!
it seems that you are looking for ViewPager and PagTabStrip Example.
google out on both topic and you will definitely find your ans.
In android, i want to move from current to previous activity by left to right swipe as in iOS. I want to be able to even hold while swiping such as both activities are visible at the same time.
I want to introduce transition/animation effect just like in Telegram app. So please help how can i do it.
Tutorials or example code will work for me.
Thanks in advance!
You better use the Swipe animation with multiple Fragments inside one Activity: Creating Swipe Views with Tabs
take a look at this tutorial : HOW TO IMPLEMENT HORIZONTAL VIEW SWIPING WITH TABS
If you're already using Google's NavComponent library, you should try a library that I wrote:
https://github.com/massivemadness/Fragula
It's fully integrated with NavComponent, which means the navigation API stays the same, you only need to make some changes in NavGraph and NavHost container.
Here's the result:
I've been using the SWReveal View Controller as the basis for my app in iOS, and I want to find an analog in Android. I'm hoping to keep the same drawer effect going left and right as appears in John LLuch's SWRevealViewController https://www.cocoacontrols.com/controls/swrevealviewcontroller.
I know you can use a navigation drawers controller to show the left, but that is a pop over. It's not like moving the center screen over to the right. I am also aware of there being the Fixed tabs controller, but those do not allow the center screen to be shown on top either. I am hoping somebody has mimicked a controller in android that allows you to move the three screens as if you were paging between them and still show your center screen at all times.
Please let me know if you guys know of one or know how to make the fixed tabs controller do this.
Google has a navigationDrawer that looks similar to the SWRevealController. However in all our projects we use https://github.com/adamrocker/simple-side-drawer/tree/master/SimpleSideDrawer as it seems easier to get used to it.
It is not exactly the same but you will get same results. We always make a Base Activity that all the menu activities extends in order to get the actions of the menu.
It is as having a FragmentActivity and on the onCreate method add these:
mNav = new SimpleSideDrawer(this);
mNav.setLeftBehindContentView(R.layout.menu_left);
mNav.setRightBehindContentView(R.layout.menu_right);
I hope that helps!
The idea I'm having is having a view that can be pulled down on top of the current view, with similar animation features like the one you can pull down from the top all the time, on Android Devices.
Here's an illustration:
The idea is to grab it and being able to pull it down on top of the other view, and then being able to interact with that view. To slide it up again, you should grab the bottom of the view (the grey area in the illustration) again, and then pull it up.
I haven't even worked with animations before but I found a lot of topics on that, while searching for solutions to my problem, including this: Slide down view in android
but my impression is that, that is about making animations when the user isn't touching the phone.
What is the best way to do this?
Is there a better way to do something very similar?
EDIT:
Here's the topic that made me find the solution: How to make an Android SlidingDrawer slide out from the left?
And here's the solution I used:
SlidingDrawer Top-to-Bottom
You could use a SlidingDrawer, this is a built in component into Android, but as far as I know it slides only from bottom - up.
If you a comfortable to modify your app design, then this could be an option for you.
However, on internet are some libraries of custom SlidingDrawer that lets you put the marker on any side of your screen, so you can drag it top-down, left-right, right-left.. any way you want.
Useful links:
How to make an Android SlidingDrawer slide out from the left?
SlidingDrawer Top-to-Bottom
I'm apparently not phrasing it correctly to get any accurate results on Google. I want to be able to slide right/left to go to another layout. What is the proper term I should be using when trying to find an example of how this is done?
You are looking for the ViewPager.