[TIMOB-16080] Android: Remove Default Sound Effect when touchEnabled = false
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-03-07T19:46:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.1.0 |
Components | Android |
Labels | n/a |
Reporter | Andrew Greenstreet |
Assignee | Andy Waldman |
Created | 2013-12-17T20:52:08.000+0000 |
Updated | 2017-03-07T22:06:04.000+0000 |
Description
Please update "registerForTouch" in TiUIView.java with
if (clickable) {
registerTouchEvents(touchable);
doSetClickable(touchable);
} else {
touchable.setSoundEffectsEnabled(false);
}
Reasoning: If a developer has specifically set a view to be non-touchable, then there should not be a touch sound on that view.
Alternative would be to add another view property for soundEffectsEnabled, such that in either Alloy
<View soundEffectsEnabled='false'></View>
or
Ti.UI.createView({
soundEffectsEnabled : false
});
Where View is any kind of View (View, Label, Image, etc)
Makes sense. Moving this enhancement request to engineering for further evaluation.
PR https://github.com/appcelerator/titanium_mobile/pull/5373
IMHO - this should enabled by default, native Android apps have that kind of behaviour. So, sound should be played only if view have touch events added.
I agree. I've been rolling a custom version of the Ti Android SDK that work this way for almost a year. Touch sounds on non-interactive items is just plain wrong. This is what I use:
Updated PR: https://github.com/appcelerator/titanium_mobile/pull/8816 Basically, we should normalize the SDK behavior to the native behaviorm which is described above.
Lastest PR: https://github.com/appcelerator/titanium_mobile/pull/8852
Closing https://github.com/appcelerator/titanium_mobile/pull/8816 Find above the current PR
Improvement present in SDK build 6.1.0.v20170307124208 Test information available in https://github.com/appcelerator/titanium_mobile/pull/8852