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); setContentView(R.layout.wrapsliding); }}
Wrapsli
Android development-slidingdrawer (1)
/*
* Android development-slidingdrawer
* Beijing Android Club group: 167839253
* Created on: 2012-7-26
* Author: blueeagle
* Email: liujiaxiang@gmail.com
*/Overview
To facilitate operations, aesthetics, and space saving, Android provides controls such as slidingdrawer. Slidingdrawer
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 o
Usually we need to display more information on the user's screen, but the user's screen size is limited. How can we use limited space to display more information? Android provides us with the SlidingDrawer class to help us easily achieve the desired effect. Such as moji recommendations in moji weather, 360 security guards are all reflected.
Next we will learn about the SlidingDrawer class to achieve the abo
Slidingdrawer effect must have been seen, it is the 1.5 simulator to enter the application list effect. Here's a screenshot.
First, IntroductionSlidingdrawer hides the content outside the screen and allows the user to handle to display hidden content. It can slide vertically or horizontally, it has two view components, one is the handle that can be dragged, and the other is the view of the hidden content. The controls inside it must be laid out and
Today I learned about the slidingdrawer control and completed a simple demo to share with you:1. Create two layout files under layout. The main layout file main. xml used in the current activity
Layout file grid. xml used in the adapter
2. The slidingdrawertestactivity. Java code of the current activity is as follows:Public class slidingdrawertestactivity extends activity {private gridview; private slidingdrawer
Transferred from: http://www.cnblogs.com/salam/archive/2010/10/19/1855511.htmlFirst, IntroductionSlidingdrawer hides content outside the screen and allows users to display hidden content through handle. It can slide vertically or horizontally, it has two view components, one is the handle that can be dragged, the other is the view of the hidden content. The controls inside it must be laid out, and handle and content must be specified in the layout file.For example, belowandroid:layout_height= "F
The Slidingdrawer effect must have been seen by everyone, and it is the effect of entering the application list on the 1.5 simulator. Below isFirst, IntroductionSlidingdrawer hides content outside the screen and allows users to display hidden content through handle. It can slide vertically or horizontally, it has two view components, one is the handle that can be dragged, the other is the view of the hidden content. The controls inside it must be laid
This figure can be in the Android doc, mistakenly operation, the original picture deleted, so the above is just an example, no transparency effect
Slidedrawer is a way to display multiple (two pages). As shown in the image on the left, normal, we display Hello's label, when we press the Slidingdrawer ImageView below, that is, the icon on the right, you can display the contents of slidedrawer, such as the figure. The
From: http://blog.csdn.net/you_and_me12/article/details/7327030
Slidingdrawer is not described if it is used in many ways.
If the property layout_height = "wrap_content" is set, the onmeasure () method in the original slidingdrawer makes layout_height always fill_parent, but layout_height = "fixed height" is also acceptable!
Rewrite slidingdrawer as follows (rig
Address: http://blog.csdn.net/you_and_me12/article/details/7327030
Slidingdrawer is not described if it is used in many ways.
If the property layout_height = "wrap_content" is set, the onmeasure () method in the original slidingdrawer makes layout_height always fill_parent, but layout_height = "fixed height" is also acceptable!
Rewrite slidingdrawer as follows (r
SlidingDrawer hides content outside the screen and allows users to display hidden content through handle. It can slide vertically or horizontally. It consists of two views. One is the handle that can be dragged, and the other is the View that hides the content. the controls in the layout must be set, and handle and content must be specified in the layout file.
1. layou file Layout
Copy codeThe Code is as follows: Android: layout_width = "match_parent"
Slidingdrawer hides the content outside the screen and allows the user to handle to display hidden content. It can slide vertically or horizontally, it has two view components, one is the handle that can be dragged, and the other is the view of the hidden content. The controls inside it must be laid out and the handle and content must be specified in the layout file.
1, Layout layou file
Copy Code code as follows:
Android:layout_width= "
The slidingdrawer class mainly includes two points:1: handle: click the button
2: content: the content in the drawer. When you click the button, the content of the drawer is hidden or displayed.
:
Mainactivity:
package com.cn.daming;import android.app.Activity;import android.content.res.Configuration;import android.os.Bundle;import android.view.View;import android.widget.GridView;import android.widget.ImageView;import android.widget.SlidingDrawer
View plaincopy to clipboardprint?
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/Android_Tutor/archive/2010/04/14/5486804.aspx
I recently studied lanucher, read the source code, and found the slidingdrawer class, which is also called the "drawer" class. It is easy to use, including handle, and content.
Handle is when you click it, the content is either drawer or close the drawer. The
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.
Android Drawer (slidingdrawer) Implementation of hair-red and black AllianceHttp://www.2cto.com/kf/201301/182507.htmlThe foundation of a dynamically-arranged Android drawerhttp://blog.csdn.net/hellogv/article/details/6789698Android Drawer Implementationhttp://blog.csdn.net/wangkuifeng0118/article/details/7229200Android uses animation effects after the control position is processed like a system notification bar under pull drawingHttp://www.pocketdigi.
From: http://blog.csdn.net/android_tutor/article/details/5486804
Recent studiesLanucher, Read the source code, and foundSlidingdrawerThis class is also called the "drawer" class. It is easy to use, includingHandle, AndContent.
HandleWhen you click it,ContentEither drawer or close drawer. The specific steps are as follows.
1. CreateAndroidProject, namedSlidingdrawer.
2. Prepare materials. Here my icons are usedLauncher2Put the icon inDrawable-hdpiThe folder directory structure is as follows:
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.