Android View Set positionAndResizeView(View v, Rect rect)

Here you can find the source of positionAndResizeView(View v, Rect rect)

Description

position And Resize View

Declaration

public static void positionAndResizeView(View v, Rect rect) 

Method Source Code

//package com.java2s;

import android.graphics.Rect;
import android.view.View;

import android.widget.RelativeLayout;

public class Main {
    public static void positionAndResizeView(View v, Rect rect) {
        RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
                v.getLayoutParams().width, v.getLayoutParams().height);
        params.setMargins(rect.left, rect.top, 0, 0);
        v.setLayoutParams(params);//w w  w . j  a  va 2s . com
    }
}

Related

  1. doAfterLayout(final View view, final Runnable runnable)
  2. initializeDrawListener(View view)
  3. layoutViewAtPos(View view, int offsetX, int offsetY)
  4. makeMultiline(View view)
  5. measureExactly(View view, int width, int height)
  6. showCheatSheet(final View view)
  7. transparent(View view, boolean transparent)
  8. viewBaseSetting(View target)