I believe slidingmenu is no stranger. Many applications adopt this solution, such as Facebook, Renren, and everynote. Because the results are indeed quite novel, there are many implementations in development, and the solutions are also different. Among them, it is better to be an open source pipeline.
Maybe Google is also interested in the slidingmenu effect, so this new control navigation drawer was released at this Io conference. You can find this
"
android:layout_height= "Fill_parent"
android:background= "#00ffaa" >
Android:id= "@+id/button"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
android:text= "button"/>
Android:id= "@+id/edittext"
Android:layout_width= "Fill_parent"
android:layout_height= "Wrap_content"/>
2, the following is the interface after running the program
Another: You can add files to the drawable
Copy Code code as follows:
Summary:
1. Im
DrawerLayout that contains two subviews: FrameLayout, including the main content (filled with Fragment at runtime), and a navigation drawer of ListView.
1
This layout file demonstrates some important Layout features as follows:
The main content view (FrameLayout above) must be the first child view object of the DrawerLayout layout object, because the xml file means z sorting (that is, the upper and lower sorting of space, that is to say, the
the first child element of drawlayout, because the navigation drawer is above the main content view.
The main content view is set to match the width and height of the parent view, because it indicates that the navigation drawer of the entire interface is hidden.
The horizontal gravity and Android: layout_gravity attributes of the
1. Custom s0000ingdrawer drawer Effect
Effect 1
Effect 2
Effect 3
Androidmanifest. xml
Wrapsliding. xml
Slidingdrawerdemoactivity. Java
package com.cn.npass.nj;import android.app.Activity;import android.os.Bundle;public class SlidingDrawerDemoActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setCont
Material Design-compliant drawer navigation effect
Original link: Navigation Drawer styling according to Material Design
Translator: wly2014
Reviewer: chaossss
Status: Proofreading Complete
Objective:Now it seems that the drawer navigation has become one of the mainstream navigation modes. Despite all the criticism, I still
@ mu mu growth: Google recently updated its Google + apps, using new navigation methods and abandoning navigationdrawer. For a while, it has sparked a series of discussions about the pros and cons of Navigationdrawer.
Navigationdrawer also known as "Offcanvas", "Hamburgernavigation", "Sidenavigation", "Slidemenu" and so on, although the name is not the same, but is generally the same form of navigation.
Navigationdrawer's past and present life
According to the elegant, Navigatio
Research on the drawer effect of several github third-party libraries, drawer github
In the selection of the new version of the company's project, the drawer effects to be used in the leading flight were investigated. The main reason is that the ECS library used in the old project is not very good. Currently, we have conducted research on the third-party librarie
Panel is a very good drawer control, panel drawer Control
Panel is a good drawer Control
A very good drawer control panel, which can control the drawer size, pop-up size, drawer placement and many other attributes, can be flexib
IOS development drawer effect implementation, ios development drawer
The famous third-party class library in iOS is PPRevealSideViewController. When it comes to third-party class libraries, we naturally think of our CocoaPods. In today's blog, we use CocoaPods to introduce PPRevealSideViewController, and then use code and storyboard in our project to make drawer
savedinstancestate) {super.oncreate (Savedinstan Cestate); Setcontentview (R.layout.activity_main);Get a ActionBar ActionBar ab = Getactionbar (); Add a return icon to the left of the top left icon ab.setdisplayhomeasupenabled (true); You must ensure that the icon is ab.sethomebuttonenabled (true) as an action item by calling the Sethomebuttonenabled (True) method. Mdrawerlayout = (drawerlayout) Findviewbyid (r.id.drawer_layout); The layo
On the day of the 2013 Google Io, the Android team updated the support library and added the Navigationdrawer (navigation menu). 1. Create Drawerlayout Create Drawerlayout In the interface that needs the drawer menu, use DrawerLayout as the interface root control. In Drawerlayout, the first view is the main content of the current interface, and the second and third view are the contents of the
The use of ToolBar and DrawerLayout enables the opening and closing of the side bar drawer, toolbardrawerlayout
1. You can see the corresponding position represented by color attributes such as textColorPrimary, colorPrimary, colorPrimaryDark, and navigationBarColor, as shown in figure
2. the specific attributes are in the res style. xml, for example, in Android. in Manifest, you need to change theme to
Use DrawerLayout to implement simple drawer effects.
Preface: This article is the most basic use of DrawerLayout to achieve the drawer effect. I also try to streamline the code to be the most efficient, and I will post other complicated functions later.
First look
The text in the title bar will display different styles Based on the selected item.
Directly add the code.
The following is the activity_main co
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.