Android TableLayout.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 TableLayout.LayoutParams class.

This code example shows how to use the following methods:
 
	public static View getLabel(String text) {
		Context context = DragAndDropManager.getInstance().getContext();
		TextView textView = new TextView(context);
		textView.setText(text);
		textView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
		//textView.setGravity(Gravity.TOP + Gravity.LEFT); 
		return textView;
	} 
	 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		initializeGlobals(); 
		view = new MainMenuView(getApplicationContext(), this);
		 
		view.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
		 
		setContentView(view);
	} 
	 
	private void initializeGlobals() { 
		Display display = getWindowManager().getDefaultDisplay();
        int screenWidth = display.getWidth();
        int screenHeight = display.getHeight();
        //	if either dimension is below 800, assume phone screen 
        if (screenHeight < 600 || screenWidth < 600) SMALL_PHONE_VIEW = true;
        else if (screenHeight < 800 || screenWidth < 800) PHONE_VIEW = true;
        else TABLET_VIEW = true;
	} 
	 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
		lowerBoundView = new TextView(context, attrs);
		lowerBoundView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
		lowerBoundView.setGravity(Gravity.LEFT);
		 
		upperBoundView = new TextView(context, attrs);
		upperBoundView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
		upperBoundView.setGravity(Gravity.RIGHT);
	 
		initControl(context, attrs);
		 
		updateTextColor(); 
	} 
	 
	public ParrotSeekBar(Context context, AttributeSet attrs, int defStyle) 
	{ 
		super(context, attrs, defStyle);
		 
		setThumbOffset(2);
			 
		lowerBoundView = new TextView(context, attrs, defStyle);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	protected void onCreate(Bundle icicle) {
		super.onCreate(icicle);
 
		// Cria o layout 
		TableLayout tabela = new TableLayout(this);
		tabela.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
		// Expande a coluna 1 
		tabela.setColumnStretchable(1, true);
 
		// Linha 1 
		TableRow linha1 = new TableRow(this);
 
		TextView nome = new TextView(this);
		nome.setText("Nome:");
		linha1.addView(nome);
 
		EditText tnome = new EditText(this);
		// Focus no campo nome 
		tnome.requestFocus();
		linha1.addView(tnome);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
public class UI { 
	public static TableRow addTableRow(Context context) {
    	// create a new TableRow   
        TableRow row = new TableRow(context);
        TableLayout.LayoutParams params = new LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT);
         
        row.setLayoutParams(params);
    	return row;
    } 
     
    public static TextView addTextView(String text, Context context) {
    	TextView tv = new TextView(context);
    	tv.setText(text);
    	 
    	return tv;
    } 
     
    public static Button addButton(String text, Context context) {
    	Button btn = new Button(context);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
		lowerBoundView = new TextView(context, attrs);
		lowerBoundView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
		lowerBoundView.setGravity(Gravity.LEFT);
		 
		upperBoundView = new TextView(context, attrs);
		upperBoundView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
		upperBoundView.setGravity(Gravity.RIGHT);
	 
		initControl(context, attrs);
		 
		updateTextColor(); 
	} 
	 
	public CustomSeekBar(Context context, AttributeSet attrs, int defStyle) 
	{ 
		super(context, attrs, defStyle);
		 
		setThumbOffset(2);
			 
		lowerBoundView = new TextView(context, attrs, defStyle);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
																   picture.getHeight()));
		} else 
			this.setLayoutParams(new LayoutParams(this.getWidth(), layout.getHeight() +
																   timelay.getHeight() +
																   vpad +
																   fromLay.getHeight()));
		if (profile != null) {
			canvas.drawBitmap(profile, lpad, 0, msgP);
		} 
		 
		topBar = timelay.getHeight();
		 
		txtP.setFakeBoldText(true);
		txtP.setColor(Color.rgb(59, 89, 152));		// Facebook Blue
		if (profile != null) {
			canvas.translate(profile.getWidth() + lpad + fpad, 0);
			fromLay.draw(canvas);
			canvas.translate(-profile.getWidth() - fpad, 0);
		} else { 
			canvas.translate(lpad, 0);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
		statusView = new TextView(this);
		statusView.setText(status);
 
		tr = new TableRow(this);
		tr.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.WRAP_CONTENT));
		 
		tr.addView(statusView);
 
		timelineTable.addView(tr, new TableLayout.LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.WRAP_CONTENT));
 
	} 
 
 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
					 
					upper.setVisibility(View.VISIBLE);
					 
					lower.setVisibility(View.VISIBLE);
					 
					LayoutParams lp = new LayoutParams();
					 
					lp.height = height-(height/6);
					 
					main.setLayoutParams(lp);
					 
					vis = 0;
					 
				} 
				 
				 
			} 
							 
			if(dx<0){
								 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
						 
						upper.setVisibility(View.VISIBLE);
						 
						lower.setVisibility(View.VISIBLE);
						 
						LayoutParams lp = new LayoutParams();
						 
						lp.height = height-(height/6);
						 
						main.setLayoutParams(lp);
						 
						vis = 0;
						 
					} 
					 
					 
				} 
								 
				if(dx<0){
					 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Android TableLayout.LayoutParams Questions & Answers:

See Code Examples for Android TableLayout.LayoutParams Methods: