├── WhatsAppStickers
├── app
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── refs.xml
│ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── drawable
│ │ │ │ │ ├── sticker.jpg
│ │ │ │ │ ├── ripple.xml
│ │ │ │ │ ├── selector_bottom_menu_item.xml
│ │ │ │ │ ├── ic_outline_add_24px.xml
│ │ │ │ │ ├── btn_green.xml
│ │ │ │ │ ├── ic_outline_save_24px.xml
│ │ │ │ │ ├── ic_round_explore_24px.xml
│ │ │ │ │ ├── ic_round_home_24px.xml
│ │ │ │ │ ├── ic_round_create_24px.xml
│ │ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ │ ├── done.png
│ │ │ │ │ ├── intro_pencil.png
│ │ │ │ │ ├── intro_magic_wand.png
│ │ │ │ │ ├── intro_magnifier.png
│ │ │ │ │ ├── sticker_3rdparty_wa.png
│ │ │ │ │ ├── sticker_3rdparty_add.png
│ │ │ │ │ ├── sticker_3rdparty_added.png
│ │ │ │ │ ├── sticker_3rdparty_email.png
│ │ │ │ │ ├── sticker_3rdparty_info.png
│ │ │ │ │ ├── sticker_3rdparty_web.png
│ │ │ │ │ ├── sticker_3rdparty_privacy.png
│ │ │ │ │ ├── magnifier_selector.xml
│ │ │ │ │ ├── pencil_selector.xml
│ │ │ │ │ ├── magic_selector.xml
│ │ │ │ │ ├── redo_selector.xml
│ │ │ │ │ ├── undo_selector.xml
│ │ │ │ │ ├── ic_round_check_24px.xml
│ │ │ │ │ ├── ic_round_undo_24px.xml
│ │ │ │ │ ├── ic_round_redo_24px.xml
│ │ │ │ │ ├── ic_round_undo_inactive_24px.xml
│ │ │ │ │ ├── ic_round_redo_inactive_24px.xml
│ │ │ │ │ ├── ic_pencil.xml
│ │ │ │ │ ├── ic_magic_wand.xml
│ │ │ │ │ ├── ic_zoom.xml
│ │ │ │ │ └── ic_zoom_inactive.xml
│ │ │ │ ├── font
│ │ │ │ │ ├── googlesans_bold.ttf
│ │ │ │ │ ├── googlesans_italic.ttf
│ │ │ │ │ ├── googlesans_medium.ttf
│ │ │ │ │ ├── googlesans_regular.ttf
│ │ │ │ │ ├── googlesans_bolditalic.ttf
│ │ │ │ │ ├── googlesans_mediumitalic.ttf
│ │ │ │ │ └── google_sans.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ ├── sticker_error.png
│ │ │ │ │ ├── btn_green_normal.9.png
│ │ │ │ │ ├── btn_green_pressed.9.png
│ │ │ │ │ ├── sticker_3rdparty_add.png
│ │ │ │ │ ├── sticker_3rdparty_wa.png
│ │ │ │ │ ├── sticker_3rdparty_web.png
│ │ │ │ │ ├── sticker_3rdparty_added.png
│ │ │ │ │ ├── sticker_3rdparty_email.png
│ │ │ │ │ ├── sticker_3rdparty_info.png
│ │ │ │ │ └── sticker_3rdparty_privacy.png
│ │ │ │ ├── drawable-hdpi
│ │ │ │ │ ├── sticker_3rdparty_add.png
│ │ │ │ │ ├── sticker_3rdparty_wa.png
│ │ │ │ │ ├── sticker_3rdparty_web.png
│ │ │ │ │ ├── sticker_3rdparty_added.png
│ │ │ │ │ ├── sticker_3rdparty_email.png
│ │ │ │ │ ├── sticker_3rdparty_info.png
│ │ │ │ │ ├── sticker_3rdparty_privacy.png
│ │ │ │ │ ├── ic_pencil_inactive.xml
│ │ │ │ │ └── ic_magic_wand_inactive.xml
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ ├── sticker_3rdparty_wa.png
│ │ │ │ │ ├── sticker_3rdparty_add.png
│ │ │ │ │ ├── sticker_3rdparty_info.png
│ │ │ │ │ ├── sticker_3rdparty_web.png
│ │ │ │ │ ├── sticker_3rdparty_added.png
│ │ │ │ │ ├── sticker_3rdparty_email.png
│ │ │ │ │ └── sticker_3rdparty_privacy.png
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── menu
│ │ │ │ │ ├── menu_new_sticker_pack.xml
│ │ │ │ │ ├── sticker_menu.xml
│ │ │ │ │ ├── toolbar.xml
│ │ │ │ │ ├── sticker_option_menu.xml
│ │ │ │ │ └── bottom_menu.xml
│ │ │ │ ├── values-v23
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── layout
│ │ │ │ │ ├── sticker_pack_list_item_image.xml
│ │ │ │ │ ├── fragment_explore.xml
│ │ │ │ │ ├── activity_entry.xml
│ │ │ │ │ ├── activity_sticker_pack_list.xml
│ │ │ │ │ ├── activity_add_to_sticker_pack.xml
│ │ │ │ │ ├── sticker_image.xml
│ │ │ │ │ ├── sticker_created_item.xml
│ │ │ │ │ ├── activity_main.xml
│ │ │ │ │ ├── activity_sticker_pack_info.xml
│ │ │ │ │ ├── activity_request_permission.xml
│ │ │ │ │ ├── fragment_create.xml
│ │ │ │ │ ├── sticker_packs_list_item.xml
│ │ │ │ │ ├── fragment_my_stickers.xml
│ │ │ │ │ ├── sticker_item_of_list.xml
│ │ │ │ │ ├── activity_new_sticker_pack.xml
│ │ │ │ │ ├── activity_photo_edit.xml
│ │ │ │ │ └── sticker_pack_details.xml
│ │ │ │ └── drawable-v24
│ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── unusualapps
│ │ │ │ │ └── whatsappstickers
│ │ │ │ │ ├── constants
│ │ │ │ │ └── Constants.java
│ │ │ │ │ ├── whatsapp_api
│ │ │ │ │ ├── StickerPreviewViewHolder.java
│ │ │ │ │ ├── BottomFadingRecyclerView.java
│ │ │ │ │ ├── StickerPackListItemViewHolder.java
│ │ │ │ │ ├── Sticker.java
│ │ │ │ │ ├── BaseActivity.java
│ │ │ │ │ ├── StickerPreviewAdapter.java
│ │ │ │ │ ├── WhitelistCheck.java
│ │ │ │ │ ├── StickerPackInfoActivity.java
│ │ │ │ │ ├── StickerPack.java
│ │ │ │ │ └── AddStickerPackActivity.java
│ │ │ │ │ ├── activities
│ │ │ │ │ ├── AddToStickerPackActivity.java
│ │ │ │ │ ├── ExploreFragment.java
│ │ │ │ │ ├── RequestPermissionActivity.java
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MyStickersFragment.java
│ │ │ │ │ ├── utils
│ │ │ │ │ ├── RequestPermissionsHelper.java
│ │ │ │ │ ├── ImageUtils.java
│ │ │ │ │ ├── FileUtils.java
│ │ │ │ │ └── StickerPacksManager.java
│ │ │ │ │ ├── identities
│ │ │ │ │ └── StickerPacksContainer.java
│ │ │ │ │ └── backgroundRemover
│ │ │ │ │ ├── SaveDrawingTask.java
│ │ │ │ │ ├── BitmapUtility.java
│ │ │ │ │ ├── IntroActivity.java
│ │ │ │ │ └── CutOut.java
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── unusualapps
│ │ │ │ └── whatsappstickers
│ │ │ │ └── ExampleUnitTest.kt
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── unusualapps
│ │ │ └── whatsappstickers
│ │ │ └── ExampleInstrumentedTest.kt
│ ├── proguard-rules.pro
│ └── build.gradle
├── settings.gradle
├── .idea
│ ├── caches
│ │ └── gradle_models.ser
│ ├── vcs.xml
│ ├── misc.xml
│ ├── runConfigurations.xml
│ ├── gradle.xml
│ └── codeStyles
│ │ └── Project.xml
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── gradle.properties
├── gradlew.bat
└── gradlew
├── .gitignore
├── LICENSE.md
└── README.md
/WhatsAppStickers/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/WhatsAppStickers/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/WhatsAppStickers/.idea/caches/gradle_models.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/.idea/caches/gradle_models.ser
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/values/refs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/WhatsAppStickers/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/sticker.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable/sticker.jpg
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/done.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/font/googlesans_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/font/googlesans_bold.ttf
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/font/googlesans_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/font/googlesans_italic.ttf
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/font/googlesans_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/font/googlesans_medium.ttf
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/font/googlesans_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/font/googlesans_regular.ttf
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/font/googlesans_bolditalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/font/googlesans_bolditalic.ttf
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_error.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/intro_pencil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/intro_pencil.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/font/googlesans_mediumitalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/font/googlesans_mediumitalic.ttf
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
5 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_add.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_wa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_wa.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_web.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_wa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_wa.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/btn_green_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/btn_green_normal.9.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/intro_magic_wand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/intro_magic_wand.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/intro_magnifier.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/intro_magnifier.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_added.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_added.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_email.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_info.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_add.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_info.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_web.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/btn_green_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/btn_green_pressed.9.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_add.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_wa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_wa.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_web.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_wa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_wa.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_privacy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-hdpi/sticker_3rdparty_privacy.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_added.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_added.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_email.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_privacy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xhdpi/sticker_3rdparty_privacy.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_added.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_added.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_email.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_info.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_add.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_added.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_added.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_email.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_info.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_web.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_privacy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxhdpi/sticker_3rdparty_privacy.png
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_privacy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nikovega21/whatsapp-sticker-maker/HEAD/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/sticker_3rdparty_privacy.png
--------------------------------------------------------------------------------
/WhatsAppStickers/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WhatsAppStickers/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches/build_file_checksums.ser
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | .DS_Store
9 | /build
10 | /captures
11 | .externalNativeBuild
12 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/ripple.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/WhatsAppStickers/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Jan 20 11:50:59 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/selector_bottom_menu_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/magnifier_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/pencil_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/magic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/redo_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/undo_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/menu/menu_new_sticker_pack.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/menu/sticker_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/ic_outline_add_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/font/google_sans.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/btn_green.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/menu/toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/menu/sticker_option_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/test/java/com/unusualapps/whatsappstickers/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/values-v23/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 |
15 | # Gradle files
16 | .gradle/
17 | build/
18 |
19 | # Local configuration file (sdk path, etc)
20 | local.properties
21 |
22 | # Proguard folder generated by Eclipse
23 | proguard/
24 |
25 | # Log Files
26 | *.log
27 |
28 | # Android Studio Navigation editor temp files
29 | .navigation/
30 |
31 | # Android Studio captures folder
32 | captures/
33 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/sticker_pack_list_item_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/constants/Constants.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.constants;
2 |
3 | import android.os.Environment;
4 |
5 | public class Constants {
6 |
7 | public final static String STICKERS_DIRECTORY_PATH = Environment.getExternalStorageDirectory() + "/stickerPacks/";
8 | public final static String STICKERS_CREATED_DIRECTORY_PATH = Environment.getExternalStorageDirectory() + "/stickersCreated/";
9 | public final static int STICKER_PACK_IDENTIFIER_LENGHT = 20;
10 | }
11 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/ic_outline_save_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/ic_round_check_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/ic_round_explore_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/ic_round_home_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/ic_round_create_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/ic_round_undo_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/ic_round_redo_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/ic_round_undo_inactive_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/ic_round_redo_inactive_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/fragment_explore.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/WhatsAppStickers/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.3.0'
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | google()
19 | jcenter()
20 | maven { url 'https://jitpack.io' }
21 | }
22 | }
23 |
24 | task clean(type: Delete) {
25 | delete rootProject.buildDir
26 | }
27 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/activity_entry.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
11 |
12 |
18 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/ic_pencil.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WhatsAppStickers/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-hdpi/ic_pencil_inactive.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/androidTest/java/com/unusualapps/whatsappstickers/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers
2 |
3 | import android.support.test.InstrumentationRegistry
4 | import android.support.test.runner.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getTargetContext()
22 | assertEquals("com.unusualapps.whatsappstickers", appContext.packageName)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 80dp
6 | 8dp
7 | 8dp
8 | 50dp
9 | 4dp
10 | 4dp
11 |
12 | 16dp
13 | 16dp
14 |
15 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/StickerPreviewViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.support.v7.widget.RecyclerView;
12 | import android.view.View;
13 |
14 | import com.facebook.drawee.view.SimpleDraweeView;
15 | import com.unusualapps.whatsappstickers.R;
16 |
17 | public class StickerPreviewViewHolder extends RecyclerView.ViewHolder {
18 |
19 | public SimpleDraweeView stickerPreviewView;
20 |
21 | StickerPreviewViewHolder(final View itemView) {
22 | super(itemView);
23 | stickerPreviewView = itemView.findViewById(R.id.sticker_preview);
24 | }
25 | }
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/menu/bottom_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/activity_sticker_pack_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/activity_add_to_sticker_pack.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/sticker_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/ic_magic_wand.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # License
2 |
3 | MIT License
4 |
5 | Copyright (c) 2019 [nikovega21]
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8 |
9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10 |
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-hdpi/ic_magic_wand_inactive.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | #ffffff
8 | #BABABA
9 | #128c7e
10 | #B3B3B3
11 | #EBEBEB
12 | @color/colorAccent
13 |
14 |
15 | #b7000000
16 | #FFFFFF
17 | #b7000000
18 | #ff303e
19 | #fcfcfc
20 | #373737
21 | #E64E4E
22 | #4E5DE6
23 |
24 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/sticker_created_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
15 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/BottomFadingRecyclerView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.content.Context;
12 | import android.support.annotation.Nullable;
13 | import android.support.v7.widget.RecyclerView;
14 | import android.util.AttributeSet;
15 |
16 | public class BottomFadingRecyclerView extends RecyclerView {
17 | public BottomFadingRecyclerView(Context context) {
18 | super(context);
19 | }
20 |
21 | public BottomFadingRecyclerView(Context context, @Nullable AttributeSet attrs) {
22 | super(context, attrs);
23 | }
24 |
25 | public BottomFadingRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
26 | super(context, attrs, defStyle);
27 | }
28 |
29 | @Override
30 | protected float getTopFadingEdgeStrength() {
31 | return 0.0f;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/activities/AddToStickerPackActivity.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.activities;
2 |
3 | import android.net.Uri;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.widget.Toast;
7 | import com.unusualapps.whatsappstickers.R;
8 | import com.unusualapps.whatsappstickers.identities.StickerPacksContainer;
9 | import com.unusualapps.whatsappstickers.utils.StickerPacksManager;
10 |
11 | import java.util.ArrayList;
12 |
13 | public class AddToStickerPackActivity extends AppCompatActivity {
14 |
15 | Uri stickerUri;
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_add_to_sticker_pack);
21 | this.stickerUri = this.getIntent().getData();
22 | StickerPacksManager.stickerPacksContainer = new StickerPacksContainer("", "", StickerPacksManager.getStickerPacks(this));
23 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
24 | Toast.makeText(this, stickerUri.getPath(), Toast.LENGTH_LONG).show();
25 | }
26 | }
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/activities/ExploreFragment.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.activities;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import com.unusualapps.whatsappstickers.R;
9 |
10 | public class ExploreFragment extends Fragment {
11 |
12 | public ExploreFragment() {
13 | // Required empty public constructor
14 | }
15 |
16 | // TODO: Rename and change types and number of parameters
17 | public static ExploreFragment newInstance(String param1, String param2) {
18 | ExploreFragment fragment = new ExploreFragment();
19 | return fragment;
20 | }
21 |
22 | @Override
23 | public void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | }
26 |
27 | @Override
28 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
29 | Bundle savedInstanceState) {
30 | // Inflate the layout for this fragment
31 | return inflater.inflate(R.layout.fragment_explore, container, false);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/utils/RequestPermissionsHelper.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.utils;
2 |
3 | import android.Manifest;
4 | import android.app.Activity;
5 | import android.content.Context;
6 | import android.content.pm.PackageManager;
7 | import android.support.v4.app.ActivityCompat;
8 | import android.support.v4.content.ContextCompat;
9 |
10 | public class RequestPermissionsHelper {
11 |
12 | private static final int CODE_REQUEST_WRITE_READ_EXTERNAL_STORAGE = 0;
13 |
14 | public static boolean verifyPermissions(Context context) {
15 | int permissionToWriteCheck = ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE);
16 | int permissionToReadCheck = ContextCompat.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE);
17 |
18 | if (permissionToWriteCheck == PackageManager.PERMISSION_DENIED && permissionToReadCheck == PackageManager.PERMISSION_DENIED) {
19 | return false;
20 | } else return true;
21 | }
22 |
23 | public static void requestPermissions(Activity context) {
24 | ActivityCompat.requestPermissions(context, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}, CODE_REQUEST_WRITE_READ_EXTERNAL_STORAGE);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/StickerPackListItemViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.support.v7.widget.RecyclerView;
12 | import android.view.View;
13 | import android.widget.ImageView;
14 | import android.widget.LinearLayout;
15 | import android.widget.TextView;
16 | import com.unusualapps.whatsappstickers.R;
17 |
18 | public class StickerPackListItemViewHolder extends RecyclerView.ViewHolder {
19 |
20 | public View container;
21 | public TextView titleView;
22 | public TextView publisherView;
23 | public TextView filesizeView;
24 | public ImageView addButton;
25 | public LinearLayout imageRowView;
26 |
27 | StickerPackListItemViewHolder(final View itemView) {
28 | super(itemView);
29 | container = itemView;
30 | titleView = itemView.findViewById(R.id.sticker_pack_title);
31 | publisherView = itemView.findViewById(R.id.sticker_pack_publisher);
32 | filesizeView = itemView.findViewById(R.id.sticker_pack_filesize);
33 | addButton = itemView.findViewById(R.id.add_button_on_list);
34 | imageRowView = itemView.findViewById(R.id.sticker_packs_list_item_image_list);
35 | }
36 | }
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/Sticker.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.os.Parcel;
12 | import android.os.Parcelable;
13 |
14 | import java.util.List;
15 |
16 | public class Sticker implements Parcelable {
17 | public String imageFileName;
18 | List emojis;
19 | long size;
20 |
21 | public Sticker(String imageFileName, List emojis) {
22 | this.imageFileName = imageFileName;
23 | this.emojis = emojis;
24 | }
25 |
26 | protected Sticker(Parcel in) {
27 | imageFileName = in.readString();
28 | emojis = in.createStringArrayList();
29 | size = in.readLong();
30 | }
31 |
32 | public static final Creator CREATOR = new Creator() {
33 | @Override
34 | public Sticker createFromParcel(Parcel in) {
35 | return new Sticker(in);
36 | }
37 |
38 | @Override
39 | public Sticker[] newArray(int size) {
40 | return new Sticker[size];
41 | }
42 | };
43 |
44 | public void setSize(long size) {
45 | this.size = size;
46 | }
47 |
48 | @Override
49 | public int describeContents() {
50 | return 0;
51 | }
52 |
53 | @Override
54 | public void writeToParcel(Parcel dest, int flags) {
55 | dest.writeString(imageFileName);
56 | dest.writeStringList(emojis);
57 | dest.writeLong(size);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
18 |
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Whatsapp android sticker maker
2 |
3 | # Introduction
4 | What can you do with this app?:
5 |
6 | - Create stickers removing its background
7 | - Create stickerpacks and add it to whatsapp
8 |
9 | Additional information:
10 |
11 | - This is not a fully tested app so I could have some errors.
12 |
13 | - Some features of this app may not work.
14 |
15 | - Feel free to make any changes and make pull requests.
16 |
17 | # Libraries used
18 |
19 | - Android CutOut [https://github.com/GabrielBB/Android-CutOut]
20 | - Lottie [https://github.com/airbnb/lottie-android]
21 | - FishBun Image Chooser [https://github.com/sangcomz/FishBun]
22 | - Fresco [https://github.com/facebook/fresco]
23 |
24 | # License
25 |
26 | MIT License
27 |
28 | Copyright (c) 2019 [nikovega21]
29 |
30 | Permission is hereby granted, free of charge, to any person obtaining a copy
31 | of this software and associated documentation files (the "Software"), to deal
32 | in the Software without restriction, including without limitation the rights
33 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34 | copies of the Software, and to permit persons to whom the Software is
35 | furnished to do so, subject to the following conditions:
36 |
37 | The above copyright notice and this permission notice shall be included in all
38 | copies or substantial portions of the Software.
39 |
40 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
46 | SOFTWARE.
47 |
--------------------------------------------------------------------------------
/WhatsAppStickers/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/activities/RequestPermissionActivity.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.activities;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.annotation.NonNull;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.widget.Toast;
8 | import com.unusualapps.whatsappstickers.R;
9 | import com.unusualapps.whatsappstickers.utils.FileUtils;
10 | import com.unusualapps.whatsappstickers.utils.RequestPermissionsHelper;
11 |
12 | public class RequestPermissionActivity extends AppCompatActivity {
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_request_permission);
18 | FileUtils.initializeDirectories(this);
19 | if (RequestPermissionsHelper.verifyPermissions(this)) {
20 | startActivity(new Intent(this, MainActivity.class));
21 | this.finish();
22 | } else {
23 | RequestPermissionsHelper.requestPermissions(this);
24 | }
25 | findViewById(R.id.grant_permissions_button).setOnClickListener(v -> RequestPermissionsHelper.requestPermissions(this));
26 | }
27 |
28 | @Override
29 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
30 | super.onRequestPermissionsResult(requestCode, permissions, grantResults);
31 | FileUtils.initializeDirectories(this);
32 | if (RequestPermissionsHelper.verifyPermissions(this)) {//If the app has all the required permissions we pass to MainActivity to get started
33 | startActivity(new Intent(this, MainActivity.class));
34 | } else {
35 | Toast.makeText(this, "We need access to write and read files in your phone", Toast.LENGTH_SHORT).show();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/identities/StickerPacksContainer.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.identities;
2 |
3 | import com.unusualapps.whatsappstickers.whatsapp_api.Sticker;
4 | import com.unusualapps.whatsappstickers.whatsapp_api.StickerPack;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | public class StickerPacksContainer {
10 | private String androidPlayStoreLink;
11 | private String iosAppStoreLink;
12 | private List stickerPacks;
13 |
14 | public StickerPacksContainer() {
15 | stickerPacks = new ArrayList<>();
16 | }
17 |
18 | public StickerPacksContainer(String androidPlayStoreLink, String iosAppStoreLink, List stickerPacks) {
19 | this.androidPlayStoreLink = androidPlayStoreLink;
20 | this.iosAppStoreLink = iosAppStoreLink;
21 | this.stickerPacks = stickerPacks;
22 | }
23 |
24 | public void addStickerPack(StickerPack stickerPack) {
25 | this.stickerPacks.add(stickerPack);
26 | }
27 |
28 | public StickerPack removeStickerPack(int index) {
29 | return this.stickerPacks.remove(index);
30 | }
31 |
32 | public StickerPack getStickerPack(int index) {
33 | return this.stickerPacks.get(index);
34 | }
35 |
36 | public String getAndroidPlayStoreLink() {
37 | return androidPlayStoreLink;
38 | }
39 |
40 | public void setAndroidPlayStoreLink(String androidPlayStoreLink) {
41 | this.androidPlayStoreLink = androidPlayStoreLink;
42 | }
43 |
44 | public String getIosAppStoreLink() {
45 | return iosAppStoreLink;
46 | }
47 |
48 | public void setIosAppStoreLink(String iosAppStoreLink) {
49 | this.iosAppStoreLink = iosAppStoreLink;
50 | }
51 |
52 | public List getStickerPacks() {
53 | return stickerPacks;
54 | }
55 |
56 | public void setStickerPacks(List stickerPacks) {
57 | this.stickerPacks = stickerPacks;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/activity_sticker_pack_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
16 |
24 |
25 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/BaseActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.app.Dialog;
12 | import android.os.Bundle;
13 | import android.support.annotation.NonNull;
14 | import android.support.annotation.StringRes;
15 | import android.support.v4.app.DialogFragment;
16 | import android.support.v7.app.AlertDialog;
17 | import android.support.v7.app.AppCompatActivity;
18 |
19 | public abstract class BaseActivity extends AppCompatActivity {
20 | @Override
21 | public boolean onSupportNavigateUp() {
22 | onBackPressed();
23 | return true;
24 | }
25 |
26 | public static final class MessageDialogFragment extends DialogFragment {
27 | private static final String ARG_TITLE_ID = "title_id";
28 | private static final String ARG_MESSAGE = "message";
29 |
30 | public static DialogFragment newInstance(@StringRes int titleId, String message) {
31 | DialogFragment fragment = new MessageDialogFragment();
32 | Bundle arguments = new Bundle();
33 | arguments.putInt(ARG_TITLE_ID, titleId);
34 | arguments.putString(ARG_MESSAGE, message);
35 | fragment.setArguments(arguments);
36 | return fragment;
37 | }
38 |
39 | @NonNull
40 | @Override
41 | public Dialog onCreateDialog(Bundle savedInstanceState) {
42 | @StringRes final int title = getArguments().getInt(ARG_TITLE_ID);
43 | String message = getArguments().getString(ARG_MESSAGE);
44 |
45 | AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity())
46 | .setMessage(message)
47 | .setCancelable(true)
48 | .setPositiveButton(android.R.string.ok, (dialog, which) -> dismiss());
49 |
50 | if (title != 0) {
51 | dialogBuilder.setTitle(title);
52 | }
53 | return dialogBuilder.create();
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/backgroundRemover/SaveDrawingTask.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.backgroundRemover;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.graphics.Bitmap;
6 | import android.net.Uri;
7 | import android.os.AsyncTask;
8 | import android.util.Pair;
9 |
10 | import java.io.File;
11 | import java.io.FileOutputStream;
12 | import java.io.IOException;
13 | import java.lang.ref.WeakReference;
14 |
15 | import static android.view.View.VISIBLE;
16 |
17 | public class SaveDrawingTask extends AsyncTask> {
18 |
19 | private static final String SAVED_IMAGE_FORMAT = "png";
20 | private static final String SAVED_IMAGE_NAME = "cutout_tmp";
21 |
22 | private final WeakReference activityWeakReference;
23 |
24 | SaveDrawingTask(CutOutActivity activity) {
25 | this.activityWeakReference = new WeakReference<>(activity);
26 | }
27 |
28 | @Override
29 | protected void onPreExecute() {
30 | super.onPreExecute();
31 | activityWeakReference.get().loadingModal.setVisibility(VISIBLE);
32 | }
33 |
34 | @Override
35 | protected Pair doInBackground(Bitmap... bitmaps) {
36 |
37 | try {
38 | File file = File.createTempFile(SAVED_IMAGE_NAME, SAVED_IMAGE_FORMAT, activityWeakReference.get().getApplicationContext().getCacheDir());
39 |
40 | try (FileOutputStream out = new FileOutputStream(file)) {
41 | bitmaps[0].compress(Bitmap.CompressFormat.PNG, 95, out);
42 | return new Pair<>(file, null);
43 | }
44 | } catch (IOException e) {
45 | return new Pair<>(null, e);
46 | }
47 | }
48 |
49 | protected void onPostExecute(Pair result) {
50 | super.onPostExecute(result);
51 |
52 | Intent resultIntent = new Intent();
53 |
54 | if (result.first != null) {
55 | Uri uri = Uri.fromFile(result.first);
56 |
57 | resultIntent.putExtra(CutOut.CUTOUT_EXTRA_RESULT, uri);
58 | activityWeakReference.get().setResult(Activity.RESULT_OK, resultIntent);
59 | activityWeakReference.get().finish();
60 |
61 | } else {
62 | activityWeakReference.get().exitWithError(result.second);
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/backgroundRemover/BitmapUtility.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.backgroundRemover;
2 |
3 | import android.graphics.*;
4 |
5 | class BitmapUtility {
6 |
7 | static Bitmap getResizedBitmap(Bitmap bitmap, int width, int height) {
8 | Bitmap background = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
9 |
10 | float originalWidth = bitmap.getWidth();
11 | float originalHeight = bitmap.getHeight();
12 |
13 | Canvas canvas = new Canvas(background);
14 |
15 | float scale = width / originalWidth;
16 |
17 | float xTranslation = 0.0f;
18 | float yTranslation = (height - originalHeight * scale) / 2.0f;
19 |
20 | Matrix transformation = new Matrix();
21 | transformation.postTranslate(xTranslation, yTranslation);
22 | transformation.preScale(scale, scale);
23 |
24 | Paint paint = new Paint();
25 | paint.setFilterBitmap(true);
26 |
27 | canvas.drawBitmap(bitmap, transformation, paint);
28 |
29 | return background;
30 | }
31 |
32 | static Bitmap getBorderedBitmap(Bitmap image, int borderColor, int borderSize) {
33 |
34 | // Creating a canvas with an empty bitmap, this is the bitmap that gonna store the final canvas changes
35 | Bitmap finalImage = Bitmap.createBitmap(image.getWidth(), image.getHeight(), Bitmap.Config.ARGB_8888);
36 | Canvas canvas = new Canvas(finalImage);
37 |
38 | // Make a smaller copy of the image to draw on top of original
39 | Bitmap imageCopy = Bitmap.createScaledBitmap(image, image.getWidth() - borderSize, image.getHeight() - borderSize, true);
40 |
41 | // Let's draw the bigger image using a white paint brush
42 | Paint paint = new Paint();
43 | paint.setColorFilter(new PorterDuffColorFilter(borderColor, PorterDuff.Mode.SRC_ATOP));
44 | canvas.drawBitmap(image, 0, 0, paint);
45 |
46 | int width = image.getWidth();
47 | int height = image.getHeight();
48 | float centerX = (width - imageCopy.getWidth()) * 0.5f;
49 | float centerY = (height - imageCopy.getHeight()) * 0.5f;
50 | // Now let's draw the original image on top of the white image, passing a null paint because we want to keep it original
51 | canvas.drawBitmap(imageCopy, centerX, centerY, null);
52 |
53 | // Returning the image with the final results
54 | return finalImage;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/WhatsAppStickers/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/activity_request_permission.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
26 |
34 |
43 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/backgroundRemover/IntroActivity.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.backgroundRemover;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import com.github.paolorotolo.appintro.AppIntro;
8 | import com.github.paolorotolo.appintro.AppIntroFragment;
9 | import com.unusualapps.whatsappstickers.R;
10 |
11 | public class IntroActivity extends AppIntro {
12 | @Override
13 | protected void onCreate(@Nullable Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 |
16 | // Note here that we DO NOT use setContentView();
17 |
18 | // Add your slide fragments here.
19 | // AppIntro will automatically generate the dots indicator and buttons.
20 | addSlide(AppIntroFragment.newInstance(getString(R.string.intro_magic_title), getString(R.string.intro_magic_description), R.drawable.intro_magic_wand, getResources().getColor(R.color.intro_magic_background_color)));
21 | addSlide(AppIntroFragment.newInstance(getString(R.string.intro_manual_title), getString(R.string.intro_manual_description), R.drawable.intro_pencil, getResources().getColor(R.color.intro_manual_background_color)));
22 | addSlide(AppIntroFragment.newInstance(getString(R.string.intro_zoom_title), getString(R.string.intro_zoom_description), R.drawable.intro_magnifier, getResources().getColor(R.color.intro_zoom_background_color)));
23 |
24 | // OPTIONAL METHODS
25 | // Override bar/separator color.
26 | setBarColor(Color.parseColor("#3F51B5"));
27 | setSeparatorColor(Color.parseColor("#2196F3"));
28 |
29 | // Hide Skip/Done button.
30 | showSkipButton(false);
31 | setProgressButtonEnabled(true);
32 |
33 | // Turn vibration on and set intensity.
34 | // NOTE: you will probably need to ask VIBRATE permission in Manifest.
35 | setVibrate(false);
36 |
37 | setFadeAnimation();
38 | }
39 |
40 | @Override
41 | public void onSkipPressed(Fragment currentFragment) {
42 | super.onSkipPressed(currentFragment);
43 | // Do something when users tap on Skip button.
44 | finish();
45 | }
46 |
47 | @Override
48 | public void onDonePressed(Fragment currentFragment) {
49 | super.onDonePressed(currentFragment);
50 | // Do something when users tap on Done button.
51 | finish();
52 | }
53 |
54 | @Override
55 | public void onSlideChanged(@Nullable Fragment oldFragment, @Nullable Fragment newFragment) {
56 | super.onSlideChanged(oldFragment, newFragment);
57 | // Do something when the slide changes.
58 | }
59 | }
--------------------------------------------------------------------------------
/WhatsAppStickers/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | aaptOptions {
5 | noCompress "webp"
6 | }
7 | signingConfigs {
8 | signing_config {
9 | keyAlias 'abc'
10 | keyPassword '123'
11 | }
12 | }
13 | compileSdkVersion 28
14 | defaultConfig {
15 | applicationId "com.unusualapps.whatsappstickers"
16 | minSdkVersion 21
17 | targetSdkVersion 28
18 | versionCode 1
19 | versionName "1.0"
20 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
21 | def contentProviderAuthority = applicationId + ".stickercontentprovider"
22 | manifestPlaceholders = [contentProviderAuthority: contentProviderAuthority]
23 | buildConfigField("String", "CONTENT_PROVIDER_AUTHORITY", "\"${contentProviderAuthority}\"")
24 | }
25 | buildTypes {
26 | release {
27 | minifyEnabled false
28 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
29 | }
30 | }
31 | compileOptions {
32 | sourceCompatibility = '1.8'
33 | targetCompatibility = '1.8'
34 | }
35 | }
36 |
37 | dependencies {
38 | implementation fileTree(dir: 'libs', include: ['*.jar'])
39 | implementation 'com.android.support:appcompat-v7:28.0.0'
40 | implementation 'com.android.support:design:28.0.0'
41 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
42 | implementation 'com.android.support:support-v4:28.0.0'
43 | testImplementation 'junit:junit:4.12'
44 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
45 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
46 |
47 | //Third party libraries
48 | implementation "com.android.support:exifinterface:28.0.0"
49 | implementation 'com.facebook.fresco:fresco:1.11.0'
50 | implementation 'com.facebook.fresco:webpsupport:1.10.0'
51 | implementation 'com.facebook.fresco:animated-webp:1.10.0'
52 | implementation 'com.facebook.fresco:webpsupport:1.10.0'
53 | implementation 'com.google.code.gson:gson:2.8.5'
54 |
55 | implementation "com.airbnb.android:lottie:2.7.0"
56 | implementation 'com.sangcomz:FishBun:0.8.7'
57 | implementation 'com.github.bumptech.glide:glide:4.5.0'
58 |
59 | //background remover
60 | implementation 'com.github.duanhong169:checkerboarddrawable:1.0.2'
61 | implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
62 | implementation 'com.alexvasilkov:gesture-views:2.5.2'
63 | implementation 'com.github.apl-devs:appintro:v4.2.3'
64 | implementation 'com.github.jkwiecien:EasyImage:1.3.1'
65 | implementation 'com.android.support:recyclerview-v7:28.0.0'
66 | implementation 'com.github.florent37:depth:1.0.0'
67 | }
68 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/StickerPreviewAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.support.annotation.NonNull;
12 | import android.support.v7.widget.RecyclerView;
13 | import android.view.LayoutInflater;
14 | import android.view.View;
15 | import android.view.ViewGroup;
16 | import com.unusualapps.whatsappstickers.R;
17 | import com.unusualapps.whatsappstickers.utils.ImageUtils;
18 |
19 | public class StickerPreviewAdapter extends RecyclerView.Adapter {
20 |
21 | @NonNull
22 | private StickerPack stickerPack;
23 |
24 | private final int cellSize;
25 | private int cellLimit;
26 | private int cellPadding;
27 | private final int errorResource;
28 |
29 | private final LayoutInflater layoutInflater;
30 |
31 | public StickerPreviewAdapter(
32 | @NonNull final LayoutInflater layoutInflater,
33 | final int errorResource,
34 | final int cellSize,
35 | final int cellPadding,
36 | @NonNull final StickerPack stickerPack) {
37 | this.cellSize = cellSize;
38 | this.cellPadding = cellPadding;
39 | this.cellLimit = 0;
40 | this.layoutInflater = layoutInflater;
41 | this.errorResource = errorResource;
42 | this.stickerPack = stickerPack;
43 | }
44 |
45 | @NonNull
46 | @Override
47 | public StickerPreviewViewHolder onCreateViewHolder(@NonNull final ViewGroup viewGroup, final int i) {
48 | View itemView = layoutInflater.inflate(R.layout.sticker_image, viewGroup, false);
49 | StickerPreviewViewHolder vh = new StickerPreviewViewHolder(itemView);
50 |
51 | ViewGroup.LayoutParams layoutParams = vh.stickerPreviewView.getLayoutParams();
52 | layoutParams.height = cellSize;
53 | layoutParams.width = cellSize;
54 | vh.stickerPreviewView.setLayoutParams(layoutParams);
55 | vh.stickerPreviewView.setPadding(cellPadding, cellPadding, cellPadding, cellPadding);
56 |
57 | return vh;
58 | }
59 |
60 | @Override
61 | public void onBindViewHolder(@NonNull final StickerPreviewViewHolder stickerPreviewViewHolder, final int i) {
62 | stickerPreviewViewHolder.stickerPreviewView.setImageResource(errorResource);
63 | stickerPreviewViewHolder.stickerPreviewView.setImageURI(ImageUtils.getStickerImageAsset(stickerPack.identifier, stickerPack.getStickers().get(i).imageFileName));
64 | }
65 |
66 | @Override
67 | public int getItemCount() {
68 | int numberOfPreviewImagesInPack;
69 | numberOfPreviewImagesInPack = stickerPack.getStickers().size();
70 | if (cellLimit > 0) {
71 | return Math.min(numberOfPreviewImagesInPack, cellLimit);
72 | }
73 | return numberOfPreviewImagesInPack;
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | WhatsAppStickers
3 | Sticker Pack Tray Image
4 | More info about sticker pack
5 | Add to WhatsApp
6 | Add sticker pack to WhatsApp
7 | Sticker Packs
8 | •
9 | Sticker Pack
10 | Sticker details
11 | Info
12 | View webpage
13 | Send email
14 | Privacy policy
15 | Could not add this sticker pack. Please install the latest version of
16 | WhatsApp before adding sticker pack
17 |
18 | Error: %s \nSee logcat for stack trace.
19 | Error with the pack
20 | Tray icon
21 | Sticker pack added to WhatsApp
22 | Send email with
23 | Sticker pack not added. If you\'d like to add it, make sure you
24 | update to the latest version of WhatsApp.
25 |
26 | Update
27 | Google Play is not installed on the device.
28 |
29 |
30 | Hello blank fragment
31 | New sticker pack
32 |
33 |
34 | Name
35 | Author
36 | Select images
37 | Create sticker
38 |
39 |
40 | Automatic background clearing
41 | Manual background clearing
42 | Zooming and Moving the picture
43 | Use the Magic Wand tool and touch parts of the background you want to erase
44 |
45 | Use the Pencil tool to erase the background dragging your finger around the
46 | screen
47 |
48 | Use the Magnifier tool to Zoom in/out so you can make better cuts
49 | Quick look
50 | Choose an image to cut
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
19 |
20 |
27 |
28 |
36 |
37 |
43 |
44 |
52 |
53 |
57 |
58 |
70 |
71 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/WhitelistCheck.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.content.ContentResolver;
12 | import android.content.Context;
13 | import android.content.pm.ApplicationInfo;
14 | import android.content.pm.PackageManager;
15 | import android.content.pm.ProviderInfo;
16 | import android.database.Cursor;
17 | import android.net.Uri;
18 | import android.support.annotation.NonNull;
19 | import com.unusualapps.whatsappstickers.BuildConfig;
20 |
21 | @SuppressWarnings("FieldCanBeLocal")
22 | public class WhitelistCheck {
23 | private static final String AUTHORITY_QUERY_PARAM = "authority";
24 | private static final String IDENTIFIER_QUERY_PARAM = "identifier";
25 | private static String STICKER_APP_AUTHORITY = BuildConfig.CONTENT_PROVIDER_AUTHORITY;
26 | public static String CONSUMER_WHATSAPP_PACKAGE_NAME = "com.whatsapp";
27 | public static String SMB_WHATSAPP_PACKAGE_NAME = "com.whatsapp.w4b";
28 | private static String CONTENT_PROVIDER = ".provider.sticker_whitelist_check";
29 | private static String QUERY_PATH = "is_whitelisted";
30 | private static String QUERY_RESULT_COLUMN_NAME = "result";
31 |
32 | public static boolean isWhitelisted(@NonNull Context context, @NonNull String identifier) {
33 | try {
34 | boolean consumerResult = isWhitelistedFromProvider(context, identifier, CONSUMER_WHATSAPP_PACKAGE_NAME);
35 | boolean smbResult = isWhitelistedFromProvider(context, identifier, SMB_WHATSAPP_PACKAGE_NAME);
36 | return consumerResult && smbResult;
37 | } catch (Exception e) {
38 | return false;
39 | }
40 | }
41 |
42 | private static boolean isWhitelistedFromProvider(@NonNull Context context, @NonNull String identifier, String whatsappPackageName) {
43 | final PackageManager packageManager = context.getPackageManager();
44 | if (isPackageInstalled(whatsappPackageName, packageManager)) {
45 | final String whatsappProviderAuthority = whatsappPackageName + CONTENT_PROVIDER;
46 | final ProviderInfo providerInfo = packageManager.resolveContentProvider(whatsappProviderAuthority, PackageManager.GET_META_DATA);
47 | // provider is not there.
48 | if (providerInfo == null) {
49 | return false;
50 | }
51 | final Uri queryUri = new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT).authority(whatsappProviderAuthority).appendPath(QUERY_PATH).appendQueryParameter(AUTHORITY_QUERY_PARAM, STICKER_APP_AUTHORITY).appendQueryParameter(IDENTIFIER_QUERY_PARAM, identifier).build();
52 | try (final Cursor cursor = context.getContentResolver().query(queryUri, null, null, null, null)) {
53 | if (cursor != null && cursor.moveToFirst()) {
54 | final int whiteListResult = cursor.getInt(cursor.getColumnIndexOrThrow(QUERY_RESULT_COLUMN_NAME));
55 | return whiteListResult == 1;
56 | }
57 | }
58 | } else {
59 | //if app is not installed, then don't need to take into its whitelist info into account.
60 | return true;
61 | }
62 | return false;
63 | }
64 |
65 | public static boolean isPackageInstalled(String packageName, PackageManager packageManager) {
66 | try {
67 | final ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName, 0);
68 | //noinspection SimplifiableIfStatement
69 | if (applicationInfo != null) {
70 | return applicationInfo.enabled;
71 | } else {
72 | return false;
73 | }
74 | } catch (PackageManager.NameNotFoundException e) {
75 | return false;
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/utils/ImageUtils.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.graphics.Canvas;
7 | import android.graphics.Matrix;
8 | import android.media.ExifInterface;
9 | import android.net.Uri;
10 | import android.provider.MediaStore;
11 | import android.util.Log;
12 | import com.unusualapps.whatsappstickers.constants.Constants;
13 |
14 | import java.io.ByteArrayOutputStream;
15 | import java.io.File;
16 | import java.io.IOException;
17 |
18 | public class ImageUtils {
19 |
20 | static byte[] compressImageToBytes(Uri imageUri, int quality, int height, int width, Context context, Bitmap.CompressFormat format) throws IOException {
21 | Bitmap bitmap = MediaStore.Images.Media.getBitmap(context.getContentResolver(), imageUri);
22 | ExifInterface exif;
23 | exif = new ExifInterface(FileUtils.getImageRealPathFromURI(context, imageUri));
24 | int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0);
25 | Matrix matrix = new Matrix();
26 | if (orientation == 6) {
27 | matrix.postRotate(90);
28 | } else if (orientation == 3) {
29 | matrix.postRotate(180);
30 | } else if (orientation == 8) {
31 | matrix.postRotate(270);
32 | }
33 | Bitmap compressed = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
34 | Bitmap scaledBitmap = scaleBitmap(compressed, width, height);
35 | scaledBitmap = overlayBitmapToCenter(Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888), scaledBitmap);
36 | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
37 | scaledBitmap.compress(format, quality, byteArrayOutputStream);
38 | return byteArrayOutputStream.toByteArray();
39 |
40 | }
41 |
42 | public static Uri getStickerImageAsset(String identifier, String imageFileName) {
43 | return Uri.fromFile(new File(Constants.STICKERS_DIRECTORY_PATH + identifier + "/" + imageFileName));
44 | }
45 |
46 | public static Bitmap bytesToBitmap(byte[] bytes) {
47 | return BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
48 | }
49 |
50 | private static Bitmap scaleBitmap(Bitmap bm, int maxWidth, int maxHeight) {
51 | int width = bm.getWidth();
52 | int height = bm.getHeight();
53 | Log.v("Pictures", "Width and height are " + width + "--" + height);
54 | if (width > height) {
55 | // landscape
56 | float ratio = (float) width / maxWidth;
57 | width = maxWidth;
58 | height = (int) (height / ratio);
59 | } else if (height > width) {
60 | // portrait
61 | float ratio = (float) height / maxHeight;
62 | height = maxHeight;
63 | width = (int) (width / ratio);
64 | } else {
65 | // square
66 | height = maxHeight;
67 | width = maxWidth;
68 | }
69 | Log.v("Pictures", "after scaling Width and height are " + width + "--" + height);
70 | bm = Bitmap.createScaledBitmap(bm, width, height, true);
71 | return bm;
72 | }
73 |
74 | private static Bitmap overlayBitmapToCenter(Bitmap bitmap1, Bitmap bitmap2) {
75 | int bitmap1Width = bitmap1.getWidth();
76 | int bitmap1Height = bitmap1.getHeight();
77 | int bitmap2Width = bitmap2.getWidth();
78 | int bitmap2Height = bitmap2.getHeight();
79 | float marginLeft = (float) (bitmap1Width * 0.5 - bitmap2Width * 0.5);
80 | float marginTop = (float) (bitmap1Height * 0.5 - bitmap2Height * 0.5);
81 | Bitmap overlayBitmap = Bitmap.createBitmap(bitmap1Width, bitmap1Height, bitmap1.getConfig());
82 | Canvas canvas = new Canvas(overlayBitmap);
83 | canvas.drawBitmap(bitmap1, new Matrix(), null);
84 | canvas.drawBitmap(bitmap2, marginLeft, marginTop, null);
85 | return overlayBitmap;
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/fragment_create.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
9 |
21 |
33 |
34 |
42 |
43 |
48 |
49 |
63 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/ic_zoom.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/sticker_packs_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
31 |
32 |
42 |
43 |
51 |
52 |
60 |
61 |
71 |
72 |
73 |
79 |
80 |
81 |
82 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable-xxxhdpi/ic_zoom_inactive.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/StickerPackInfoActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.content.Intent;
12 | import android.graphics.Rect;
13 | import android.graphics.drawable.BitmapDrawable;
14 | import android.graphics.drawable.Drawable;
15 | import android.net.Uri;
16 | import android.os.Build;
17 | import android.os.Bundle;
18 | import android.support.annotation.DrawableRes;
19 | import android.text.TextUtils;
20 | import android.util.Log;
21 | import android.view.View;
22 | import android.widget.TextView;
23 | import com.unusualapps.whatsappstickers.R;
24 |
25 | import java.io.FileNotFoundException;
26 | import java.io.InputStream;
27 |
28 | public class StickerPackInfoActivity extends BaseActivity {
29 |
30 | private static final String TAG = "StickerPackInfoActivity";
31 |
32 | @Override
33 | protected void onCreate(Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | setContentView(R.layout.activity_sticker_pack_info);
36 |
37 | final String trayIconUriString = getIntent().getStringExtra(StickerPackDetailsActivity.EXTRA_STICKER_PACK_TRAY_ICON);
38 | final String website = getIntent().getStringExtra(StickerPackDetailsActivity.EXTRA_STICKER_PACK_WEBSITE);
39 | final String email = getIntent().getStringExtra(StickerPackDetailsActivity.EXTRA_STICKER_PACK_EMAIL);
40 | final String privacyPolicy = getIntent().getStringExtra(StickerPackDetailsActivity.EXTRA_STICKER_PACK_PRIVACY_POLICY);
41 |
42 | final TextView trayIcon = findViewById(R.id.tray_icon);
43 | try {
44 | final InputStream inputStream = getContentResolver().openInputStream(Uri.parse(trayIconUriString));
45 | final BitmapDrawable trayDrawable = new BitmapDrawable(getResources(), inputStream);
46 | final Drawable emailDrawable = getDrawableForAllAPIs(R.drawable.sticker_3rdparty_email);
47 | trayDrawable.setBounds(new Rect(0, 0, emailDrawable.getIntrinsicWidth(), emailDrawable.getIntrinsicHeight()));
48 | trayIcon.setCompoundDrawables(trayDrawable, null, null, null);
49 | } catch (FileNotFoundException e) {
50 | Log.e(TAG, "could not find the uri for the tray image:" + trayIconUriString);
51 | }
52 |
53 | final TextView viewWebpage = findViewById(R.id.view_webpage);
54 | if (TextUtils.isEmpty(website)) {
55 | viewWebpage.setVisibility(View.GONE);
56 | } else {
57 | viewWebpage.setOnClickListener(v -> launchWebpage(website));
58 | }
59 |
60 | final TextView sendEmail = findViewById(R.id.send_email);
61 | if (TextUtils.isEmpty(email)) {
62 | sendEmail.setVisibility(View.GONE);
63 | } else {
64 | sendEmail.setOnClickListener(v -> launchEmailClient(email));
65 | }
66 |
67 | final TextView viewPrivacyPolicy = findViewById(R.id.privacy_policy);
68 | if (TextUtils.isEmpty(privacyPolicy)) {
69 | viewPrivacyPolicy.setVisibility(View.GONE);
70 | } else {
71 | viewPrivacyPolicy.setOnClickListener(v -> launchWebpage(privacyPolicy));
72 | }
73 | }
74 |
75 | private void launchEmailClient(String email) {
76 | Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
77 | "mailto", email, null));
78 | emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{email});
79 | startActivity(Intent.createChooser(emailIntent, getResources().getString(R.string.info_send_email_to_prompt)));
80 | }
81 |
82 | private void launchWebpage(String website) {
83 | Uri uri = Uri.parse(website);
84 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
85 | startActivity(intent);
86 | }
87 |
88 | private Drawable getDrawableForAllAPIs(@DrawableRes int id) {
89 | if (Build.VERSION.SDK_INT >= 21) {
90 | return getDrawable(id);
91 | } else {
92 | return getResources().getDrawable(id);
93 | }
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/StickerPack.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.os.Parcel;
12 | import android.os.Parcelable;
13 |
14 | import java.util.List;
15 |
16 | public class StickerPack implements Parcelable {
17 | public String identifier;
18 | public String name;
19 | public String publisher;
20 | public String trayImageFile;
21 | public final String publisherEmail;
22 | public final String publisherWebsite;
23 | public final String privacyPolicyWebsite;
24 | public final String licenseAgreementWebsite;
25 |
26 | String iosAppStoreLink;
27 | private List stickers;
28 | private long totalSize;
29 | String androidPlayStoreLink;
30 | private boolean isWhitelisted;
31 |
32 | public StickerPack(String identifier, String name, String publisher, String trayImageFile, String publisherEmail, String publisherWebsite, String privacyPolicyWebsite, String licenseAgreementWebsite) {
33 | this.identifier = identifier;
34 | this.name = name;
35 | this.publisher = publisher;
36 | this.trayImageFile = trayImageFile;
37 | this.publisherEmail = publisherEmail;
38 | this.publisherWebsite = publisherWebsite;
39 | this.privacyPolicyWebsite = privacyPolicyWebsite;
40 | this.licenseAgreementWebsite = licenseAgreementWebsite;
41 | }
42 |
43 | void setIsWhitelisted(boolean isWhitelisted) {
44 | this.isWhitelisted = isWhitelisted;
45 | }
46 |
47 | boolean getIsWhitelisted() {
48 | return isWhitelisted;
49 | }
50 |
51 | protected StickerPack(Parcel in) {
52 | identifier = in.readString();
53 | name = in.readString();
54 | publisher = in.readString();
55 | trayImageFile = in.readString();
56 | publisherEmail = in.readString();
57 | publisherWebsite = in.readString();
58 | privacyPolicyWebsite = in.readString();
59 | licenseAgreementWebsite = in.readString();
60 | iosAppStoreLink = in.readString();
61 | stickers = in.createTypedArrayList(Sticker.CREATOR);
62 | totalSize = in.readLong();
63 | androidPlayStoreLink = in.readString();
64 | isWhitelisted = in.readByte() != 0;
65 | }
66 |
67 | public static final Creator CREATOR = new Creator() {
68 | @Override
69 | public StickerPack createFromParcel(Parcel in) {
70 | return new StickerPack(in);
71 | }
72 |
73 | @Override
74 | public StickerPack[] newArray(int size) {
75 | return new StickerPack[size];
76 | }
77 | };
78 |
79 | public void setStickers(List stickers) {
80 | this.stickers = stickers;
81 | totalSize = 0;
82 | for (Sticker sticker : stickers) {
83 | totalSize += sticker.size;
84 | }
85 | }
86 |
87 | public void setAndroidPlayStoreLink(String androidPlayStoreLink) {
88 | this.androidPlayStoreLink = androidPlayStoreLink;
89 | }
90 |
91 | public void setIosAppStoreLink(String iosAppStoreLink) {
92 | this.iosAppStoreLink = iosAppStoreLink;
93 | }
94 |
95 | public List getStickers() {
96 | return stickers;
97 | }
98 |
99 | public long getTotalSize() {
100 | return totalSize;
101 | }
102 |
103 | @Override
104 | public int describeContents() {
105 | return 0;
106 | }
107 |
108 | @Override
109 | public void writeToParcel(Parcel dest, int flags) {
110 | dest.writeString(identifier);
111 | dest.writeString(name);
112 | dest.writeString(publisher);
113 | dest.writeString(trayImageFile);
114 | dest.writeString(publisherEmail);
115 | dest.writeString(publisherWebsite);
116 | dest.writeString(privacyPolicyWebsite);
117 | dest.writeString(licenseAgreementWebsite);
118 | dest.writeString(iosAppStoreLink);
119 | dest.writeTypedList(stickers);
120 | dest.writeLong(totalSize);
121 | dest.writeString(androidPlayStoreLink);
122 | dest.writeByte((byte) (isWhitelisted ? 1 : 0));
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/fragment_my_stickers.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
24 |
25 |
39 |
40 |
48 |
49 |
54 |
55 |
69 |
70 |
78 |
79 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/sticker_item_of_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
14 |
15 |
18 |
30 |
40 |
47 |
53 |
60 |
61 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/utils/FileUtils.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.utils;
2 |
3 | import android.content.ContentUris;
4 | import android.content.Context;
5 | import android.content.res.AssetManager;
6 | import android.database.Cursor;
7 | import android.graphics.Bitmap;
8 | import android.net.Uri;
9 | import android.os.Environment;
10 | import android.provider.MediaStore;
11 | import android.provider.OpenableColumns;
12 | import android.util.Log;
13 |
14 | import com.unusualapps.whatsappstickers.constants.Constants;
15 |
16 | import java.io.*;
17 | import java.util.Objects;
18 | import java.util.Random;
19 |
20 | public class FileUtils {
21 |
22 | public static String generateRandomIdentifier() {
23 | String possibilities = "abcdefghijklmnopqrstuvwxyz0123456789";
24 | Random random = new Random();
25 | StringBuilder generatedIdentifier = new StringBuilder();
26 | for (int i = 0; i < Constants.STICKER_PACK_IDENTIFIER_LENGHT; i++) {
27 | generatedIdentifier.append(possibilities.charAt(random.nextInt(possibilities.length() - 1)));
28 | }
29 | return generatedIdentifier.toString();
30 | }
31 |
32 | public static void initializeDirectories(Context context) {
33 | File directory = new File(Constants.STICKERS_DIRECTORY_PATH);
34 | if (!directory.exists()) {
35 | directory.mkdir();
36 | String value = "{\"androidPlayStoreLink\": \"\",\"iosAppStoreLink\": \"\",\"stickerPacks\": [ ]}";
37 | try {
38 | PrintWriter out = new PrintWriter(Constants.STICKERS_DIRECTORY_PATH + "/contents.json");
39 | out.write(value);
40 | out.close();
41 | } catch (FileNotFoundException e) {
42 | e.printStackTrace();
43 | }
44 | }
45 | }
46 |
47 | public static byte[] getBytes(InputStream inputStream) throws IOException {
48 | ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
49 | int bufferSize = 1024;
50 | byte[] buffer = new byte[bufferSize];
51 |
52 | int len = 0;
53 | while ((len = inputStream.read(buffer)) != -1) {
54 | byteBuffer.write(buffer, 0, len);
55 | }
56 | return byteBuffer.toByteArray();
57 | }
58 |
59 | static void deleteFolder(String path) {
60 | File dir = new File(path);
61 | if (dir.exists()) {
62 | File[] files = dir.listFiles();
63 | for (int i = 0; i < files.length; i++) {
64 | if (files[i].isDirectory()) {
65 | deleteFolder(files[i].getPath());
66 | } else {
67 | files[i].delete();
68 | }
69 | }
70 | }
71 | dir.delete();
72 | }
73 |
74 | public static void deleteFile(String path, Context context) {
75 | File file = new File(path);
76 | if (file.exists()) {
77 | file.delete();
78 | }
79 | context.getContentResolver().delete(
80 | MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
81 | MediaStore.MediaColumns.DATA + "='" + path + "'", null
82 | );
83 | }
84 |
85 | public static String getImageRealPathFromURI(Context context, Uri contentUri) {
86 | Cursor cursor = null;
87 | try {
88 | String[] proj = {MediaStore.Images.Media.DATA};
89 | cursor = context.getContentResolver().query(contentUri, proj, null, null, null);
90 | if (cursor != null) {
91 | int column_index = Objects.requireNonNull(cursor).getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
92 | cursor.moveToFirst();
93 | return cursor.getString(column_index);
94 | } else {
95 | return contentUri.getPath();
96 | }
97 | } finally {
98 | if (cursor != null) {
99 | cursor.close();
100 | }
101 | }
102 | }
103 |
104 | public static String getFolderSizeLabel(String path) {
105 | long size = getFolderSize(new File(path)) / 1024; // Get size and convert bytes into Kb.
106 | if (size >= 1024) {
107 | return (size / 1024) + " MB";
108 | } else {
109 | return size + " KB";
110 | }
111 | }
112 |
113 | private static long getFolderSize(File file) {
114 | long size = 0;
115 | if (file.isDirectory()) {
116 | for (File child : file.listFiles()) {
117 | size += getFolderSize(child);
118 | }
119 | } else {
120 | size = file.length();
121 | }
122 | return size;
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/utils/StickerPacksManager.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.net.Uri;
7 | import android.util.Log;
8 | import com.google.gson.Gson;
9 | import com.unusualapps.whatsappstickers.constants.Constants;
10 | import com.unusualapps.whatsappstickers.identities.StickerPacksContainer;
11 | import com.unusualapps.whatsappstickers.whatsapp_api.ContentFileParser;
12 | import com.unusualapps.whatsappstickers.whatsapp_api.Sticker;
13 | import com.unusualapps.whatsappstickers.whatsapp_api.StickerPack;
14 |
15 | import java.io.*;
16 | import java.util.ArrayList;
17 | import java.util.List;
18 |
19 | public class StickerPacksManager {
20 |
21 | public static StickerPacksContainer stickerPacksContainer = null;
22 |
23 | public static List saveStickerPackFilesLocally(String identifier, List stickersUries, Context context) {
24 | String stickerPath = Constants.STICKERS_DIRECTORY_PATH + identifier;
25 | List stickerList = new ArrayList<>();
26 | File directory = new File(stickerPath);
27 | if (!directory.exists()) {
28 | directory.mkdir();
29 | }
30 | for (Uri uri : stickersUries) {
31 | Sticker sticker = new Sticker(FileUtils.generateRandomIdentifier() + ".webp", null);
32 | stickerList.add(sticker);
33 | saveStickerFilesLocally(sticker, uri, stickerPath, context);
34 | }
35 | return stickerList;
36 | }
37 |
38 | private static void saveStickerFilesLocally(Sticker sticker, Uri stickerUri, String stickerPath, Context context) {
39 | createStickerImageFile(stickerUri, Uri.parse(stickerPath + "/" + sticker.imageFileName), context, Bitmap.CompressFormat.WEBP);
40 | }
41 |
42 | public static List getStickerPacks(Context context) {
43 | List stickerPackList = new ArrayList<>();
44 |
45 | if (RequestPermissionsHelper.verifyPermissions(context)) {
46 | File contentFile = new File(Constants.STICKERS_DIRECTORY_PATH + "contents.json");
47 | try (InputStream contentsInputStream = new FileInputStream(contentFile)) {
48 | stickerPackList = ContentFileParser.parseStickerPacks(contentsInputStream);
49 | } catch (IOException | IllegalStateException e) {
50 | //throw new RuntimeException("contents.json" + " file has some issues: " + e.getMessage(), e);
51 | Log.i("Content provider: ", "contents.json" + " file has some issues: " + e.getMessage());
52 | }
53 | }
54 | return stickerPackList;
55 | }
56 |
57 | public static void saveStickerPacksToJson(StickerPacksContainer container) {
58 | String json = new Gson().toJson(container);
59 | try {
60 | File file = new File(Constants.STICKERS_DIRECTORY_PATH + "/contents.json");
61 | Writer output = new BufferedWriter(new FileWriter(file));
62 | output.write(json);
63 | output.close();
64 | } catch (IOException e) {
65 | e.printStackTrace();
66 | }
67 | }
68 |
69 | public static void createStickerImageFile(Uri sourceUri, Uri destinyUri, Context context, Bitmap.CompressFormat format) {
70 | String destinationFilename = destinyUri.getPath();
71 | try {
72 | File file = new File(destinationFilename);
73 | byte[] bitmapdata = ImageUtils.compressImageToBytes(sourceUri, 70, 512, 512, context, format);
74 | FileOutputStream fos = new FileOutputStream(file);
75 | fos.write(bitmapdata);
76 | fos.flush();
77 | fos.close();
78 | } catch (IOException e) {
79 | e.printStackTrace();
80 | }
81 | }
82 |
83 | public static void createStickerPackTrayIconFile(Uri sourceUri, Uri destinyUri, Context context) {
84 | String destinationFilename = destinyUri.getPath();
85 | try {
86 | File file = new File(destinationFilename);
87 | byte[] bitmapdata = ImageUtils.compressImageToBytes(sourceUri, 80, 96, 96, context, Bitmap.CompressFormat.PNG);
88 | FileOutputStream fos = new FileOutputStream(file);
89 | fos.write(bitmapdata);
90 | fos.flush();
91 | fos.close();
92 | } catch (IOException e) {
93 | e.printStackTrace();
94 | }
95 | }
96 |
97 | public static void deleteStickerPack(int index) {
98 | StickerPack pack = stickerPacksContainer.removeStickerPack(index);
99 | FileUtils.deleteFolder(Constants.STICKERS_DIRECTORY_PATH + pack.identifier);
100 | saveStickerPacksToJson(stickerPacksContainer);
101 | }
102 | }
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
12 |
14 |
16 |
18 |
20 |
22 |
24 |
26 |
28 |
30 |
32 |
34 |
36 |
38 |
40 |
42 |
44 |
46 |
48 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
66 |
68 |
70 |
72 |
74 |
75 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/backgroundRemover/CutOut.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.backgroundRemover;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.graphics.Color;
7 | import android.net.Uri;
8 | import android.support.annotation.NonNull;
9 | import android.support.annotation.Nullable;
10 |
11 | public class CutOut {
12 |
13 | public static final short CUTOUT_ACTIVITY_REQUEST_CODE = 368;
14 | public static final short CUTOUT_ACTIVITY_RESULT_ERROR_CODE = 3680;
15 |
16 | static final String CUTOUT_EXTRA_SOURCE = "CUTOUT_EXTRA_SOURCE";
17 | static final String CUTOUT_EXTRA_RESULT = "CUTOUT_EXTRA_RESULT";
18 | static final String CUTOUT_EXTRA_BORDER_COLOR = "CUTOUT_EXTRA_BORDER_COLOR";
19 | static final String CUTOUT_EXTRA_CROP = "CUTOUT_EXTRA_CROP";
20 | static final String CUTOUT_EXTRA_INTRO = "CUTOUT_EXTRA_INTRO";
21 |
22 | public static ActivityBuilder activity() {
23 | return new ActivityBuilder();
24 | }
25 |
26 | /**
27 | * Builder used for creating CutOut Activity by user request.
28 | */
29 | public static final class ActivityBuilder {
30 |
31 | @Nullable
32 | private Uri source; // The image to crop source Android uri
33 | private boolean bordered;
34 | private boolean crop = true; // By default the cropping activity is started
35 | private boolean intro;
36 | private int borderColor = Color.WHITE; // Default border color is no border color is passed
37 |
38 | private ActivityBuilder() {
39 |
40 | }
41 |
42 | /**
43 | * Get {@link CutOutActivity} intent to start the activity.
44 | */
45 | private Intent getIntent(@NonNull Context context) {
46 | Intent intent = new Intent();
47 | intent.setClass(context, CutOutActivity.class);
48 |
49 | if (source != null) {
50 | intent.putExtra(CUTOUT_EXTRA_SOURCE, source);
51 | }
52 |
53 | if (bordered) {
54 | intent.putExtra(CUTOUT_EXTRA_BORDER_COLOR, borderColor);
55 | }
56 |
57 | if (crop) {
58 | intent.putExtra(CUTOUT_EXTRA_CROP, true);
59 | }
60 |
61 | if (intro) {
62 | intent.putExtra(CUTOUT_EXTRA_INTRO, true);
63 | }
64 |
65 | return intent;
66 | }
67 |
68 | /**
69 | * By default the user can select images from camera or gallery but you can also call this method to load a pre-saved image
70 | *
71 | * @param source {@link Uri} instance of the image to be loaded
72 | */
73 | public ActivityBuilder src(Uri source) {
74 | this.source = source;
75 | return this;
76 | }
77 |
78 | /**
79 | * This method adds a white border around the final PNG image
80 | */
81 | public ActivityBuilder bordered() {
82 | this.bordered = true;
83 | return this;
84 | }
85 |
86 | /**
87 | * This method adds a border around the final PNG image
88 | *
89 | * @param borderColor The border color. You can pass any {@link Color}
90 | */
91 | public ActivityBuilder bordered(int borderColor) {
92 | this.borderColor = borderColor;
93 | return bordered();
94 | }
95 |
96 | /**
97 | * Disables the cropping screen shown before the background removal screen
98 | */
99 | public ActivityBuilder noCrop() {
100 | this.crop = false;
101 | return this;
102 | }
103 |
104 | /**
105 | * Shows an introduction to the activity, explaining every button usage. The intro is show only once.
106 | */
107 | public ActivityBuilder intro() {
108 | this.intro = true;
109 | return this;
110 | }
111 |
112 | /**
113 | * Start {@link CutOutActivity}.
114 | *
115 | * @param activity activity to receive result
116 | */
117 | public void start(@NonNull Activity activity) {
118 | activity.startActivityForResult(getIntent(activity), CUTOUT_ACTIVITY_REQUEST_CODE);
119 | }
120 | }
121 |
122 | /**
123 | * Reads the {@link Uri} from the result data. This Uri is the path to the saved PNG
124 | *
125 | * @param data Result data to get the Uri from
126 | */
127 | public static Uri getUri(@Nullable Intent data) {
128 | return data != null ? data.getParcelableExtra(CUTOUT_EXTRA_RESULT) : null;
129 | }
130 |
131 | /**
132 | * Gets an Exception from the result data if the {@link CutOutActivity} failed at some point
133 | *
134 | * @param data Result data to get the Exception from
135 | */
136 | public static Exception getError(@Nullable Intent data) {
137 | return data != null ? (Exception) data.getSerializableExtra(CUTOUT_EXTRA_RESULT) : null;
138 | }
139 | }
140 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/activities/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.activities;
2 |
3 | import android.os.Build;
4 | import android.support.v4.app.Fragment;
5 | import android.support.v4.app.FragmentTransaction;
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 | import android.support.annotation.NonNull;
9 | import android.support.annotation.Nullable;
10 | import android.support.design.widget.BottomNavigationView;
11 | import android.view.MenuItem;
12 | import android.view.View;
13 | import com.facebook.drawee.backends.pipeline.Fresco;
14 | import com.github.florent37.depth.DepthProvider;
15 | import com.github.florent37.depth.animations.EnterConfiguration;
16 | import com.github.florent37.depth.animations.ExitConfiguration;
17 | import com.github.florent37.depth.animations.ReduceConfiguration;
18 | import com.sangcomz.fishbun.define.Define;
19 | import com.unusualapps.whatsappstickers.R;
20 | import com.unusualapps.whatsappstickers.backgroundRemover.CutOut;
21 | import com.unusualapps.whatsappstickers.identities.StickerPacksContainer;
22 | import com.unusualapps.whatsappstickers.utils.StickerPacksManager;
23 | import com.unusualapps.whatsappstickers.whatsapp_api.AddStickerPackActivity;
24 |
25 | import java.util.Objects;
26 |
27 |
28 | public class MainActivity extends AddStickerPackActivity {
29 | private MyStickersFragment myStickersFragment;
30 | private ExploreFragment exploreFragment;
31 | private CreateFragment createFragment;
32 |
33 | @Override
34 | protected void onCreate(@Nullable Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 | setContentView(R.layout.activity_main);
37 | Fresco.initialize(this);
38 | this.initBottomNavigation();
39 | this.setupFragments();
40 | setFragmento(myStickersFragment);
41 | StickerPacksManager.stickerPacksContainer = new StickerPacksContainer("", "", StickerPacksManager.getStickerPacks(this));
42 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
43 | getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
44 | }
45 | }
46 |
47 | private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener = new BottomNavigationView.OnNavigationItemSelectedListener() {
48 | @Override
49 | public boolean onNavigationItemSelected(@NonNull MenuItem item) {
50 | switch (item.getItemId()) {
51 | case R.id.menu_home:
52 | setFragmento(myStickersFragment);
53 | return true;
54 | /*case R.id.menu_explore:
55 | setFragmento(exploreFragment);
56 | return true;*/
57 | case R.id.menu_create:
58 | setFragmento(createFragment);
59 | return true;
60 | }
61 | return false;
62 | }
63 | };
64 |
65 | @Override
66 | public void onActivityResult(int requestCode, int resultCode, Intent data) {
67 | if (requestCode == CutOut.CUTOUT_ACTIVITY_REQUEST_CODE || requestCode == Define.ALBUM_REQUEST_CODE) {
68 | Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.frame_principal);
69 | Objects.requireNonNull(fragment).onActivityResult(requestCode, resultCode, data);
70 | }
71 | }
72 |
73 | private void initBottomNavigation() {
74 | BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_navigation);
75 | bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
76 | }
77 |
78 | private void setupFragments() {
79 | FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
80 | myStickersFragment = new MyStickersFragment();
81 | exploreFragment = new ExploreFragment();
82 | createFragment = new CreateFragment();
83 | fragmentTransaction.add(R.id.frame_principal, myStickersFragment);
84 | fragmentTransaction.add(R.id.frame_principal, exploreFragment);
85 | fragmentTransaction.add(R.id.frame_principal, createFragment);
86 | fragmentTransaction.hide(exploreFragment);
87 | fragmentTransaction.hide(createFragment);
88 | fragmentTransaction.commit();
89 | }
90 |
91 | private void setFragmento(Fragment fragmento) {
92 | FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
93 | fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
94 | if (fragmento == myStickersFragment) {
95 | fragmentTransaction.hide(exploreFragment);
96 | fragmentTransaction.hide(createFragment);
97 | } else if (fragmento == exploreFragment) {
98 | fragmentTransaction.hide(myStickersFragment);
99 | fragmentTransaction.hide(createFragment);
100 | } else if (fragmento == createFragment) {
101 | fragmentTransaction.hide(myStickersFragment);
102 | fragmentTransaction.hide(exploreFragment);
103 | }
104 | fragmentTransaction.show(fragmento);
105 | fragmentTransaction.commit();
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/activity_new_sticker_pack.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
16 |
24 |
31 |
32 |
37 |
38 |
41 |
42 |
50 |
51 |
52 |
53 |
56 |
57 |
65 |
66 |
67 |
68 |
69 |
70 |
86 |
96 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/whatsapp_api/AddStickerPackActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WhatsApp Inc. and its affiliates.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree.
7 | */
8 |
9 | package com.unusualapps.whatsappstickers.whatsapp_api;
10 |
11 | import android.app.Activity;
12 | import android.app.Dialog;
13 | import android.content.ActivityNotFoundException;
14 | import android.content.Intent;
15 | import android.content.pm.PackageManager;
16 | import android.net.Uri;
17 | import android.os.Bundle;
18 | import android.support.annotation.NonNull;
19 | import android.support.v4.app.DialogFragment;
20 | import android.support.v7.app.AlertDialog;
21 | import android.util.Log;
22 | import android.widget.Toast;
23 | import com.unusualapps.whatsappstickers.BuildConfig;
24 | import com.unusualapps.whatsappstickers.R;
25 |
26 | public abstract class AddStickerPackActivity extends BaseActivity {
27 | public static final int ADD_PACK = 200;
28 |
29 | public void addStickerPackToWhatsApp(String identifier, String stickerPackName) {
30 | Intent intent = new Intent();
31 | intent.setAction("com.whatsapp.intent.action.ENABLE_STICKER_PACK");
32 | intent.putExtra(StickerPackDetailsActivity.EXTRA_STICKER_PACK_ID, identifier);
33 | intent.putExtra(StickerPackDetailsActivity.EXTRA_STICKER_PACK_AUTHORITY, BuildConfig.CONTENT_PROVIDER_AUTHORITY);
34 | intent.putExtra(StickerPackDetailsActivity.EXTRA_STICKER_PACK_NAME, stickerPackName);
35 | try {
36 | startActivityForResult(intent, ADD_PACK);
37 | } catch (ActivityNotFoundException e) {
38 | Toast.makeText(this, R.string.error_adding_sticker_pack, Toast.LENGTH_LONG).show();
39 | }
40 | }
41 |
42 | @Override
43 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
44 | super.onActivityResult(requestCode, resultCode, data);
45 | if (requestCode == ADD_PACK) {
46 | if (resultCode == Activity.RESULT_CANCELED) {
47 | if (data != null) {
48 | final String validationError = data.getStringExtra("validation_error");
49 | if (validationError != null) {
50 | if (BuildConfig.DEBUG) {
51 | //validation error should be shown to developer only, not users.
52 | MessageDialogFragment.newInstance(R.string.title_validation_error, validationError).show(getSupportFragmentManager(), "validation error");
53 | }
54 | Log.e("AddStickerPackActivity", "Validation failed:" + validationError);
55 | }
56 | } else {
57 | new StickerPackNotAddedMessageFragment().show(getSupportFragmentManager(), "sticker_pack_not_added");
58 | }
59 | }
60 | }
61 | }
62 |
63 | public static final class StickerPackNotAddedMessageFragment extends DialogFragment {
64 | @NonNull
65 | @Override
66 | public Dialog onCreateDialog(Bundle savedInstanceState) {
67 | AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity())
68 | .setMessage(R.string.add_pack_fail_prompt_update_whatsapp)
69 | .setCancelable(true)
70 | .setPositiveButton(android.R.string.ok, (dialog, which) -> dismiss())
71 | .setNeutralButton(R.string.add_pack_fail_prompt_update_play_link, (dialog, which) -> launchWhatsAppPlayStorePage());
72 |
73 | return dialogBuilder.create();
74 | }
75 |
76 | private void launchWhatsAppPlayStorePage() {
77 | if (getActivity() != null) {
78 | final PackageManager packageManager = getActivity().getPackageManager();
79 | final boolean whatsAppInstalled = WhitelistCheck.isPackageInstalled(WhitelistCheck.CONSUMER_WHATSAPP_PACKAGE_NAME, packageManager);
80 | final boolean smbAppInstalled = WhitelistCheck.isPackageInstalled(WhitelistCheck.SMB_WHATSAPP_PACKAGE_NAME, packageManager);
81 | final String playPackageLinkPrefix = "http://play.google.com/store/apps/details?id=";
82 | if (whatsAppInstalled && smbAppInstalled) {
83 | launchPlayStoreWithUri("https://play.google.com/store/apps/developer?id=WhatsApp+Inc.");
84 | } else if (whatsAppInstalled) {
85 | launchPlayStoreWithUri(playPackageLinkPrefix + WhitelistCheck.CONSUMER_WHATSAPP_PACKAGE_NAME);
86 | } else if (smbAppInstalled) {
87 | launchPlayStoreWithUri(playPackageLinkPrefix + WhitelistCheck.SMB_WHATSAPP_PACKAGE_NAME);
88 | }
89 | }
90 | }
91 |
92 | private void launchPlayStoreWithUri(String uriString) {
93 | Intent intent = new Intent(Intent.ACTION_VIEW);
94 | intent.setData(Uri.parse(uriString));
95 | intent.setPackage("com.android.vending");
96 | try {
97 | startActivity(intent);
98 | } catch (ActivityNotFoundException e) {
99 | Toast.makeText(getActivity(), R.string.cannot_find_play_store, Toast.LENGTH_LONG).show();
100 | }
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
21 |
22 |
25 |
26 |
28 |
29 |
33 |
36 |
40 |
45 |
48 |
49 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
65 |
68 |
69 |
70 |
79 |
83 |
84 |
90 |
94 |
95 |
96 |
102 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/java/com/unusualapps/whatsappstickers/activities/MyStickersFragment.java:
--------------------------------------------------------------------------------
1 | package com.unusualapps.whatsappstickers.activities;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.support.design.widget.FloatingActionButton;
7 | import android.support.v4.widget.SwipeRefreshLayout;
8 | import android.support.v7.widget.DividerItemDecoration;
9 | import android.support.v7.widget.GridLayoutManager;
10 | import android.support.v7.widget.LinearLayoutManager;
11 | import android.support.v7.widget.RecyclerView;
12 | import android.view.LayoutInflater;
13 | import android.view.View;
14 | import android.view.ViewGroup;
15 | import com.unusualapps.whatsappstickers.R;
16 | import com.unusualapps.whatsappstickers.utils.StickerPacksManager;
17 | import com.unusualapps.whatsappstickers.whatsapp_api.StickerPack;
18 | import com.unusualapps.whatsappstickers.whatsapp_api.StickerPackListAdapter;
19 | import com.unusualapps.whatsappstickers.whatsapp_api.StickerPackListItemViewHolder;
20 |
21 | import java.util.List;
22 |
23 | public class MyStickersFragment extends Fragment {
24 |
25 | private static final int STICKER_PREVIEW_DISPLAY_LIMIT = 5;
26 | private LinearLayoutManager layoutManager;
27 | private RecyclerView stickersRecyclerView;
28 | private final StickerPackListAdapter.OnAddButtonClickedListener onAddButtonClickedListener = pack -> {
29 | ((MainActivity) getActivity()).addStickerPackToWhatsApp(pack.identifier, pack.name);
30 | };
31 | private StickerPackListAdapter stickerListAdapter;
32 |
33 | public MyStickersFragment() {
34 |
35 | }
36 |
37 | @Override
38 | public void onResume() {
39 | super.onResume();
40 | stickerListAdapter.setStickerPackList(StickerPacksManager.getStickerPacks(getActivity()));
41 | stickerListAdapter.notifyDataSetChanged();
42 | verifyStickersCount();
43 | }
44 |
45 | private View view;
46 |
47 | private void initRecyclerView() {
48 | List stickersPacks = StickerPacksManager.stickerPacksContainer.getStickerPacks();
49 | layoutManager = new GridLayoutManager(view.getContext(), LinearLayoutManager.VERTICAL);
50 | stickersRecyclerView = view.findViewById(R.id.stickers_recycler_list);
51 | stickersRecyclerView.setLayoutManager(layoutManager);
52 | stickerListAdapter = new StickerPackListAdapter(stickersPacks, onAddButtonClickedListener, this);
53 |
54 | stickersRecyclerView.setAdapter(stickerListAdapter);
55 | stickersRecyclerView.setItemViewCacheSize(20);
56 | stickersRecyclerView.setDrawingCacheEnabled(true);
57 | stickersRecyclerView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
58 | stickersRecyclerView.setNestedScrollingEnabled(true);
59 | DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(stickersRecyclerView.getContext(), layoutManager.getOrientation());
60 | stickersRecyclerView.addItemDecoration(dividerItemDecoration);
61 | stickersRecyclerView.getViewTreeObserver().addOnGlobalLayoutListener(this::recalculateColumnCount);
62 | }
63 |
64 | private void initSwipeRefresh() {
65 | SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.refresh_my_stickers_swiper);
66 | swipeRefreshLayout.setOnRefreshListener(() -> {
67 | List stickersPacks = StickerPacksManager.getStickerPacks(getActivity());
68 | stickerListAdapter.setStickerPackList(stickersPacks);
69 | swipeRefreshLayout.setRefreshing(false);
70 | verifyStickersCount();
71 | });
72 | }
73 |
74 | private void recalculateColumnCount() {
75 | final int previewSize = getActivity().getResources().getDimensionPixelSize(R.dimen.sticker_pack_list_item_preview_image_size);
76 | int firstVisibleItemPosition = layoutManager.findFirstVisibleItemPosition();
77 | StickerPackListItemViewHolder viewHolder = (StickerPackListItemViewHolder) stickersRecyclerView.findViewHolderForAdapterPosition(firstVisibleItemPosition);
78 | if (viewHolder != null) {
79 | final int max = Math.max(viewHolder.imageRowView.getMeasuredWidth() / previewSize, 1);
80 | int numColumns = Math.min(STICKER_PREVIEW_DISPLAY_LIMIT, max);
81 | stickerListAdapter.setMaxNumberOfStickersInARow(numColumns);
82 | }
83 | }
84 |
85 | public void initButtons() {
86 | FloatingActionButton floatingActionButtonAdd = view.findViewById(R.id.floating_button_add_sticker_pack);
87 | floatingActionButtonAdd.setOnClickListener(view -> {
88 | Intent intent = new Intent(getActivity(), NewStickerPackActivity.class);
89 | startActivity(intent);
90 | });
91 | }
92 |
93 | public void verifyStickersCount() {
94 | View linearLayout = view.findViewById(R.id.no_stickerspacks_icon);
95 | if (stickerListAdapter.getItemCount() == 0) {
96 | linearLayout.setVisibility(View.VISIBLE);
97 | } else {
98 | linearLayout.setVisibility(View.GONE);
99 | }
100 | }
101 |
102 | @Override
103 | public void onCreate(Bundle savedInstanceState) {
104 | super.onCreate(savedInstanceState);
105 | }
106 |
107 | @Override
108 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
109 | view = inflater.inflate(R.layout.fragment_my_stickers, container, false);
110 | this.initRecyclerView();
111 | this.initButtons();
112 | this.initSwipeRefresh();
113 | this.verifyStickersCount();
114 | return view;
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/WhatsAppStickers/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/activity_photo_edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
23 |
24 |
29 |
30 |
35 |
36 |
44 |
45 |
46 |
47 |
48 |
49 |
53 |
54 |
59 |
60 |
70 |
71 |
81 |
82 |
92 |
93 |
99 |
100 |
107 |
108 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
127 |
128 |
129 |
130 |
134 |
135 |
139 |
140 |
144 |
145 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
--------------------------------------------------------------------------------
/WhatsAppStickers/app/src/main/res/layout/sticker_pack_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
20 |
21 |
22 |
34 |
35 |
47 |
48 |
58 |
59 |
68 |
69 |
70 |
71 |
75 |
76 |
87 |
88 |
96 |
97 |
98 |
99 |
106 |
107 |
118 |
119 |
128 |
129 |
142 |
143 |
144 |
145 |
--------------------------------------------------------------------------------