@phucprime/react-native-image-editor 1.0.0
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/LICENSE +201 -0
- package/README.md +247 -0
- package/android/build.gradle +62 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradlew +240 -0
- package/android/gradlew.bat +91 -0
- package/android/libs/photo-editor-android.jar +0 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/BaseActivity.java +300 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/ColorPickerAdapter.java +129 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/EmojiAdapter.java +91 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/EmojiFragment.java +56 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/GalleryUtils.java +73 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/ImageAdapter.java +69 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/ImageFragment.java +93 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/MainActivity.java +29 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/MediaActivity.java +95 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/PhotoEditorActivity.java +1055 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/TranslationService.java +31 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/UtilFunctions.java +176 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/widget/RealtimeBlurView.java +359 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/widget/SlidingUpPanelLayout.java +1527 -0
- package/android/src/main/java/com/ahmedadeltito/photoeditor/widget/ViewDragHelper.java +1466 -0
- package/android/src/main/java/ui/photoeditor/RNPhotoEditorModule.java +108 -0
- package/android/src/main/java/ui/photoeditor/RNPhotoEditorPackage.java +29 -0
- package/android/src/main/res/drawable/above_shadow.xml +7 -0
- package/android/src/main/res/drawable/below_shadow.xml +7 -0
- package/android/src/main/res/drawable/fading_shadow.xml +7 -0
- package/android/src/main/res/drawable/rounded_border_text_view.xml +13 -0
- package/android/src/main/res/drawable-xhdpi/aa.png +0 -0
- package/android/src/main/res/drawable-xhdpi/bb.png +0 -0
- package/android/src/main/res/drawable-xhdpi/c.png +0 -0
- package/android/src/main/res/drawable-xhdpi/cc.png +0 -0
- package/android/src/main/res/drawable-xhdpi/d.png +0 -0
- package/android/src/main/res/drawable-xhdpi/dd.png +0 -0
- package/android/src/main/res/drawable-xhdpi/e.png +0 -0
- package/android/src/main/res/drawable-xhdpi/ee.png +0 -0
- package/android/src/main/res/drawable-xhdpi/i.png +0 -0
- package/android/src/main/res/drawable-xhdpi/j.png +0 -0
- package/android/src/main/res/drawable-xhdpi/k.png +0 -0
- package/android/src/main/res/drawable-xhdpi/l.png +0 -0
- package/android/src/main/res/drawable-xhdpi/m.png +0 -0
- package/android/src/main/res/drawable-xhdpi/n.png +0 -0
- package/android/src/main/res/drawable-xhdpi/o.png +0 -0
- package/android/src/main/res/drawable-xhdpi/p.png +0 -0
- package/android/src/main/res/drawable-xhdpi/q.png +0 -0
- package/android/src/main/res/drawable-xhdpi/r.png +0 -0
- package/android/src/main/res/drawable-xhdpi/s.png +0 -0
- package/android/src/main/res/drawable-xhdpi/t.png +0 -0
- package/android/src/main/res/drawable-xhdpi/u.png +0 -0
- package/android/src/main/res/drawable-xhdpi/v.png +0 -0
- package/android/src/main/res/drawable-xhdpi/w.png +0 -0
- package/android/src/main/res/drawable-xhdpi/x.png +0 -0
- package/android/src/main/res/drawable-xhdpi/y.png +0 -0
- package/android/src/main/res/drawable-xhdpi/z.png +0 -0
- package/android/src/main/res/layout/activity_main.xml +28 -0
- package/android/src/main/res/layout/activity_photo_editor.xml +316 -0
- package/android/src/main/res/layout/add_text_popup_window.xml +47 -0
- package/android/src/main/res/layout/color_picker_item_list.xml +15 -0
- package/android/src/main/res/layout/fragment_main_photo_edit_emoji.xml +11 -0
- package/android/src/main/res/layout/fragment_main_photo_edit_image.xml +10 -0
- package/android/src/main/res/layout/fragment_photo_edit_emoji_item_list.xml +17 -0
- package/android/src/main/res/layout/fragment_photo_edit_image_item_list.xml +16 -0
- package/android/src/main/res/raw/emojioneandroid +0 -0
- package/android/src/main/res/raw/eventtusicons +0 -0
- package/android/src/main/res/raw/font_awesome_solid.otf +0 -0
- package/android/src/main/res/raw/icomoon.ttf +0 -0
- package/android/src/main/res/values/arrays.xml +447 -0
- package/android/src/main/res/values/attrs.xml +30 -0
- package/android/src/main/res/values/colors.xml +21 -0
- package/android/src/main/res/values/dimens.xml +4 -0
- package/android/src/main/res/values/strings.xml +33 -0
- package/android/src/main/res/values/styles.xml +27 -0
- package/ios/RNImageEditor.podspec +26 -0
- package/ios/RNPhotoEditor.h +13 -0
- package/ios/RNPhotoEditor.m +163 -0
- package/ios/RNPhotoEditor.xcodeproj/project.pbxproj +362 -0
- package/lib/index.d.ts +125 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +114 -0
- package/lib/index.js.map +1 -0
- package/package.json +73 -0
- package/react-native-image-editor.podspec +39 -0
- package/src/index.ts +232 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
package ui.photoeditor;
|
|
2
|
+
|
|
3
|
+
import android.app.Activity;
|
|
4
|
+
import android.content.Intent;
|
|
5
|
+
import android.graphics.Color;
|
|
6
|
+
import com.ahmedadeltito.photoeditor.PhotoEditorActivity;
|
|
7
|
+
import com.ahmedadeltito.photoeditor.TranslationService;
|
|
8
|
+
import com.facebook.react.bridge.ActivityEventListener;
|
|
9
|
+
import com.facebook.react.bridge.BaseActivityEventListener;
|
|
10
|
+
import com.facebook.react.bridge.Callback;
|
|
11
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
12
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
13
|
+
import com.facebook.react.bridge.ReactMethod;
|
|
14
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
15
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
16
|
+
import java.util.ArrayList;
|
|
17
|
+
|
|
18
|
+
public class RNPhotoEditorModule extends ReactContextBaseJavaModule {
|
|
19
|
+
|
|
20
|
+
private static final int PHOTO_EDITOR_REQUEST = 1;
|
|
21
|
+
private static final String E_PHOTO_EDITOR_CANCELLED = "E_PHOTO_EDITOR_CANCELLED";
|
|
22
|
+
|
|
23
|
+
private Callback mDoneCallback;
|
|
24
|
+
private Callback mCancelCallback;
|
|
25
|
+
|
|
26
|
+
private final ActivityEventListener mActivityEventListener = new BaseActivityEventListener() {
|
|
27
|
+
@Override
|
|
28
|
+
public void onActivityResult(
|
|
29
|
+
Activity activity,
|
|
30
|
+
int requestCode,
|
|
31
|
+
int resultCode,
|
|
32
|
+
Intent intent
|
|
33
|
+
) {
|
|
34
|
+
if (requestCode == PHOTO_EDITOR_REQUEST) {
|
|
35
|
+
if (mDoneCallback != null) {
|
|
36
|
+
if (resultCode == Activity.RESULT_CANCELED) {
|
|
37
|
+
mCancelCallback.invoke(resultCode);
|
|
38
|
+
} else {
|
|
39
|
+
mDoneCallback.invoke(intent.getExtras().getString("imagePath"));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
mCancelCallback = null;
|
|
44
|
+
mDoneCallback = null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
public RNPhotoEditorModule(ReactApplicationContext reactContext) {
|
|
50
|
+
super(reactContext);
|
|
51
|
+
reactContext.addActivityEventListener(mActivityEventListener);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@Override
|
|
55
|
+
public String getName() {
|
|
56
|
+
return "RNPhotoEditor";
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@ReactMethod
|
|
60
|
+
public void Edit(final ReadableMap props, final Callback onDone, final Callback onCancel) {
|
|
61
|
+
String path = props.getString("path");
|
|
62
|
+
// print all readable map
|
|
63
|
+
TranslationService.getInstance().init(props.getMap("languages").toHashMap());
|
|
64
|
+
|
|
65
|
+
//Process Stickers
|
|
66
|
+
ReadableArray stickers = props.getArray("stickers");
|
|
67
|
+
ArrayList<Integer> stickersIntent = new ArrayList<Integer>();
|
|
68
|
+
|
|
69
|
+
for (int i = 0; i < stickers.size(); i++) {
|
|
70
|
+
int drawableId = getReactApplicationContext()
|
|
71
|
+
.getResources()
|
|
72
|
+
.getIdentifier(
|
|
73
|
+
stickers.getString(i),
|
|
74
|
+
"drawable",
|
|
75
|
+
getReactApplicationContext().getPackageName()
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
stickersIntent.add(drawableId);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
//Process Hidden Controls
|
|
82
|
+
ReadableArray hiddenControls = props.getArray("hiddenControls");
|
|
83
|
+
ArrayList hiddenControlsIntent = new ArrayList<>();
|
|
84
|
+
|
|
85
|
+
for (int i = 0; i < hiddenControls.size(); i++) {
|
|
86
|
+
hiddenControlsIntent.add(hiddenControls.getString(i));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
//Process Colors
|
|
90
|
+
ReadableArray colors = props.getArray("colors");
|
|
91
|
+
ArrayList colorPickerColors = new ArrayList<>();
|
|
92
|
+
|
|
93
|
+
for (int i = 0; i < colors.size(); i++) {
|
|
94
|
+
colorPickerColors.add(Color.parseColor(colors.getString(i)));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
Intent intent = new Intent(getCurrentActivity(), PhotoEditorActivity.class);
|
|
98
|
+
intent.putExtra("selectedImagePath", path);
|
|
99
|
+
intent.putExtra("colorPickerColors", colorPickerColors);
|
|
100
|
+
intent.putExtra("hiddenControls", hiddenControlsIntent);
|
|
101
|
+
intent.putExtra("stickers", stickersIntent);
|
|
102
|
+
|
|
103
|
+
mCancelCallback = onCancel;
|
|
104
|
+
mDoneCallback = onDone;
|
|
105
|
+
|
|
106
|
+
getCurrentActivity().startActivityForResult(intent, PHOTO_EDITOR_REQUEST);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
package ui.photoeditor;
|
|
3
|
+
|
|
4
|
+
import java.util.Arrays;
|
|
5
|
+
import java.util.Collections;
|
|
6
|
+
import java.util.List;
|
|
7
|
+
|
|
8
|
+
import com.facebook.react.ReactPackage;
|
|
9
|
+
import com.facebook.react.bridge.NativeModule;
|
|
10
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
11
|
+
import com.facebook.react.uimanager.ViewManager;
|
|
12
|
+
import com.facebook.react.bridge.JavaScriptModule;
|
|
13
|
+
|
|
14
|
+
public class RNPhotoEditorPackage implements ReactPackage {
|
|
15
|
+
@Override
|
|
16
|
+
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
|
17
|
+
return Arrays.<NativeModule>asList(new RNPhotoEditorModule(reactContext));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Deprecated from RN 0.47
|
|
21
|
+
public List<Class<? extends JavaScriptModule>> createJSModules() {
|
|
22
|
+
return Collections.emptyList();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@Override
|
|
26
|
+
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
|
27
|
+
return Collections.emptyList();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
+
<stroke
|
|
3
|
+
android:width="2dp"
|
|
4
|
+
android:color="#FFFFFF" />
|
|
5
|
+
|
|
6
|
+
<padding
|
|
7
|
+
android:bottom="2dp"
|
|
8
|
+
android:left="2dp"
|
|
9
|
+
android:right="2dp"
|
|
10
|
+
android:top="2dp" />
|
|
11
|
+
|
|
12
|
+
<corners android:radius="50dp" />
|
|
13
|
+
</shape>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
4
|
+
android:layout_width="match_parent"
|
|
5
|
+
android:layout_height="match_parent"
|
|
6
|
+
tools:context="com.ahmedadeltito.photoeditor.MainActivity">
|
|
7
|
+
|
|
8
|
+
<LinearLayout
|
|
9
|
+
android:layout_width="match_parent"
|
|
10
|
+
android:layout_height="match_parent"
|
|
11
|
+
android:gravity="center"
|
|
12
|
+
android:orientation="vertical">
|
|
13
|
+
|
|
14
|
+
<Button
|
|
15
|
+
android:layout_width="wrap_content"
|
|
16
|
+
android:layout_height="wrap_content"
|
|
17
|
+
android:onClick="openUserGallery"
|
|
18
|
+
android:text="@string/choose_from_gallery" />
|
|
19
|
+
|
|
20
|
+
<Button
|
|
21
|
+
android:layout_width="wrap_content"
|
|
22
|
+
android:layout_height="wrap_content"
|
|
23
|
+
android:onClick="openUserCamera"
|
|
24
|
+
android:text="@string/choose_from_camera" />
|
|
25
|
+
|
|
26
|
+
</LinearLayout>
|
|
27
|
+
|
|
28
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
3
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
4
|
+
android:id="@+id/parent"
|
|
5
|
+
android:layout_width="match_parent"
|
|
6
|
+
android:layout_height="match_parent"
|
|
7
|
+
android:fitsSystemWindows="true"
|
|
8
|
+
tools:context="com.ahmedadeltito.photoeditor.PhotoEditorActivity">
|
|
9
|
+
|
|
10
|
+
<com.ahmedadeltito.photoeditor.widget.SlidingUpPanelLayout
|
|
11
|
+
android:id="@+id/sliding_layout"
|
|
12
|
+
android:layout_width="match_parent"
|
|
13
|
+
android:layout_height="match_parent"
|
|
14
|
+
android:gravity="bottom"
|
|
15
|
+
app:umanoDragView="@+id/dragView"
|
|
16
|
+
app:umanoOverlay="true"
|
|
17
|
+
app:umanoShadowHeight="4dp">
|
|
18
|
+
|
|
19
|
+
<RelativeLayout
|
|
20
|
+
android:layout_width="match_parent"
|
|
21
|
+
android:layout_height="match_parent"
|
|
22
|
+
android:background="#000000"
|
|
23
|
+
android:gravity="center">
|
|
24
|
+
|
|
25
|
+
<RelativeLayout
|
|
26
|
+
android:id="@+id/parent_image_rl"
|
|
27
|
+
android:layout_width="match_parent"
|
|
28
|
+
android:layout_height="match_parent"
|
|
29
|
+
android:layout_centerInParent="true">
|
|
30
|
+
|
|
31
|
+
<ImageView
|
|
32
|
+
android:id="@+id/photo_edit_iv"
|
|
33
|
+
android:layout_width="match_parent"
|
|
34
|
+
android:layout_height="wrap_content"
|
|
35
|
+
android:layout_centerInParent="true"
|
|
36
|
+
android:adjustViewBounds="true"
|
|
37
|
+
android:contentDescription="@string/app_name"
|
|
38
|
+
android:scaleType="centerCrop" />
|
|
39
|
+
|
|
40
|
+
<com.ahmedadeltito.photoeditorsdk.BrushDrawingView
|
|
41
|
+
android:id="@+id/drawing_view"
|
|
42
|
+
android:layout_width="match_parent"
|
|
43
|
+
android:layout_height="wrap_content"
|
|
44
|
+
android:layout_alignTop="@+id/photo_edit_iv"
|
|
45
|
+
android:layout_alignBottom="@+id/photo_edit_iv"
|
|
46
|
+
android:layout_centerInParent="true"
|
|
47
|
+
android:visibility="gone" />
|
|
48
|
+
|
|
49
|
+
</RelativeLayout>
|
|
50
|
+
|
|
51
|
+
<TextView
|
|
52
|
+
android:id="@+id/done_drawing_tv"
|
|
53
|
+
android:layout_width="wrap_content"
|
|
54
|
+
android:layout_height="wrap_content"
|
|
55
|
+
android:layout_alignParentEnd="true"
|
|
56
|
+
android:layout_marginEnd="20dp"
|
|
57
|
+
android:layout_marginStart="20dp"
|
|
58
|
+
android:layout_marginTop="10dp"
|
|
59
|
+
android:padding="10dp"
|
|
60
|
+
android:shadowColor="#000000"
|
|
61
|
+
android:shadowDx="1"
|
|
62
|
+
android:shadowDy="1"
|
|
63
|
+
android:shadowRadius="2"
|
|
64
|
+
android:text="@string/done"
|
|
65
|
+
android:textColor="#FFFFFF"
|
|
66
|
+
android:textSize="20sp"
|
|
67
|
+
android:visibility="gone" />
|
|
68
|
+
|
|
69
|
+
<TextView
|
|
70
|
+
android:id="@+id/erase_drawing_tv"
|
|
71
|
+
android:layout_width="wrap_content"
|
|
72
|
+
android:layout_height="wrap_content"
|
|
73
|
+
android:layout_marginEnd="20dp"
|
|
74
|
+
android:layout_marginStart="20dp"
|
|
75
|
+
android:layout_marginTop="10dp"
|
|
76
|
+
android:layout_toStartOf="@+id/done_drawing_tv"
|
|
77
|
+
android:padding="10dp"
|
|
78
|
+
android:shadowColor="#000000"
|
|
79
|
+
android:shadowDx="1"
|
|
80
|
+
android:shadowDy="1"
|
|
81
|
+
android:shadowRadius="2"
|
|
82
|
+
android:text="@string/erase"
|
|
83
|
+
android:textColor="#FFFFFF"
|
|
84
|
+
android:textSize="20sp"
|
|
85
|
+
android:visibility="gone" />
|
|
86
|
+
|
|
87
|
+
<androidx.recyclerview.widget.RecyclerView
|
|
88
|
+
android:id="@+id/drawing_view_color_picker_recycler_view"
|
|
89
|
+
android:layout_width="match_parent"
|
|
90
|
+
android:layout_height="wrap_content"
|
|
91
|
+
android:layout_alignParentBottom="true" />
|
|
92
|
+
|
|
93
|
+
<View
|
|
94
|
+
android:id="@+id/top_shadow"
|
|
95
|
+
android:layout_width="match_parent"
|
|
96
|
+
android:layout_height="100dp"
|
|
97
|
+
android:layout_alignParentTop="true"
|
|
98
|
+
android:background="@drawable/fading_shadow" />
|
|
99
|
+
|
|
100
|
+
<RelativeLayout
|
|
101
|
+
android:id="@+id/top_parent_rl"
|
|
102
|
+
android:layout_width="match_parent"
|
|
103
|
+
android:layout_height="wrap_content"
|
|
104
|
+
android:layout_alignBottom="@+id/top_shadow"
|
|
105
|
+
android:layout_alignTop="@+id/top_shadow"
|
|
106
|
+
android:paddingLeft="5dp"
|
|
107
|
+
android:paddingRight="5dp">
|
|
108
|
+
|
|
109
|
+
<TextView
|
|
110
|
+
android:id="@+id/close_tv"
|
|
111
|
+
android:layout_width="wrap_content"
|
|
112
|
+
android:layout_height="wrap_content"
|
|
113
|
+
android:padding="15dp"
|
|
114
|
+
android:text="@string/ic_close"
|
|
115
|
+
android:textColor="#FFFFFF"
|
|
116
|
+
android:textSize="20sp" />
|
|
117
|
+
|
|
118
|
+
<TextView
|
|
119
|
+
android:id="@+id/add_text_tv"
|
|
120
|
+
android:layout_width="wrap_content"
|
|
121
|
+
android:layout_height="wrap_content"
|
|
122
|
+
android:layout_alignParentEnd="true"
|
|
123
|
+
android:layout_alignParentTop="true"
|
|
124
|
+
android:padding="15dp"
|
|
125
|
+
android:text="@string/ic_text"
|
|
126
|
+
android:textColor="#FFFFFF"
|
|
127
|
+
android:textSize="20sp" />
|
|
128
|
+
|
|
129
|
+
<TextView
|
|
130
|
+
android:id="@+id/add_pencil_tv"
|
|
131
|
+
android:layout_width="wrap_content"
|
|
132
|
+
android:layout_height="wrap_content"
|
|
133
|
+
android:layout_toStartOf="@+id/add_text_tv"
|
|
134
|
+
android:padding="15dp"
|
|
135
|
+
android:text="@string/ic_draw"
|
|
136
|
+
android:textColor="#FFFFFF"
|
|
137
|
+
android:textSize="20sp" />
|
|
138
|
+
<TextView
|
|
139
|
+
android:id="@+id/add_rotate_tv"
|
|
140
|
+
android:layout_width="wrap_content"
|
|
141
|
+
android:layout_height="wrap_content"
|
|
142
|
+
android:layout_toStartOf="@+id/add_pencil_tv"
|
|
143
|
+
android:padding="15dp"
|
|
144
|
+
android:text="@string/ic_rotate"
|
|
145
|
+
android:textColor="#FFFFFF"
|
|
146
|
+
android:textSize="20sp" />
|
|
147
|
+
<TextView
|
|
148
|
+
android:id="@+id/add_crop_tv"
|
|
149
|
+
android:layout_width="wrap_content"
|
|
150
|
+
android:layout_height="wrap_content"
|
|
151
|
+
android:layout_toStartOf="@+id/add_rotate_tv"
|
|
152
|
+
android:padding="15dp"
|
|
153
|
+
android:text="@string/ic_crop"
|
|
154
|
+
android:textColor="#FFFFFF"
|
|
155
|
+
android:textSize="20sp" />
|
|
156
|
+
|
|
157
|
+
<TextView
|
|
158
|
+
android:id="@+id/add_image_emoji_tv"
|
|
159
|
+
android:layout_width="wrap_content"
|
|
160
|
+
android:layout_height="wrap_content"
|
|
161
|
+
android:layout_toStartOf="@+id/add_crop_tv"
|
|
162
|
+
android:padding="15dp"
|
|
163
|
+
android:text="@string/ic_images"
|
|
164
|
+
android:textColor="#FFFFFF"
|
|
165
|
+
android:textSize="20sp" />
|
|
166
|
+
|
|
167
|
+
</RelativeLayout>
|
|
168
|
+
|
|
169
|
+
<View
|
|
170
|
+
android:id="@+id/bottom_shadow"
|
|
171
|
+
android:layout_width="match_parent"
|
|
172
|
+
android:layout_height="100dp"
|
|
173
|
+
android:layout_alignParentBottom="true"
|
|
174
|
+
android:background="@drawable/below_shadow" />
|
|
175
|
+
|
|
176
|
+
<RelativeLayout
|
|
177
|
+
android:id="@+id/bottom_parent_rl"
|
|
178
|
+
android:layout_width="match_parent"
|
|
179
|
+
android:layout_height="wrap_content"
|
|
180
|
+
android:layout_alignBottom="@+id/bottom_shadow"
|
|
181
|
+
android:layout_alignTop="@+id/bottom_shadow"
|
|
182
|
+
android:paddingLeft="26dp"
|
|
183
|
+
android:paddingRight="26dp">
|
|
184
|
+
|
|
185
|
+
<TextView
|
|
186
|
+
android:id="@+id/save_tv"
|
|
187
|
+
android:layout_width="wrap_content"
|
|
188
|
+
android:layout_height="wrap_content"
|
|
189
|
+
android:layout_alignParentStart="true"
|
|
190
|
+
android:layout_centerVertical="true"
|
|
191
|
+
android:gravity="center"
|
|
192
|
+
android:text="@string/ic_save"
|
|
193
|
+
android:textColor="#FFFFFF"
|
|
194
|
+
android:textSize="25sp" />
|
|
195
|
+
|
|
196
|
+
<TextView
|
|
197
|
+
android:id="@+id/clear_all_tv"
|
|
198
|
+
android:layout_width="wrap_content"
|
|
199
|
+
android:layout_height="wrap_content"
|
|
200
|
+
android:layout_centerVertical="true"
|
|
201
|
+
android:layout_marginStart="20dp"
|
|
202
|
+
android:layout_marginTop="4dp"
|
|
203
|
+
android:layout_toEndOf="@+id/save_tv"
|
|
204
|
+
android:gravity="center"
|
|
205
|
+
android:text="@string/ic_clear_all"
|
|
206
|
+
android:textColor="#FFFFFF"
|
|
207
|
+
android:textSize="25sp" />
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
<TextView
|
|
211
|
+
android:id="@+id/undo_tv"
|
|
212
|
+
android:layout_width="wrap_content"
|
|
213
|
+
android:layout_height="wrap_content"
|
|
214
|
+
android:layout_alignEnd="@+id/undo_text_tv"
|
|
215
|
+
android:layout_centerVertical="true"
|
|
216
|
+
android:layout_marginStart="20dp"
|
|
217
|
+
android:layout_marginTop="4dp"
|
|
218
|
+
android:layout_toEndOf="@+id/clear_all_tv"
|
|
219
|
+
android:gravity="center"
|
|
220
|
+
android:text="@string/ic_clear_all"
|
|
221
|
+
android:textColor="#FFFFFF"
|
|
222
|
+
android:textSize="25sp"
|
|
223
|
+
android:visibility="gone" />
|
|
224
|
+
|
|
225
|
+
<TextView
|
|
226
|
+
android:id="@+id/undo_text_tv"
|
|
227
|
+
android:layout_width="wrap_content"
|
|
228
|
+
android:layout_height="wrap_content"
|
|
229
|
+
android:layout_below="@+id/clear_all_tv"
|
|
230
|
+
android:layout_centerVertical="true"
|
|
231
|
+
android:layout_marginStart="20dp"
|
|
232
|
+
android:layout_marginTop="4dp"
|
|
233
|
+
android:layout_toEndOf="@+id/clear_all_tv"
|
|
234
|
+
android:text="@string/undo"
|
|
235
|
+
android:textColor="#FFFFFF"
|
|
236
|
+
android:textSize="15sp"
|
|
237
|
+
android:visibility="gone" />
|
|
238
|
+
|
|
239
|
+
<TextView
|
|
240
|
+
android:id="@+id/go_to_next_screen_tv"
|
|
241
|
+
android:layout_width="wrap_content"
|
|
242
|
+
android:layout_height="wrap_content"
|
|
243
|
+
android:layout_alignParentEnd="true"
|
|
244
|
+
android:layout_centerVertical="true"
|
|
245
|
+
android:text="@string/ic_continue"
|
|
246
|
+
android:textColor="#FFFFFF"
|
|
247
|
+
android:textSize="40sp" />
|
|
248
|
+
|
|
249
|
+
</RelativeLayout>
|
|
250
|
+
|
|
251
|
+
<RelativeLayout
|
|
252
|
+
android:id="@+id/delete_rl"
|
|
253
|
+
android:layout_width="match_parent"
|
|
254
|
+
android:layout_height="wrap_content"
|
|
255
|
+
android:layout_alignParentBottom="true"
|
|
256
|
+
android:padding="20dp"
|
|
257
|
+
android:visibility="gone">
|
|
258
|
+
|
|
259
|
+
<TextView
|
|
260
|
+
android:id="@+id/delete_tv"
|
|
261
|
+
android:layout_width="wrap_content"
|
|
262
|
+
android:layout_height="wrap_content"
|
|
263
|
+
android:layout_centerInParent="true"
|
|
264
|
+
android:background="@drawable/rounded_border_text_view"
|
|
265
|
+
android:padding="10dp"
|
|
266
|
+
android:text="@string/ic_delete"
|
|
267
|
+
android:textColor="#FFFFFF"
|
|
268
|
+
android:textSize="30sp" />
|
|
269
|
+
|
|
270
|
+
</RelativeLayout>
|
|
271
|
+
|
|
272
|
+
</RelativeLayout>
|
|
273
|
+
|
|
274
|
+
<RelativeLayout
|
|
275
|
+
android:id="@+id/image_emoji_bottom_sheet"
|
|
276
|
+
android:layout_width="match_parent"
|
|
277
|
+
android:layout_height="match_parent">
|
|
278
|
+
|
|
279
|
+
<com.ahmedadeltito.photoeditor.widget.RealtimeBlurView
|
|
280
|
+
android:layout_width="match_parent"
|
|
281
|
+
android:layout_height="match_parent"
|
|
282
|
+
app:realtimeBlurRadius="10dp"
|
|
283
|
+
app:realtimeOverlayColor="#33ffffff" />
|
|
284
|
+
|
|
285
|
+
<com.viewpagerindicator.CirclePageIndicator
|
|
286
|
+
android:id="@+id/image_emoji_indicator"
|
|
287
|
+
android:layout_width="wrap_content"
|
|
288
|
+
android:layout_height="wrap_content"
|
|
289
|
+
android:layout_centerHorizontal="true"
|
|
290
|
+
android:layout_gravity="center_horizontal"
|
|
291
|
+
android:padding="12dp"
|
|
292
|
+
app:fillColor="#999999"
|
|
293
|
+
app:pageColor="#e7e7e7" />
|
|
294
|
+
|
|
295
|
+
<androidx.viewpager.widget.ViewPager
|
|
296
|
+
android:id="@+id/image_emoji_view_pager"
|
|
297
|
+
android:layout_width="match_parent"
|
|
298
|
+
android:layout_height="match_parent"
|
|
299
|
+
android:layout_below="@+id/image_emoji_indicator" />
|
|
300
|
+
|
|
301
|
+
</RelativeLayout>
|
|
302
|
+
|
|
303
|
+
</com.ahmedadeltito.photoeditor.widget.SlidingUpPanelLayout>
|
|
304
|
+
<FrameLayout
|
|
305
|
+
android:id="@+id/overlay"
|
|
306
|
+
android:layout_width="match_parent"
|
|
307
|
+
android:layout_height="match_parent"
|
|
308
|
+
android:background="#80000000"
|
|
309
|
+
android:visibility="gone">
|
|
310
|
+
|
|
311
|
+
<ProgressBar
|
|
312
|
+
android:layout_width="wrap_content"
|
|
313
|
+
android:layout_height="wrap_content"
|
|
314
|
+
android:layout_gravity="center"/>
|
|
315
|
+
</FrameLayout>
|
|
316
|
+
</RelativeLayout>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
android:layout_width="match_parent"
|
|
3
|
+
android:layout_height="match_parent"
|
|
4
|
+
android:background="#B3000000"
|
|
5
|
+
android:orientation="vertical">
|
|
6
|
+
|
|
7
|
+
<TextView
|
|
8
|
+
android:id="@+id/add_text_done_tv"
|
|
9
|
+
android:layout_width="wrap_content"
|
|
10
|
+
android:layout_height="wrap_content"
|
|
11
|
+
android:layout_alignParentEnd="true"
|
|
12
|
+
android:layout_alignParentRight="true"
|
|
13
|
+
android:layout_alignParentTop="true"
|
|
14
|
+
android:layout_margin="20dp"
|
|
15
|
+
android:background="@drawable/rounded_border_text_view"
|
|
16
|
+
android:padding="10dp"
|
|
17
|
+
android:text="@string/done"
|
|
18
|
+
android:textAllCaps="false"
|
|
19
|
+
android:textColor="@color/white"
|
|
20
|
+
android:textSize="15sp" />
|
|
21
|
+
|
|
22
|
+
<EditText
|
|
23
|
+
android:id="@+id/add_text_edit_text"
|
|
24
|
+
style="@style/EditText"
|
|
25
|
+
android:layout_width="match_parent"
|
|
26
|
+
android:layout_height="match_parent"
|
|
27
|
+
android:layout_above="@+id/add_text_color_picker_relative_layout"
|
|
28
|
+
android:layout_below="@+id/add_text_done_tv"
|
|
29
|
+
android:background="@null"
|
|
30
|
+
android:gravity="center"
|
|
31
|
+
android:inputType="textMultiLine"
|
|
32
|
+
android:textSize="40sp" />
|
|
33
|
+
|
|
34
|
+
<RelativeLayout
|
|
35
|
+
android:id="@+id/add_text_color_picker_relative_layout"
|
|
36
|
+
android:layout_width="match_parent"
|
|
37
|
+
android:layout_height="wrap_content"
|
|
38
|
+
android:layout_alignParentBottom="true">
|
|
39
|
+
|
|
40
|
+
<androidx.recyclerview.widget.RecyclerView
|
|
41
|
+
android:id="@+id/add_text_color_picker_recycler_view"
|
|
42
|
+
android:layout_width="match_parent"
|
|
43
|
+
android:layout_height="wrap_content" />
|
|
44
|
+
|
|
45
|
+
</RelativeLayout>
|
|
46
|
+
|
|
47
|
+
</RelativeLayout>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
android:layout_width="wrap_content"
|
|
3
|
+
android:layout_height="wrap_content"
|
|
4
|
+
android:padding="6dp">
|
|
5
|
+
|
|
6
|
+
<View
|
|
7
|
+
android:id="@+id/color_picker_view"
|
|
8
|
+
android:layout_width="30dp"
|
|
9
|
+
android:layout_height="30dp"
|
|
10
|
+
android:layout_alignParentTop="true"
|
|
11
|
+
android:layout_marginStart="6dp"
|
|
12
|
+
android:layout_marginBottom="6dp"
|
|
13
|
+
android:background="@color/white" />
|
|
14
|
+
|
|
15
|
+
</RelativeLayout>
|