mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 03:07:26 +01:00
Hide keyboard when clicking cancel button in dialogs for going to subreddit and user.
This commit is contained in:
parent
0a5b5cb209
commit
9bb5bb9938
@ -1477,7 +1477,11 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
||||
subredditIntent.putExtra(ViewSubredditDetailActivity.EXTRA_SUBREDDIT_NAME_KEY, thingEditText.getText().toString());
|
||||
startActivity(subredditIntent);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(dialogInterface -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
@ -1518,7 +1522,11 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
||||
userIntent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, thingEditText.getText().toString());
|
||||
startActivity(userIntent);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(dialogInterface -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
|
@ -649,7 +649,11 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect
|
||||
subredditIntent.putExtra(ViewSubredditDetailActivity.EXTRA_SUBREDDIT_NAME_KEY, thingEditText.getText().toString());
|
||||
startActivity(subredditIntent);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(dialogInterface -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
@ -690,7 +694,11 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect
|
||||
userIntent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, thingEditText.getText().toString());
|
||||
startActivity(userIntent);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(dialogInterface -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
|
@ -1441,7 +1441,11 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
||||
subredditIntent.putExtra(ViewSubredditDetailActivity.EXTRA_SUBREDDIT_NAME_KEY, thingEditText.getText().toString());
|
||||
startActivity(subredditIntent);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(dialogInterface -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
@ -1482,7 +1486,11 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
||||
userIntent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, thingEditText.getText().toString());
|
||||
startActivity(userIntent);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(dialogInterface -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
|
@ -1247,7 +1247,11 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
||||
subredditIntent.putExtra(ViewSubredditDetailActivity.EXTRA_SUBREDDIT_NAME_KEY, thingEditText.getText().toString());
|
||||
startActivity(subredditIntent);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(dialogInterface -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
@ -1288,7 +1292,11 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
||||
userIntent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, thingEditText.getText().toString());
|
||||
startActivity(userIntent);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(dialogInterface -> {
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(thingEditText.getWindowToken(), 0);
|
||||
|
Loading…
Reference in New Issue
Block a user