Weird behavior need more investigations

This commit is contained in:
stom79 2018-11-05 20:15:50 +01:00
parent d2def723e9
commit cebfc126a8
2 changed files with 3 additions and 7 deletions

View File

@ -7,7 +7,7 @@ android {
applicationId "fr.gouv.etalab.mastodon" applicationId "fr.gouv.etalab.mastodon"
minSdkVersion 15 minSdkVersion 15
targetSdkVersion 28 targetSdkVersion 28
versionCode 177 versionCode 178
versionName "1.19.2" versionName "1.19.2"
} }
flavorDimensions "default" flavorDimensions "default"

View File

@ -1415,16 +1415,12 @@ public class Helper {
if( actionButton != null) { if( actionButton != null) {
actionButton.setFocusableInTouchMode(true); actionButton.setFocusableInTouchMode(true);
actionButton.setFocusable(true);
actionButton.setOnFocusChangeListener(new View.OnFocusChangeListener() { actionButton.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override @Override
public void onFocusChange(View v, boolean hasFocus) { public void onFocusChange(View v, boolean hasFocus) {
try { try {
if( !activity.isFinishing() ){ actionMenu.close(true);
if( hasFocus && !actionMenu.isOpen())
actionMenu.open(true);
else if( !hasFocus && actionMenu.isOpen())
actionMenu.close(true);
}
}catch (Exception ignored){} }catch (Exception ignored){}
} }