reactnative-plugin-appice 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +3 -3
- package/android/src/main/AndroidManifest.xml +47 -127
- package/android/src/main/java/com/reactlibrary/AppICEUtils.java +151 -21
- package/android/src/main/java/com/reactlibrary/AppIceReactPluginModule.java +307 -240
- package/android/src/main/java/com/reactlibrary/CampaignCampsReceiver.java +6 -23
- package/android/src/main/java/com/reactlibrary/EnumConstants.java +251 -0
- package/android/src/main/java/com/reactlibrary/NotificationEventService.java +2 -4
- package/example/App.js +76 -0
- package/example/package.json +1 -1
- package/index.js +201 -61
- package/ios/AppIceReactPlugin.h +36 -0
- package/ios/AppIceReactPlugin.m +202 -1
- package/ios/AppIceReactPlugin.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/ios/AppIceReactPlugin.xcworkspace/xcuserdata/artherajesh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/package.json +1 -1
- package/android/src/main/java/com/reactlibrary/ClickCallback.java +0 -5
- package/android/src/main/java/com/reactlibrary/InAppWebView.java +0 -68
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
package com.reactlibrary;
|
|
2
|
-
import android.annotation.SuppressLint;
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
import android.graphics.Point;
|
|
5
|
-
import android.util.DisplayMetrics;
|
|
6
|
-
import android.util.TypedValue;
|
|
7
|
-
import android.view.View;
|
|
8
|
-
import android.webkit.WebView;
|
|
9
|
-
|
|
10
|
-
@SuppressLint("ViewConstructor")
|
|
11
|
-
class InAppWebView extends WebView {
|
|
12
|
-
|
|
13
|
-
final Point dim = new Point();
|
|
14
|
-
|
|
15
|
-
private int height;
|
|
16
|
-
|
|
17
|
-
private int heightPercentage;
|
|
18
|
-
|
|
19
|
-
private int width;
|
|
20
|
-
|
|
21
|
-
private int widthPercentage;
|
|
22
|
-
|
|
23
|
-
@SuppressLint("ResourceType")
|
|
24
|
-
public InAppWebView(Context context, int width, int height, int widthPercentage, int heightPercentage) {
|
|
25
|
-
super(context);
|
|
26
|
-
this.width = width;
|
|
27
|
-
this.height = height;
|
|
28
|
-
this.widthPercentage = widthPercentage;
|
|
29
|
-
this.heightPercentage = heightPercentage;
|
|
30
|
-
setHorizontalScrollBarEnabled(false);
|
|
31
|
-
setVerticalScrollBarEnabled(false);
|
|
32
|
-
setHorizontalFadingEdgeEnabled(false);
|
|
33
|
-
setVerticalFadingEdgeEnabled(false);
|
|
34
|
-
setOverScrollMode(View.OVER_SCROLL_NEVER);
|
|
35
|
-
setBackgroundColor(0x00000000);
|
|
36
|
-
//noinspection ResourceType
|
|
37
|
-
setId(188293);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@Override
|
|
41
|
-
public boolean performClick() {
|
|
42
|
-
return super.performClick();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@Override
|
|
46
|
-
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
|
47
|
-
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
|
48
|
-
updateDimension();
|
|
49
|
-
setMeasuredDimension(dim.x, dim.y);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
void updateDimension() {
|
|
53
|
-
if (width != 0) {
|
|
54
|
-
dim.x = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
|
|
55
|
-
width, getResources().getDisplayMetrics());
|
|
56
|
-
} else {
|
|
57
|
-
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
|
58
|
-
dim.x = (int) (metrics.widthPixels * widthPercentage / 100f);
|
|
59
|
-
}
|
|
60
|
-
if (height != 0) {
|
|
61
|
-
dim.y = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
|
|
62
|
-
height, getResources().getDisplayMetrics());
|
|
63
|
-
} else {
|
|
64
|
-
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
|
65
|
-
dim.y = (int) (metrics.heightPixels * heightPercentage / 100f);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|