Available Methods
- LayoutParams ( )
- addView ( )
- removeView ( )
- getChildCount ( )
- getChildAt ( )
- getContext ( )
- MarginLayoutParams ( )
- findViewById ( )
- removeAllViews ( )
- getChildMeasureSpec ( )
- indexOfChild ( )
- getWidth ( )
- setVisibility ( )
- setClipToPadding ( )
- setFitsSystemWindows ( )
- removeViewAt ( )
- setBackgroundColor ( )
- getHeight ( )
- setPadding ( )
- setLayoutParams ( )
- getTop ( )
- getLayoutParams ( )
- setTag ( )
- setOnClickListener ( )
- findViewWithTag ( )
- getTag ( )
- setBackgroundResource ( )
- getMeasuredHeight ( )
- offsetDescendantRectToMyCoords ( )
- setClipChildren ( )
- getParent ( )
- getId ( )
- getPaddingTop ( )
- getBottom ( )
- post ( )
- removeAllViewsInLayout ( )
- getResources ( )
- getMeasuredWidth ( )
- requestFocus ( )
- requestLayout ( )
- bringToFront ( )
- getLeft ( )
- invalidate ( )
- getPaddingBottom ( )
- setEnabled ( )
- setLayoutTransition ( )
- OnHierarchyChangeListener ( )
- getViewTreeObserver ( )
- getVisibility ( )
- getPaddingRight ( )
- setOnHierarchyChangeListener ( )
- getBackground ( )
- layout ( )
- setOnTouchListener ( )
- getScrollY ( )
- measure ( )
- setId ( )
- setPaddingRelative ( )
- setDrawingCacheEnabled ( )
- setTranslationY ( )
- FOCUS_BLOCK_DESCENDANTS
- getRight ( )
- getPaddingLeft ( )
- getScrollX ( )
- setBackground ( )
- setPivotY ( )
- removeViewInLayout ( )
- equals ( )
- getSystemUiVisibility ( )
- removeViews ( )
- dispatchTouchEvent ( )
- addOnAttachStateChangeListener ( )
- postInvalidate ( )
- requestChildFocus ( )
- getWindowVisibility ( )
- getLocationOnScreen ( )
- setBottom ( )
- generateLayoutParams ( )
- isShown ( )
- isInLayout ( )
- getWindowId ( )
- getOverlay ( )
Related Classes
- android.os.Bundle
- android.content.Context
- android.view.View
- android.util.Log
- android.widget.TextView
- android.content.Intent
- android.app.Activity
- android.view.LayoutInflater
- android.os.Build
- android.widget.Toast
- android.widget.ImageView
- android.graphics.Color
- android.os.Handler
- android.net.Uri
- android.widget.Button
- android.graphics.Bitmap
- android.text.TextUtils
- android.view.MotionEvent
- android.graphics.drawable.Drawable
- android.widget.LinearLayout
- android.support.annotation.Nullable
- android.widget.EditText
- android.support.annotation.NonNull
- android.annotation.SuppressLint
- android.content.DialogInterface
Java Code Examples for android.view.ViewGroup#generateLayoutParams()
The following examples show how to use
android.view.ViewGroup#generateLayoutParams() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ViewTypeParser.java From proteus with Apache License 2.0 | 6 votes |
private ViewGroup.LayoutParams generateDefaultLayoutParams(@NonNull ViewGroup parent) { /** * This whole method is a hack! To generate layout params, since no other way exists. * Refer : http://stackoverflow.com/questions/7018267/generating-a-layoutparams-based-on-the-type-of-parent */ if (null == sParser) { synchronized (ViewTypeParser.class) { if (null == sParser) { initializeAttributeSet(parent); } } } return parent.generateLayoutParams(sParser); }
Example 2
Source File: FloatingActionButton.java From material with Apache License 2.0 | 5 votes |
/** * Show this button at the specific location. If this button isn't attached to any parent view yet, * it will be add to activity's root view. If not, it will just update the location. * @param parent The parent view. Should be {@link FrameLayout} or {@link RelativeLayout} * @param x The x value of anchor point. * @param y The y value of anchor point. * @param gravity The gravity apply with this button. * * @see Gravity */ public void show(ViewGroup parent, int x, int y, int gravity){ if(getParent() == null){ ViewGroup.LayoutParams params = parent.generateLayoutParams(null); params.width = mBackground.getIntrinsicWidth(); params.height = mBackground.getIntrinsicHeight(); updateParams(x, y, gravity, params); parent.addView(this, params); } else updateLocation(x, y, gravity); }