Skip to content

Commit

Permalink
Merge branch 'master' into TIMOB-27797
Browse files Browse the repository at this point in the history
  • Loading branch information
garymathews committed Apr 9, 2020
2 parents abfce66 + 1022673 commit 5b85187
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 140 deletions.
11 changes: 4 additions & 7 deletions android/modules/media/src/java/android/widget/TiVideoView8.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Copyright (c) 2009-2020 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
*
* This is the api level 8 VideoView.java with Titanium-specific modifications.
*/

Expand Down Expand Up @@ -569,9 +569,6 @@ public void onCompletion(MediaPlayer mp)
if (mOnCompletionListener != null) {
mOnCompletionListener.onCompletion(mMediaPlayer);
}
if (mp != null) {
mp.release();
}
}
};

Expand Down Expand Up @@ -610,7 +607,7 @@ public void onBufferingUpdate(MediaPlayer mp, int percent)
/**
* Register a callback to be invoked when the media file
* is loaded and ready to go.
*
*
* @param l
* The callback that will be run
*/
Expand All @@ -622,7 +619,7 @@ public void setOnPreparedListener(MediaPlayer.OnPreparedListener l)
/**
* Register a callback to be invoked when the end of a media file
* has been reached during playback.
*
*
* @param l
* The callback that will be run
*/
Expand All @@ -636,7 +633,7 @@ public void setOnCompletionListener(OnCompletionListener l)
* during playback or setup. If no listener is specified,
* or if the listener returned false, VideoView will inform
* the user of any errors.
*
*
* @param l
* The callback that will be run
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,12 @@ public void onPrepared(MediaPlayer mp)
@Override
public void onCompletion(MediaPlayer mp)
{
mp.release();
getPlayerProxy().onPlaybackComplete();
}

@Override
public boolean onError(MediaPlayer mp, int what, int extra)
{
mp.release();
getPlayerProxy().onPlaybackError(what);
return false; // Let completion listener run.
}
Expand Down
4 changes: 2 additions & 2 deletions android/titanium/res/values/values.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
<style name="Theme.Titanium" parent="@style/Base.Theme.Titanium.Splash"/>

<!-- Theme to be used by Titanium's translucent windows and modal windows. -->
<style name="Theme.Titanium.Translucent" parent="@style/Base.Theme.Titanium.Basic">
<style name="Theme.Titanium.Translucent" parent="@style/Base.Theme.Titanium.Customizable">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
</style>

<style name="Theme.AppCompat.Translucent" parent="@style/Base.Theme.Titanium.Customizable">
<style name="Theme.AppCompat.Translucent" parent="@style/Base.Theme.Titanium.Basic">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
Expand Down
12 changes: 12 additions & 0 deletions iphone/Classes/TiUISearchBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ - (void)setShowCancel_:(id)value
UISearchBar *search = [self searchBar];
[search setShowsCancelButton:[TiUtils boolValue:value]];
[search sizeToFit];

id textColor = [[self proxy] valueForUndefinedKey:@"color"];
if ([TiUtils isIOSVersionLower:@"11.0"] && textColor) {
UIView *searchContainerView = self.searchBar.subviews.firstObject;

[searchContainerView.subviews enumerateObjectsUsingBlock:^(__kindof UIView *_Nonnull obj, NSUInteger idx, BOOL *_Nonnull stop) {
if ([obj isKindOfClass:[UITextField class]]) {
((UITextField *)obj).textColor = [[TiUtils colorValue:textColor] _color];
*stop = YES;
}
}];
}
}

- (void)setHintText_:(id)value
Expand Down
158 changes: 31 additions & 127 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"chai": "^4.2.0",
"clang-format": "1.4.0",
"commander": "^5.0.0",
"commitizen": "^4.0.3",
"commitizen": "^4.0.4",
"conventional-changelog-cli": "^2.0.31",
"core-js": "^3.6.4",
"cz-conventional-changelog": "^3.1.0",
Expand All @@ -145,7 +145,7 @@
"npm-run-all": "^4.1.5",
"nyc": "^15.0.1",
"request-promise-native": "^1.0.8",
"rollup": "^2.3.3",
"rollup": "^2.3.4",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
Expand Down

0 comments on commit 5b85187

Please sign in to comment.