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();
}
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);
}
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);
}
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();
}
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;
}
Aggregations