Search in sources :

Example 61 with LayoutParams

use of android.view.ViewGroup.LayoutParams in project AndEngineAugmentedRealityExtension by nicolasgramlich.

the class BaseAugmentedRealityGameActivity method onCreate.

// ===========================================================
// Constructors
// ===========================================================
@Override
protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.mCameraPreviewSurfaceView = new CameraPreviewSurfaceView(this);
    this.addContentView(this.mCameraPreviewSurfaceView, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    //		this.mRenderSurfaceView.setZOrderMediaOverlay(true);
    this.mRenderSurfaceView.bringToFront();
}
Also used : LayoutParams(android.view.ViewGroup.LayoutParams)

Example 62 with LayoutParams

use of android.view.ViewGroup.LayoutParams in project Klyph by jonathangerbaud.

the class VideoAdapter method setLayoutParams.

@Override
public void setLayoutParams(View view) {
    LayoutParams lp = view.getLayoutParams();
    lp.height = columnWidth;
    view.setLayoutParams(lp);
}
Also used : LayoutParams(android.view.ViewGroup.LayoutParams)

Example 63 with LayoutParams

use of android.view.ViewGroup.LayoutParams in project GreenDroid by cyrilmottier.

the class QuickActionGrid method onMeasureAndLayout.

@Override
protected void onMeasureAndLayout(Rect anchorRect, View contentView) {
    contentView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    contentView.measure(MeasureSpec.makeMeasureSpec(getScreenWidth(), MeasureSpec.EXACTLY), LayoutParams.WRAP_CONTENT);
    int rootHeight = contentView.getMeasuredHeight();
    int offsetY = getArrowOffsetY();
    int dyTop = anchorRect.top;
    int dyBottom = getScreenHeight() - anchorRect.bottom;
    boolean onTop = (dyTop > dyBottom);
    int popupY = (onTop) ? anchorRect.top - rootHeight + offsetY : anchorRect.bottom - offsetY;
    setWidgetSpecs(popupY, onTop);
}
Also used : LayoutParams(android.view.ViewGroup.LayoutParams)

Example 64 with LayoutParams

use of android.view.ViewGroup.LayoutParams in project Klyph by jonathangerbaud.

the class StreamFragment method replyToComment.

private void replyToComment(final Comment comment) {
    final EditText editText = new EditText(getActivity());
    editText.setHint(R.string.post_hint);
    editText.setLines(5);
    editText.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
    int padding = getResources().getDimensionPixelSize(R.dimen.dip_8);
    editText.setPadding(padding, padding, padding, padding);
    AlertDialog dialog = AlertUtil.showAlert(getActivity(), R.string.post_a_reply, AlertUtil.NONE, editText, R.string.menu_send, new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            handleSendReplyAction(comment, editText.getText().toString());
        }
    }, R.string.cancel, null);
    dialog.show();
}
Also used : EditText(android.widget.EditText) AlertDialog(android.app.AlertDialog) LayoutParams(android.view.ViewGroup.LayoutParams) DialogInterface(android.content.DialogInterface)

Example 65 with LayoutParams

use of android.view.ViewGroup.LayoutParams in project titanium-barcode by mwaylabs.

the class TitaniumBarcodeActivity method onCreate.

/**
	 * Lifecycle method which is called of the android runtime
	 */
@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    Window window = getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    captureView = new CaptureView(this);
    captureView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    setContentView(captureView);
    CameraManager.init(getApplication());
    viewfinderView = captureView.getViewfinderView();
    lastResult = null;
    hasSurface = false;
}
Also used : Window(android.view.Window) LayoutParams(android.view.ViewGroup.LayoutParams) CaptureView(com.mwaysolutions.barcode.views.CaptureView)

Aggregations

LayoutParams (android.view.ViewGroup.LayoutParams)265 TextView (android.widget.TextView)56 View (android.view.View)50 ViewGroup (android.view.ViewGroup)50 FrameLayout (android.widget.FrameLayout)35 LinearLayout (android.widget.LinearLayout)33 ImageView (android.widget.ImageView)30 Test (org.junit.Test)26 Paint (android.graphics.Paint)22 ListView (android.widget.ListView)22 ScrollView (android.widget.ScrollView)22 Context (android.content.Context)19 MarginLayoutParams (android.view.ViewGroup.MarginLayoutParams)19 AdapterView (android.widget.AdapterView)17 RelativeLayout (android.widget.RelativeLayout)14 DisplayMetrics (android.util.DisplayMetrics)12 CheckedTextView (android.widget.CheckedTextView)12 Rect (android.graphics.Rect)9 ViewParent (android.view.ViewParent)9 TypedArray (android.content.res.TypedArray)8