This may be a dumb question but could anyone please tell me what this slider (highlighted in yellow) called in Android? Is it a navigation bar?
I want to implement the same slider in my app, could anyone please let me know if there's any sample I can refer to?
Thanks.
As for the part you highlighted, it doesn't have any particular name, it's just some view with selector background.
As for the mechanism itself (pulling view to reveal another), it is SlidingDrawer. Note that it has been deprecated in API 17, probably this UI pattern is not encouraged anymore.
Related
i want to implement a kind of filter.
Therefore i need the following input possibility:
Does somebody know how this item is called?
And how can i implement it ?
Thanks
It's called a SeekBar. Just drag and drop it in the design view.
I wish to know if it is possible to do something. I know this is not the purpose of a drawer, but I have to use it something else than navigation in my case.
For example, it want to display some text, with drag and drop, the user can delete text or add new text with a button in it.
I can't display this text outside of this drawer because of UI.
I think it's not possible (I find nothing to do or talk about it on internet), if you can confirm this to me, it will be helpfull.
If you think it's possible, do you have any idea where to start ?
And, can I use a short video instead of an icon for an item ?
Thanks for your answer.
The DrawerLayout is just a different type of ViewGroup. You can place anything you want within it.
I have a need to create a circular dial/rotary style component for use in an application. It's essentially a circular menu that allows users to select from the items that are ringed around it, and then they can click the button in the center to activate the selected item. However, I've never created a custom UIView of this type, and don't really know where to begin. Can anyone give me any pointers as to how I would draw the view and then rotate it as the user drags their finger? I obviously know how to intercept touch events, etc. but I'm not sure how to actually go about manipulating the UI appropriately. Any tips or pointers would be great!
I don't know if you've already found a solution to this, but here is a nice overview of how to get started:
http://shahabhameed.blogspot.com/2011/05/custom-views-in-android.html
For you, I think you can extend an existing View, that View being the SeekBar. You can take the standard SeekBar and draw it in a circle.
Finally, here is a source code that does the rotation with a volume knob. It is its own project though, so you have to do some work to use it in your own app.
http://mindtherobot.com/blog/534/android-ui-making-an-analog-rotary-knob/
Good Luck!
I have a neat library to do this. It is extremely stable and well maintained. https://bitbucket.org/warwick/hgdialrepo
Heres a youtube demo: https://youtu.be/h_7VxrZ2W-g
This library comes with a demo app with source code and the demo app actually uses a dial as a menu, So I think this should be the perfect solution for you.
The New York Times Android application has something like a notification bar at the top.
I suspect this is an included layout with a text view. The thing is that they managed to drag that title down in order to present the top news.
Can anyone give any insight on how to replicate this?
Edit:
Yes the drawer was the solution to my problem nevertheless i needed one as New York time and the default SlidingDrawer are meant to only go bottom to top... so i looked over on St Google and got a nice Custom Componente Sliding Drawer, get some difficult to make it work as i need it but you can follow the case in Layout positioning problem with Custom SlidingDrawer
I think what you're looking for is a Sliding Drawer.
http://developer.android.com/reference/android/widget/SlidingDrawer.html
edit:
the link I post is good for the documentation, but might not give a full idea of what is actually happening. A good place to find an example might be here:
http://techdroid.kbeanie.com/2009/08/android-sliding-drawer-example.html
They have most likely just used a TextView as you said. Moving it down can be done in multiple ways. The simplest is just to have another view or view group in top of it and initially set its visibility to gone, and then to visible when you want to show it.
Sorry, i misunderstood what you meant. Since the top element was so small, i simply thought you meant you wanted to expose a element on top of the other element. Ill up vote the other answer since this is most likely what you are after :)
I am looking for a class that implement a horizontal slider bar like the one on the "lock" screen. In other words, user must slide the bar from left to right to run an activity. Thank you so much for your time.
Internally, Android uses a class called SlidingTab for this (the main lockscreen is in a file called LockScreen.java. As with all Android core code, it's Apache licensed. At the risk of sounding like a broken record here on SO, download the AOSP and read through the code whenever you have a "how did the Google folks do x?" type of question (or even when you don't; there's some good stuff in there).
Maybe a Seek Bar might help you towards a solution to your problem. If this works for you let me know, because i am interested in a solution to that as well. Thanks
The link is the developer document for that feature.
Here is an example that extends a horizontal ProgressBar so that the user can set the "progress" by sliding left/right. It's actually quite straight forward, it just overrides the onTouchEvent() method, does some minor mathematics and sets the progress value depending on the TouchEvent's X coordinate.