
































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!

































public final void onCreate(final Bundle state) { super.onCreate(state); LinearLayout.LayoutParams containerParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams. WRAP_CONTENT, 0.0F); LinearLayout.LayoutParams widgetParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 1.0F); LinearLayout root = new LinearLayout(this); root.setOrientaaon(LinearLayout. VERTICAL); root.setBackgroundColor(Color. LTGRAY); root.setLayoutParams(containerParams); LinearLayout ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. GRAY); ll.setLayoutParams(containerParams); root.addView(ll); EditText tb = new EditText(this); tb.setText(R.string. defaultLeJText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); tb = new EditText(this); tb.setText(R.string. defaultRightText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. DKGRAY); ll.setLayoutParams(containerParams); root.addView(ll); Bufon b = new BuCon(this); b.setText(R.string. labelRed); b.setTextColor(Color. RED); b.setLayoutParams(widgetParams); ll.addView(b); b = new BuCon(this); b.setText(R.string. labelGreen); b.setTextColor(Color. GREEN); b.setLayoutParams(widgetParams); ll.addView(b); setContentView(root); } }
public final void onCreate(final Bundle state) { super.onCreate(state); LinearLayout.LayoutParams containerParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, 0.0F); LinearLayout.LayoutParams widgetParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 1.0F); LinearLayout root = new LinearLayout(this); root.setOrientaaon(LinearLayout.VERTICAL); root.setBackgroundColor(Color.LTGRAY); root.setLayoutParams(containerParams); LinearLayout ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout.HORIZONTAL); ll.setBackgroundColor(Color.GRAY); ll.setLayoutParams(containerParams); root.addView(ll); EditText tb = new EditText(this); tb.setText( R.string.defaultLeFText ); tb.setFocusable(false); tb.setLayoutParams(widgetParams); ll.addView(tb); tb = new EditText(this); tb.setText( R.string.defaultRightText ); tb.setFocusable(false); tb.setLayoutParams(widgetParams); ll.addView(tb); ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout.HORIZONTAL); ll.setBackgroundColor(Color.DKGRAY); ll.setLayoutParams(containerParams); root.addView(ll); Bufon b = new Bufon(this); b.setText( R.string.labelRed ); b.setTextColor(Color.RED); b.setLayoutParams(widgetParams); ll.addView(b); b = new Bufon(this); b.setText( R.string.labelGreen ); b.setTextColor(Color.GREEN); b.setLayoutParams(widgetParams); ll.addView(b); setContentView(root); } }
public final void onCreate(final Bundle state) { super.onCreate(state); LinearLayout.LayoutParams containerParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams. WRAP_CONTENT, 0.0F); LinearLayout.LayoutParams widgetParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 1.0F); LinearLayout root = new LinearLayout(this); root.setOrientaaon(LinearLayout. VERTICAL); root.setBackgroundColor(Color. LTGRAY); root.setLayoutParams(containerParams); LinearLayout ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. GRAY); ll.setLayoutParams(containerParams); root.addView(ll); EditText tb = new EditText(this); tb.setText(R.string. defaultLeJText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); tb = new EditText(this); tb.setText(R.string. defaultRightText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. DKGRAY); ll.setLayoutParams(containerParams); root.addView(ll); Bufon b = new BuCon(this); b.setText(R.string. labelRed); b.setTextColor(Color. RED); b.setLayoutParams(widgetParams); ll.addView(b); b = new BuCon(this); b.setText(R.string. labelGreen); b.setTextColor(Color. GREEN); b.setLayoutParams(widgetParams); ll.addView(b); setContentView(root); } }
E se eu mudasse isto! para GREEN?!
public final void onCreate(final Bundle state) { super.onCreate(state); LinearLayout.LayoutParams containerParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams. WRAP_CONTENT, 0.0F); LinearLayout.LayoutParams widgetParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 1.0F); LinearLayout root = new LinearLayout(this); root.setOrientaaon(LinearLayout. VERTICAL); root.setBackgroundColor(Color. LTGRAY); root.setLayoutParams(containerParams); LinearLayout ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. GRAY); ll.setLayoutParams(containerParams); root.addView(ll); EditText tb = new EditText(this); tb.setText(R.string. defaultLeJText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); tb = new EditText(this); tb.setText(R.string. defaultRightText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. DKGRAY); ll.setLayoutParams(containerParams); root.addView(ll); Bufon b = new BuCon(this); b.setText(R.string. labelRed); b.setTextColor(Color. RED); b.setLayoutParams(widgetParams); ll.addView(b); b = new BuCon(this); b.setText(R.string. labelGreen); b.setTextColor(Color. GREEN); b.setLayoutParams(widgetParams); ll.addView(b); setContentView(root); } }
public final void onCreate(final Bundle state) { super.onCreate(state); LinearLayout.LayoutParams containerParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams. WRAP_CONTENT, 0.0F); LinearLayout.LayoutParams widgetParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 1.0F); LinearLayout root = new LinearLayout(this); root.setOrientaaon(LinearLayout. VERTICAL); root.setBackgroundColor(Color. LTGRAY); root.setLayoutParams(containerParams); LinearLayout ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. GRAY); ll.setLayoutParams(containerParams); root.addView(ll); EditText tb = new EditText(this); tb.setText(R.string. defaultLeJText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); tb = new EditText(this); tb.setText(R.string. defaultRightText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. DKGRAY); ll.setLayoutParams(containerParams); root.addView(ll); Bufon b = new BuCon(this); b.setText(R.string. labelRed); b.setTextColor(Color. RED); b.setLayoutParams(widgetParams); ll.addView(b); b = new BuCon(this); b.setText(R.string. labelGreen); b.setTextColor(Color. GREEN); b.setLayoutParams(widgetParams); ll.addView(b); setContentView(root); } }
public final void onCreate(final Bundle state) { super.onCreate(state); LinearLayout.LayoutParams containerParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams. WRAP_CONTENT, 0.0F); LinearLayout.LayoutParams widgetParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams. FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 1.0F); LinearLayout root = new LinearLayout(this); root.setOrientaaon(LinearLayout. VERTICAL); root.setBackgroundColor(Color. LTGRAY); root.setLayoutParams(containerParams); LinearLayout ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. GRAY); ll.setLayoutParams(containerParams); root.addView(ll); EditText tb = new EditText(this); tb.setText(R.string. defaultLeJText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); tb = new EditText(this); tb.setText(R.string. defaultRightText); tb.setFocusable( false); tb.setLayoutParams(widgetParams); ll.addView(tb); ll = new LinearLayout(this); ll.setOrientaaon(LinearLayout. HORIZONTAL); ll.setBackgroundColor(Color. DKGRAY); ll.setLayoutParams(containerParams); root.addView(ll); Bufon b = new BuCon(this); b.setText(R.string. labelRed); b.setTextColor(Color. RED); b.setLayoutParams(widgetParams); ll.addView(b); b = new BuCon(this); b.setText(R.string. labelGreen); b.setTextColor(Color. GREEN); b.setLayoutParams(widgetParams); ll.addView(b); setContentView(root); } } E se fosse! vertical?!
E se fosse 1.5?!