For anything below Honeycomb (API Level 11) you’ll have to use setLayoutParams(...)
.
If you can limit your support to Honeycomb and up you can use the setX(...)
, setY(...)
, setLeft(...)
, setTop(...)
, etc.
More Related Contents:
- Android layout with one side round [closed]
- Android: How do I prevent the soft keyboard from pushing my view up?
- Set the absolute position of a view
- Error referencing an inner class View in layout/main.xml
- Android Custom Layout – onDraw() never gets called
- Android: get height of a view before it´s drawn
- Android: why is there no maxHeight for a View?
- How to use view flipper with three layouts?
- What is the main purpose of setTag() getTag() methods of View?
- Lock screen orientation (Android) [duplicate]
- How to make a smooth image rotation in Android?
- Android – get children inside a View?
- Measuring text height to be drawn on Canvas ( Android )
- What’s the difference between fill_parent and wrap_content?
- Is there a way to programmatically scroll a scroll view to a specific edit text?
- How to change line color in EditText
- Android: Detect softkeyboard open
- Change the text color of a single ClickableSpan when pressed without affecting other ClickableSpans in the same TextView
- Change shape solid color at runtime inside Drawable xml used as background
- Getting the pixel color value of a point on an Android View that includes a Bitmap-backed Canvas
- “Canvas: trying to draw too large bitmap” when Android N Display Size set larger than Small
- Android: How to make all elements inside LinearLayout same size?
- Android — How to position View off-screen?
- Call to `getDrawingCache` returns null when scroll is enabled
- What is the correct way to specify dimensions in DIP from Java code?
- Modifying the Android seekbar widget to operate vertically
- how to get a view from an event coordinates in android?
- Android layouts for different screen sizes
- Android ImageView size not scaling with source image
- getWidth and getHeight are returning a zero