Android FrameLayout.LayoutParams - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android FrameLayout.LayoutParams class.

This code example shows how to use the following methods:
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		FrameLayout frame = new FrameLayout(this);
		frame.setId(CONTENT_VIEW_ID);
		setContentView(frame, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
 
		if (savedInstanceState == null) {
			setInitialFragment(); 
		} 
	} 
 
 
	private void setInitialFragment() { 
		FragmentManager fragmentManager = getSupportFragmentManager();
		FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
		fragmentTransaction.add(CONTENT_VIEW_ID, MainFragment.newInstance()).commit();
	} 
 
} 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	protected static final int CONTENT_VIEW_ID = 140584;
 
	public static void singleFragmentActivitySetContentView(Activity activity) {
		FrameLayout fl = new FrameLayout(activity);
		fl.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.FILL_PARENT));
		fl.setId(CONTENT_VIEW_ID);
		activity.setContentView(fl);
	} 
 
} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	protected static final int CONTENT_VIEW_ID = 140584;
 
	public static void singleFragmentActivitySetContentView(Activity activity) {
		FrameLayout fl = new FrameLayout(activity);
		fl.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.FILL_PARENT));
		fl.setId(CONTENT_VIEW_ID);
		activity.setContentView(fl);
	} 
 
} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:setMargins
			width = LayoutParams.FILL_PARENT;
		} 
		else{ 
			width = (Long) settings.get("width");
		} 
		LayoutParams p = new FrameLayout.LayoutParams((int)width,(int)height,0);
		p.setMargins((int)left, (int)top, (int)right, (int)bottom);
		return p;
	} 
} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setMargins
	private LoadTimeDate(){} 
	 
	public void getView(int choice, int integerId, int integerWidth, int integerHeight, int integerLayoutX, int integerLayoutY, String text ) {
 
		if (choice == 0) {
			params = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
			context = Home.getHome().getLayout().getContext();
			TimePicker timePicker = new TimePicker(context);
			timePicker.setId(integerId);
			timePicker.setCurrentHour(hour);
			timePicker.setCurrentMinute(minute);
			timePicker.setBackgroundColor(Color.DKGRAY);
			timePicker.setScaleX(0.50f);
			timePicker.setScaleY(0.50f);
			params.setMargins(integerLayoutX, integerLayoutY, 0, 0);
			timePicker.setLayoutParams(params);
			Home.getHome().getLayout().addView(timePicker, params);
			timePicker.setOnTouchListener(new DragListener(timePicker));
			if (timePickerId > integerId){
				timePickerId = timePickerId;

5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:setMargins
	private LoadFormWidget(){} 
	 
	public void getView(int choice, int integerId, int integerWidth, int integerHeight, int integerLayoutX, int integerLayoutY, String text ) {
 
		if (choice == 0) {
			params = new FrameLayout.LayoutParams(integerWidth,integerHeight);
			context = Home.getHome().getLayout().getContext();
			Button button = new Button(context);
			button.setId(integerId);
			button.setText(text);
			button.setTextColor(Color.WHITE);
			params.setMargins(integerLayoutX, integerLayoutY, 0, 0);
			button.setLayoutParams(params);
			Home.getHome().getLayout().addView(button, params);
			button.setOnTouchListener(new DragListener(button));
			if (buttonId > integerId){
				buttonId = buttonId;
			} 
			else { 
				buttonId = integerId;
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
		// Remove the previous ad layout (if any) 
		if (_adLayout != null) mainContainer.removeView(_adLayout);
		 
		// Create a new ad layout 
		_adLayout = new RelativeLayout(getActivity());
		mainContainer.addView(_adLayout, new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
		 
		return _adLayout;
	} 
	 
	public RelativeLayout getCurrentAdLayout()
	{ 
		return _adLayout;
	} 
	 
	 
	// User cookies 
	 
	public Map<String, String> getUserCookies()
	{ 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setLayoutParams, setMargins
			img[0].layout(frame_width / 2 - y1, frame_height - img_height,
					(frame_width / 2 - y1) + img[0].getWidth(),
					(frame_height - img_height) + img[0].getHeight());
 
			int[] img_location = new int[2];
			LayoutParams params3 = new LayoutParams(LayoutParams.WRAP_CONTENT,
					LayoutParams.WRAP_CONTENT);
			img[0].getLocationInWindow(img_location);
			params3.setMargins(img_location[0], img_location[1], 0, 0);
			img[0].setLayoutParams(params3);
			// Log.e("img", location7[0] + "~~" + location7[1]); // 記錄目前位置 
 
			// for (int i = 1; i <= 5; i++) { 
			match_state = isInChangeImageZone(img[fish_random],
					img_location[0], img_location[1]);
			if (match_state == true) {
				Intent returnIntent = new Intent();
				returnIntent.putExtra("result", true);
				setResult(RESULT_OK, returnIntent);
				finish();
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Android FrameLayout.LayoutParams Questions & Answers:

See Code Examples for Android FrameLayout.LayoutParams Methods: