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
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android SlidingDrawer Questions & Answers:

See Code Examples for Android SlidingDrawer Methods: