sliding layout like google maps v7 - android

Im trying to get the same result as new google maps, when you "tap" on any "marker" you get a little layout in bottom of the screen, all the info about the srteet view and other details shown there, when you hold and move your finger to top of the screen the layout moves and c over all screen or half of the screen. i was thinking use slidingDrawer but seems google depreceate this method on api 17. so how i can achieve this?
Im attaching the image of example:

you could look into using this SlidingUpPanel which appears to be exactly what you are looking for

Now from with Android Support Library 23.2 we can use Design Support Library: Bottom Sheets

Something that might be worth looking into is the answer to this question.
More specifically the answer that links here.
Basically the idea is that They realized that the sliding drawer left some things to be desired and they created a custom component with similar functionality. This will give you more freedom and a way around using deprecated classes. Let me know in comments if there's anything else that would be helpful to know.
Happy coding!

Related

Custom Android Bottom Menu Bar

I went through many questions regarding making bottom bar but my my question is a bit different.I want to make this.
bottom menu:
Now the thing is, the menu is not static.It's items can vary depending upon user's choice.So, I have to make it dynamic. What's the best approach to achieve this?
Also, I'm not sure how do I make that curved outline at the center item.I'm thinking that I should do it programmatically.Any suggestions are welcome.Even better if you can share code.
Use this to create Navigation bar, it will surly create view that you show us in image.
https://github.com/armcha/Space-Navigation-View
Bottom menu is now an official navigation view according to the official documentation but as far as I know, there is no native component available yet to implement that.
In my opinion, your best bet is to try customizing the following library created by Iiro Krankka (http://github.com/roughike):
BottomBar

Is there a library for Floating Action Buttons (FAB) with Labels?

Is there a library for creating Floating Action Buttons with labels (similar to the Evernote app)?
Evernote Screenshot
The popular libraries seem to be
https://github.com/futuresimple/android-floating-action-button (closest to what I want... ability to expand hide "sub" actions)
https://github.com/makovkastar/FloatingActionButton (Primary function is to hide/show with a scrollview, recyclerview, or listview)
https://github.com/oguzbilgener/CircularFloatingActionMenu (library which has been around pre-lollipop)
Neither of these, to my knowledge, have this capability. Before re-inventing the wheel, has somebody already done this?
This feature request ended up being implemented in https://github.com/futuresimple/android-floating-action-button. This includes labels on both the left and right sides.
If you're interested, see the discussion here: https://github.com/futuresimple/android-floating-action-button/issues/22#issuecomment-66155108
Disclaimer: I haven't used this (yet).
I'd recommend this library over others that I've seen.
Nowadays there are available techniques of manipulating behaviour of the view that enable you to program FloatinActionButton as you want and to have joy that you have made it by yourself!
Fade in/out FloatingActionButton while scrolling RecyclerView . DETAILS
Slide down/up , beside it blog says how to:
Expand floatingActionButton and show subFloatingButtons. DETAILS HERE
There is to much details, "how to do". Therefore I've attached just links to blogs. Anyway I encourage you guys to take a look at those blogs. You will have total control over your application. Currenty I use all solutions from both blog's. Enjoy!
Especially the last library you mentioned looks quite sophisticated. To my knowledge, you can set any kind of View you want to be shown as a Button.
This View could simply be a custom-view of yours that shows an image as well as a label.
In case anyone is still looking for this functionality: I made an Android library that has this ability and much more, called ExpandableFab (https://github.com/nambicompany/expandable-fab).
The Material Design spec refers to this functionality as 'Speed Dial' and ExpandableFab implements it along with many additional features.
Nearly everything is customizable (colors, text, size, placement, margins, animations and more) and optional (don't need an Overlay, or FabOptions, or Labels, or icons, etc). Every property can be accessed or set through XML layouts or programmatically - whatever you prefer.
Written 100% in Kotlin but comes with full JavaDoc and KDoc (published API is well documented). Also comes with an example app so you can see different use cases with 0 coding.
Github: https://github.com/nambicompany/expandable-fab
Library website (w/ links to full documentation): https://nambicompany.github.io/expandable-fab/

Swipe/drag Android view from the bottom of the screen

I want to do in my app a View that I can swipe from the bottom of the window (Images below explain it better).
I want the view to stop at certain point. The view must allow to swipe/drag it to the bottom again. Any idea or tip of how can I do that?
I think you are in search of a ViewDragHelper:
API doc:
https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper.html
How to use. This answer links to a sample project to show you how as well:
ViewDragHelper: how to use it?
Dragging best practices:
http://developer.android.com/training/gestures/scale.html
You can use the new material design pattern called Bottom Sheets.
They do the exact thing that you want. They also support custom layouts for the view.
Material Design - Component - Bottom Sheets

Sliding Drawer left to right and i want use all activities

I want to use sliding drawer from left to right ?
So can you tell me anybody how it is possible? and also use this drawer to all activity in my project.
Use the concept of viewpager.You can find doc and example below...
doc
Example
Check that library. API 6+ (even less, not quite sure)
https://github.com/6wunderkinder/android-sliding-layer-lib
You can attach a layer to any part of the screen with the addition that you can swipe the layout directly in and out, unlike the SlidingDrawer in which you just can drag from a small piece of UI (drawer).
You could also use the new NavigationDrawer pattern from Google.
http://developer.android.com/design/patterns/navigation-drawer.html

How to create an Google Currents like layout

Does anybody know how the article layout in the Google Currents Android app is built? I'd like to use some very similar layout for my app.
Example:
The first thing which came to my mind was to build up an the layout with a WebView with multicolumn stlye (http://www.w3.org/TR/css3-multicol/). Am I on the right way or is my suspicion completely wrong.
How do I get the page flip through the swipe/fling gesture and how to get the corresponding page indicator at the bottom?
Thanks in advance! :-)
You must use native views android and not webView because it is not efficient. But if you begun on Android you can actually use a webView is a good learning.
However, if you're interreses the layout android http://developer.android.com/ the website is a very good teaching technique. And what is the view of pourfaire text scroll from right to left, I encourage you to use the library ViewPagerIndicator.
I hope I have helped you!

Categories

Resources