Android SlidingDrawer - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SlidingDrawer class.

This code example shows how to use the following methods: getBottom, getLeft, getRight, getTop, animateClose
		if(mSDRect == null || mSlidingDrawer == null){
			return super.dispatchTouchEvent(ev);
		} 
		 
		//记录当前slidingdrawer位置 
		mSDRect.set(mSlidingDrawer.getLeft(), mSlidingDrawer.getTop(), mSlidingDrawer.getRight(), mSlidingDrawer.getBottom());
		//判断触碰点是否在slidingdrawer矩形框内,如果不是并且slidingdrawer打开,则把它关闭 
		if(!mSDRect.contains((int)ev.getX(), (int)ev.getY()) && mSlidingDrawer.isOpened()){
			Log.i("__Rainbow__", String.format("%d %d", (int)ev.getX(), (int)ev.getY()));
			Log.i("__Rainbow__", String.format("%d %d %d %d", mSDRect.left, mSDRect.right, mSDRect.top, mSDRect.bottom));
			 
			 
			mSlidingDrawer.animateClose();
			return true; 
		} 
		 
		return super.dispatchTouchEvent(ev);
	} 
	 
} 
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: animateClose, isOpened
		// save as preferred curriculum to open automatically later 
		Utils.setSetting(this, PREF_CURRICULUM_SETTING_KEY, file.getPath());
 
		webView.loadUrl("file://" + file.getPath());
 
		if (slider.isOpened()) {
			slider.animateClose();
		} 
	} 
 
	/** Initializes the curricula options available in the list. */ 
	private void initOptions() { 
		options = new Hashtable<String, String>();
		options.put(
				getString(R.string.informatics_bachelor),
				"http://www.in.tum.de/fuer-studierende-der-tum/bachelor-studiengaenge/informatik/studienplan/studienbeginn-ab-ws-20072008.html"); 
		options.put(
				getString(R.string.business_informatics_bachelor_0809),
				"http://www.in.tum.de/fuer-studierende-der-tum/bachelor-studiengaenge/wirtschaftsinformatik/studienplan/studienbeginn-ab-ws-20112012.html"); 
		options.put(
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: animateClose, isOpened
		// save as preferred curriculum to open automatically later 
		Utils.setSetting(this, PREF_CURRICULUM_SETTING_KEY, file.getPath());
 
		webView.loadUrl("file://" + file.getPath());
 
		if (slider.isOpened()) {
			slider.animateClose();
		} 
	} 
 
	/** Initializes the curricula options available in the list. */ 
	private void initOptions() { 
		options = new Hashtable<String, String>();
		options.put(
				getString(R.string.informatics_bachelor),
				"http://www.in.tum.de/fuer-studierende-der-tum/bachelor-studiengaenge/informatik/studienplan/studienbeginn-ab-ws-20072008.html"); 
		options.put(
				getString(R.string.business_informatics_bachelor_0809),
				"http://www.in.tum.de/fuer-studierende-der-tum/bachelor-studiengaenge/wirtschaftsinformatik/studienplan/studienbeginn-ab-ws-20112012.html"); 
		options.put(
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: open
						switch (status) {
						case CLOSED:
							slidingDrawer.close();
							break; 
						case OPENED:
							slidingDrawer.open();
							break; 
						} 
					}catch (Exception ignored){}
				} 
			}); 
		} 
 
	} 
} 
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: animateClose
 
	 
		BlueBallButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.BALL");
				startActivity(intent);
				finish();
 
			} 
		}); 
 
		 
		BitmapButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.BITMAP");
				startActivity(intent);
Full Snippet Info
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setOnTouchListener, setOnDrawerScrollListener
		buttonoffset = off;
		 
		drawerlength = height - buttonoffset;
 
		tpadDrawer
				.setOnDrawerScrollListener(new SlidingDrawer.OnDrawerScrollListener() {
 
					@Override 
					public void onScrollStarted() { 
 
						isScrolling = true;
 
					} 
 
					@Override 
					public void onScrollEnded() { 
 
						isScrolling = false;
					} 
				}); 

4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: animateClose
 
		 
		BitmapButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.BITMAP");
				startActivity(intent);
				finish();
 
			} 
		}); 
		 
		GlassCleanButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.GLASS");
				startActivity(intent);
				finish();
Full Snippet Info
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: animateClose
			} 
		}); 
		AudioButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.AUDIO");
				startActivity(intent);
				finish();
 
			} 
		}); 
		 
		TextureButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.TEXTURE");
				startActivity(intent);
				finish();
Full Snippet Info
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: animateClose
 
		// Open touchscreen activity 
		ComboButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.COMBO");
				startActivity(intent);
				finish();
 
			} 
		}); 
 
		// Open touchscreen activity 
		BlueBallButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.BALL");
				startActivity(intent);
Full Snippet Info
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: animateClose
			} 
		}); 
		BitmapButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.BITMAP");
				startActivity(intent);
				finish();
 
			} 
		}); 
		GlassCleanButton.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				myDrawer.animateClose();
				Intent intent = new Intent("nxr.tpaddemo.GLASS");
				startActivity(intent);
				finish();
			} 
Full Snippet Info
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Android SlidingDrawer Questions & Answers:

See Code Examples for Android SlidingDrawer Methods: