Android Aula 2 Márlon de Oliveira Vaz
Android Configurando main.xml com caixas de texto; <LinearLayout android:id= android:layout_width="fill_parent" android:layout_height="wrap_content"> <EditText android:layout_width="fill_parent" android:layout_height="50dip"/>
Android Configurando main.xml com caixas botões; <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:layout_height= "wrap_content" android:text="4" android:layout_weight="1" android:layout_width="fill_parent"/>
Android Código fonte final EditText texto = (EditText) findViewById(R.id.editView); final Button btn1 = (Button) findViewById (R.id.button1); btn1.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { String valor = texto.getText().toString() + btn1.getText().toString(); texto.setText(valor); } });
Android Fazer uma interface de calculador com a seguinte caracteristica:
Android Adicionar as funcionalidades dos botões;