@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_transaction);
tv = (TextView) findViewById(R.id.textView);
switch1 = (Switch)findViewById(R.id.switch1);
DatePlain = (ExtractEditText)findViewById(R.id.DatePlain);
if (switch1.isChecked()){
DatePlain.setVisibility(View.VISIBLE);
} else {
DatePlain.setVisibility(View.GONE);
}
}