File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
action-sheet/android/src/main/java/com/capacitorjs/plugins/actionsheet
browser/android/src/main/java/com/capacitorjs/plugins/browser
status-bar/android/src/main/java/com/capacitorjs/plugins/statusbar Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 5
5
import android .content .DialogInterface ;
6
6
import android .graphics .Color ;
7
7
import android .view .View ;
8
- import android .view .Window ;
9
8
import android .widget .LinearLayout ;
10
9
import android .widget .TextView ;
11
10
import androidx .annotation .NonNull ;
Original file line number Diff line number Diff line change 1
1
package com .capacitorjs .plugins .browser ;
2
2
3
- import android .graphics .Color ;
4
3
import android .net .Uri ;
5
4
import com .getcapacitor .Logger ;
6
5
import com .getcapacitor .Plugin ;
7
6
import com .getcapacitor .PluginCall ;
8
7
import com .getcapacitor .PluginMethod ;
9
8
import com .getcapacitor .annotation .CapacitorPlugin ;
9
+ import com .getcapacitor .util .WebColor ;
10
10
11
11
@ CapacitorPlugin (name = "Browser" )
12
12
public class BrowserPlugin extends Plugin {
@@ -42,7 +42,7 @@ public void open(PluginCall call) {
42
42
String colorString = call .getString ("toolbarColor" );
43
43
Integer toolbarColor = null ;
44
44
if (colorString != null ) try {
45
- toolbarColor = Color .parseColor (colorString );
45
+ toolbarColor = WebColor .parseColor (colorString );
46
46
} catch (IllegalArgumentException ex ) {
47
47
Logger .error (getLogTag (), "Invalid color provided for toolbarColor. Using default" , null );
48
48
}
Original file line number Diff line number Diff line change 1
1
package com .capacitorjs .plugins .statusbar ;
2
2
3
- import android .graphics .Color ;
4
3
import com .getcapacitor .JSObject ;
5
4
import com .getcapacitor .Plugin ;
6
5
import com .getcapacitor .PluginCall ;
7
6
import com .getcapacitor .PluginMethod ;
8
7
import com .getcapacitor .annotation .CapacitorPlugin ;
8
+ import com .getcapacitor .util .WebColor ;
9
9
10
10
@ CapacitorPlugin (name = "StatusBar" )
11
11
public class StatusBarPlugin extends Plugin {
@@ -46,7 +46,7 @@ public void setBackgroundColor(final PluginCall call) {
46
46
.executeOnMainThread (
47
47
() -> {
48
48
try {
49
- final int parsedColor = Color .parseColor (color .toUpperCase ());
49
+ final int parsedColor = WebColor .parseColor (color .toUpperCase ());
50
50
implementation .setBackgroundColor (parsedColor );
51
51
call .resolve ();
52
52
} catch (IllegalArgumentException ex ) {
You can’t perform that action at this time.
0 commit comments