1. Introduction
Anyone who has used the Netease news client will find that when Netease news slides to the left, the navigation bar on the left will be dragged out, and the news content list will be pulled to the rightmost. It's like pulling a drawer out. Cool. In addition to Netease news, many applications now adopt such interactions.
If you are not familiar with Gesture Recognition, refer to the previous article: detailed use of iOS Gesture Recognit
Android 5.X Toolbar + DrawerLayout implement drawer menu
Preface
? A Toolbar added by android5.X, which is more flexible and controllable than ActionBar. Due to the poor flexibility of the previous ActionBar, google gradually uses Toolbar to replace ActionBar, so the Toolbar can also be called a super ActionBar.
This article does not detail the use (customization) of the ToolBar. It mainly introduces an example of the use of the Toolbar, that is, the
Navigationview is very important in MD design, before Google also proposed using Drawerlayout to implement the navigation drawer. This time, in the Android Design Support Library, Google provided the Navigationview to implement the navigation menu interface.This time we wrote the code in Android with Tablayout to achieve similar netease tab dynamic sliding effect this article code based on the revision, so it is better to first look at the above artic
Problem: The project is used to drawer controller Mmdrawercontroller, and the middle view is set to Tabbarcontroller. Now a tabbarcontroller on a sub-controller adds a Tablecontroller,cell to add the slide-slip removal, not the spirit.Reason: Drawer Mmdrawercontroller side-slip gestures conflict with cell delete slide-slip gestures.Solution:The drawer controller
1. IntroductionThe students who used NetEase news client will find that when NetEase news slides to the left, the left navigation bar will then be dragged out, and the news content list will be pulled to the far right. Like a drawer pulled out the same. Cool. In addition to NetEase news, many applications are now using this kind of interaction.For unfamiliar gesture recognition please refer to the previous article: detailed use of iOS gesture recognit
Slidingdrawer is a drawer-type component that, when the user chooses to open the drawer, gets some "assemblies" that can be used, so that when a single interface is placed on multiple components, using this component can be a good solution to the problem of tight layout space. The definition of the Slidingdrawer class is as follows:Ava.lang.Object ? Android.view.View ? Android.view.ViewGroup ? Android.
The drawer principle can be said to be the most simple and easy to understand in combinatorial mathematics of a principle, its simplest and most primitive form of expression: for n book in n-1 drawer, ensure that every drawer must have a book, there must be a drawer of 2 books. However, this simple principle in many pr
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
1. Understanding of Inline-block and floatInline-block and float can implement block-level labels on the same line, the inline is not good to set left-right alignment, only through the margin and padding adjustment. Float can be set to align left and right.If the Inline-block element is on the leftmost side and the same row Folat element setting floats to the left, the Inline-block will be squeezed behind float because float itself is designed for text wrapping and does not overwrite the text. F
Click to praise the function analysisThe front desk passes over news id[new_id] and session[session within the user ID and user information] to the backstageIn the background news database users and news is many-to-many relationships, to see the third table of the content, interpretation of the user ID corresponding to the information there is no new_id, if there is remove[cancel like], otherwise add a point likeobj = News.objects.get (new_id=id) b = obj.favor.filter (uid=request.session[' uid '
Knowledge Points: Enterprise layout skills, how to efficiently write CSS style, common selectors, basic tags, dynamic layout, box model, jquery class library calls, JS special effects, JS programming thinking.
A small partner who is interested in the front end or is learning the front end of the Web can come to the front-end group: 189394454, daily dry sharing.HTML code:
**CSS Code: * * **javascript代码:** Web front-end small white case, love fresh
Assuming the 3-bit decimal number, at present, I understand the drawer is 1001 such a 3-digit number inside must have two equal, this must be true, but, so far, all the programs, I have to deal with the following way:
for (I=1; i
Topic Background:
This is obviously not true, in this procedure, it is determined that the first value will be repeated, which is feasible in most cases, but is wrong, the following design use case has a problem:
The cor
Sometimes we want to display another layout on one page, but we do not need to occupy too much layout space. In this case, we can consider using drawer layout. This term can be used to make full use of our imagination, I believe that you will be able to understand this method through the introduction below.
Now, let's go directly to a simple small project.
1. First, create a main activity.
Package COM. jindegege. activity; import COM. jindegege. servi
Today, the drawer effect is achieved on the mobile phone. It is actually very simple, but the effect is very cool.
First, set the XML layout file under layout.
Slidingdrawer is an important drawer control, handle is the drag button of the drawer, and content is the content in the drawer.
Then create the chouti
First section:Precautions* The main view must be the first child of the drawerlayout.* Main view width and height match parent views, because when you display the master, you want to fill the entire screen, the user experience is higher* The Android:layout_gravity property of the specified drawer view must be displayedFirst:android:layout_gravity= "Start", left-to-right slide-out menuSecond:android:layout_gravity= "End", right--left slide menuLeft,rig
Tags: any class comment import userinfo own key info smartBasic:models.py################################### #以下都是抽屉的代码 #################################### from django.db import models # Records the number of user registrations class sendmsg (models. Model): Nid = Models. Autofield (primary_key=true) # Custom ID named Nid, the default ID name is ID "fixed format" email = models. Charfield (max_length=32, unique=true) code = models. Charfield (max_length=6) CTime = models. Datetimefield () times
Final Effect Diagram:
Mainstoryboard schematic:
BeyondViewController.h
//BeyondViewController.h
//19_ Drawer Effect _ imitation netease////
Created by Beyond on 14-8-1.
Copyright (c) 2014 Com.beyond. All rights reserved.
#import
Beyondviewcontroller.m
BEYONDVIEWCONTROLLER.M//19_ Drawer Effect _ imitation netease////Created by Beyond on 14-8-1. Copyright (c) 2014 Com.beyond.
All ri
Slidingdrawer (sliding drawer) hides the contents of the screen and allows the user to drag a handle to show hidden content. The slidingdrawer can be used vertically or horizontally. It consists of two sub-views: One is the user-dragged handle (handle) and the other is the content (contents) that changes with the drag. Slidingdrawer should be used as an overlay of the internal layout, meaning that the slidingdrawer should use Framelayout or relativela
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.