¡@

Home 

2014/10/16 ¤W¤È 08:23:01

android Programming Glossary: rootheight

Quick dialog using onclick search view in android

http://stackoverflow.com/questions/12351670/quick-dialog-using-onclick-search-view-in-android

LayoutParams.WRAP_CONTENT mRootView.measure LayoutParams.WRAP_CONTENT LayoutParams.WRAP_CONTENT int rootHeight mRootView.getMeasuredHeight if rootWidth 0 rootWidth mRootView.getMeasuredWidth int screenWidth mWindowManager.getDefaultDisplay.. dyTop anchorRect.top int dyBottom screenHeight anchorRect.bottom boolean onTop dyTop dyBottom true false if onTop if rootHeight dyTop yPos 15 LayoutParams l mScroller.getLayoutParams l.height dyTop anchor.getHeight else yPos anchorRect.top rootHeight.. dyTop yPos 15 LayoutParams l mScroller.getLayoutParams l.height dyTop anchor.getHeight else yPos anchorRect.top rootHeight else yPos anchorRect.bottom if rootHeight dyBottom LayoutParams l mScroller.getLayoutParams l.height dyBottom showArrow..

Custom Spinners/drop down menu

http://stackoverflow.com/questions/9833621/custom-spinners-drop-down-menu

MeasureSpec.makeMeasureSpec getScreenWidth MeasureSpec.EXACTLY ViewGroup.LayoutParams.WRAP_CONTENT int rootHeight contentView.getMeasuredHeight int offsetY getArrowOffsetY int dyTop anchorRect.top int dyBottom getScreenHeight anchorRect.bottom.. int dyBottom getScreenHeight anchorRect.bottom boolean onTop dyTop dyBottom int popupY onTop anchorRect.top rootHeight offsetY anchorRect.bottom offsetY setWidgetSpecs popupY onTop The layout file my_layout.xml is pretty simple xml version..