mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-09 23:41:08 +01:00
Remove style in order to make the buttons to have the correct color.
This commit is contained in:
parent
dd50af72c6
commit
a214d3ac1b
1 changed files with 5 additions and 2 deletions
|
@ -354,7 +354,7 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
final EditText editText= dialog.findViewById(R.id.editcip13);
|
||||
String cip13 = String.valueOf(editText.getText());
|
||||
|
||||
// TODO change the color of ok button when the number of character is correct.
|
||||
// TODO change the background color of ok button when the number of character is correct.
|
||||
|
||||
ok.setText(R.string.button_ok);
|
||||
cancel.setText(R.string.button_cancel);
|
||||
|
@ -373,7 +373,10 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
//alert.getButton(alert.BUTTON_POSITIVE).setEnabled(s.length() == 8);
|
||||
if (s.length() == 8) {
|
||||
ok.setEnabled(true);
|
||||
ok.setBackground(ContextCompat.getDrawable(editText.getContext(), R.drawable.shadow_bg));
|
||||
ok.setBackground(ContextCompat.getDrawable(editText.getContext(), R.drawable.rounded_btn));
|
||||
} else {
|
||||
ok.setEnabled(false);
|
||||
ok.setBackground(ContextCompat.getDrawable(editText.getContext(), R.drawable.rounded_btn_disabled));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue