do not show the keyboard automatically if open an existing event for edit
This commit is contained in:
parent
862c41e693
commit
0f140aac4a
|
@ -8,6 +8,7 @@ import android.support.v7.app.AppCompatActivity;
|
|||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.DatePicker;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
@ -75,6 +76,7 @@ public class EventActivity extends AppCompatActivity implements DBHelper.DBOpera
|
|||
mEventEndDateTime = new DateTime(mEvent.getEndTS() * 1000L, DateTimeZone.getDefault());
|
||||
mTitleET.setText(mEvent.getTitle());
|
||||
mDescriptionET.setText(mEvent.getDescription());
|
||||
hideKeyboard();
|
||||
}
|
||||
|
||||
private void setupNewEvent(String dayCode) {
|
||||
|
@ -82,6 +84,10 @@ public class EventActivity extends AppCompatActivity implements DBHelper.DBOpera
|
|||
mEventEndDateTime = Formatter.getDateTimeFromCode(dayCode).withZone(DateTimeZone.getDefault()).withHourOfDay(14);
|
||||
}
|
||||
|
||||
private void hideKeyboard() {
|
||||
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.menu_event, menu);
|
||||
|
|
Loading…
Reference in New Issue