Recently I am writing a small application of Baidu map. After all, the screen is so big that it is hard to see how many buttons should be placed on it. Baidu once found that the slide menu is quite good, but Baidu map is sliding by hand. Your sister, these two items are still in conflict. I bought a table last year. As a result, I thought of the push-up menu, and I couldn't use a sliding screen for processing. So I should use a button to stimulate the push-up event. I am a newbie, and I don't know what JB is. I asked the experts in the group to say that I had to use Pan animation. I went to Baidu for half a day and saw that TM was too tall to be used. I accidentally found it in a piece of code.
LinearLayout. LayoutParams lp = new LinearLayout. LayoutParams (LinearLayout. LayoutParams. MATCH_PARENT, LinearLayout. LayoutParams. MATCH_PARENT );
Lp. setMargins (0, 0, 0, 0 );
Menu. setLayoutParams (lp );
After studying this stuff for a while, I finally realized my needs. If I don't talk much about it, I just put the code into my own small breakthrough and put it in my blog to record it.
First, create a layout file, which contains two Linealayout, that is, the main view and menu view used above.
Next we will start to implement the function.
I don't know how many people use this method. I did not implement this function after searching for the Internet for more than half a day. I personally think This is the simplest and easiest way to push menus.