Android uses popupwindow to implement the page. Click the drop-down menu at the top to pop up
There are not many technical difficulties in realizing this function. It mainly uses the popupwindow method, and further deepens the use of popupwindow. Click to pop up a custom view. The view can be designed freely, and a listview can be placed in common use.
In the demo, I just click to show. I simply use the animation effect of fade in out, and there are no exquisite picture resources. It looks ugly. However, in such a short time, you can master a good technology and expand it yourself. Isn't it very good?
No more nonsense, just go to the code:
MainActivity.java
activity_ main.xml
Custom view XML
Animation effect:
Inputdown.xml enters the screen
outdowntoup.xml
styles.xml
Effect achieved:
The above is all the contents of the pop-up drop-down menu at the top of the page by using popupwindow for Android. I hope you like it.