-1
Well, I’m creating an application for base conversions and I kind of created a mini keyboard with the keys to Hexadecimal (A, B, C, D, E, F), but it’s a hexadecimal text field when I type 3 and I’ll type through the mini-keyboard it does, it deletes the number typed and puts a letter. Anyway, I need to use a password to solve my problem, when I use my "mini keyboard" do not delete the number typed. The code is below.
`
private EditText Text_BIN;
private EditText Text_DEC;
private EditText Text_HEX;
private EditText Text_OCT;
private Button Button_BIN;
private Button Button_DEC;
private Button Button_HEX;
private Button Button_OCT;
private Button Button_CLEAN;
private Button A;
private Button B;
private Button C;
private Button D;
private Button E;
private Button F;
Boolean bool = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Text_BIN = (EditText) findViewById(R.id.text_BIN);
Text_DEC = (EditText) findViewById(R.id.text_DEC);
Text_HEX = (EditText) findViewById(R.id.text_HEX);
Text_OCT = (EditText) findViewById(R.id.text_OCT);
Button_BIN = (Button) findViewById(R.id.Button_BIN);
Button_DEC = (Button) findViewById(R.id.Button_DEC);
Button_HEX = (Button) findViewById(R.id.Button_OCT);
Button_CLEAN = (Button) findViewById(R.id.Button_CLEAN);
A = (Button) findViewById(R.id.A);
B = (Button) findViewById(R.id.B);
C = (Button) findViewById(R.id.C);
D = (Button) findViewById(R.id.D);
E = (Button) findViewById(R.id.E);
F = (Button) findViewById(R.id.F);
}
public void Button_Clean(View v){
Text_BIN.setText("");
Text_DEC.setText("");
Text_HEX.setText("");
Text_OCT.setText("");
}
public void Button_BIN(View v){
}
public void A(View v){
Text_HEX.setText("A"); //eu sei que assim está errado.
}
`
You got it with my answer?
– Murillo Comino