Repository: Shashank02051997/FancyGifDialog-Android
Branch: master
Commit: 31a8e4b74174
Files: 44
Total size: 67.0 KB
Directory structure:
gitextract_m7sh3g1n/
├── .gitignore
├── .idea/
│ ├── compiler.xml
│ ├── encodings.xml
│ ├── gradle.xml
│ ├── jarRepositories.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── LICENSE
├── README.md
├── app/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── shashank/
│ │ └── sony/
│ │ └── fancygifdialoglibrary/
│ │ └── ExampleInstrumentedTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── shashank/
│ │ │ └── sony/
│ │ │ └── fancygifdialoglibrary/
│ │ │ └── MainActivity.java
│ │ └── res/
│ │ ├── drawable/
│ │ │ └── ic_launcher_background.xml
│ │ ├── drawable-v24/
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── layout/
│ │ │ └── activity_main.xml
│ │ ├── mipmap-anydpi-v26/
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ └── values/
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test/
│ └── java/
│ └── com/
│ └── shashank/
│ └── sony/
│ └── fancygifdialoglibrary/
│ └── ExampleUnitTest.java
├── build.gradle
├── fancygifdialoglib/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── shashank/
│ │ └── sony/
│ │ └── fancygifdialoglib/
│ │ └── ExampleInstrumentedTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── shashank/
│ │ │ └── sony/
│ │ │ └── fancygifdialoglib/
│ │ │ ├── FancyGifDialog.java
│ │ │ └── FancyGifDialogListener.java
│ │ └── res/
│ │ ├── drawable/
│ │ │ ├── curved_shape.xml
│ │ │ └── curved_shape2.xml
│ │ ├── layout/
│ │ │ └── fancygifdialog.xml
│ │ └── values/
│ │ └── strings.xml
│ └── test/
│ └── java/
│ └── com/
│ └── shashank/
│ └── sony/
│ └── fancygifdialoglib/
│ └── ExampleUnitTest.java
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
================================================
FILE: .idea/compiler.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
</component>
</project>
================================================
FILE: .idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: .idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="11" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/fancygifdialoglib" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
================================================
FILE: .idea/jarRepositories.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>
================================================
FILE: .idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="app/src/main/res/layout/activity_main.xml" value="0.3098958333333333" />
<entry key="fancygifdialoglib/src/main/res/layout/fancygifdialog.xml" value="0.3098958333333333" />
</map>
</option>
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="13">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="4" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
<item index="10" class="java.lang.String" itemvalue="android.annotation.Nullable" />
<item index="11" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
<item index="12" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="12">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
<item index="9" class="java.lang.String" itemvalue="android.annotation.NonNull" />
<item index="10" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
<item index="11" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
================================================
FILE: .idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/FancyGifDialog-Android.iml" filepath="$PROJECT_DIR$/.idea/modules/FancyGifDialog-Android.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/FancyGifDialog-Android.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/FancyGifDialog-Android.app.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/FancyGifDialog-Android.app.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/FancyGifDialog-Android.app.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/FancyGifDialog-Android.app.main.iml" filepath="$PROJECT_DIR$/.idea/modules/app/FancyGifDialog-Android.app.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/FancyGifDialog-Android.app.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/FancyGifDialog-Android.app.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/fancygifdialoglib/FancyGifDialog-Android.fancygifdialoglib.iml" filepath="$PROJECT_DIR$/.idea/modules/fancygifdialoglib/FancyGifDialog-Android.fancygifdialoglib.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/fancygifdialoglib/FancyGifDialog-Android.fancygifdialoglib.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/fancygifdialoglib/FancyGifDialog-Android.fancygifdialoglib.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/fancygifdialoglib/FancyGifDialog-Android.fancygifdialoglib.main.iml" filepath="$PROJECT_DIR$/.idea/modules/fancygifdialoglib/FancyGifDialog-Android.fancygifdialoglib.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/fancygifdialoglib/FancyGifDialog-Android.fancygifdialoglib.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/fancygifdialoglib/FancyGifDialog-Android.fancygifdialoglib.unitTest.iml" />
</modules>
</component>
</project>
================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
# FancyGifDialog-Android
[](https://www.android.com)
[](https://android-arsenal.com/api?level=15)
[](https://www.apache.org/licenses/LICENSE-2.0.html)
[](https://jitpack.io/#Shashank02051997/FancyGifDialog-Android)
[](https://android-arsenal.com/details/1/6652)
<a href="https://play.google.com/store/apps/details?id=com.shashank.sony.fancylibrarybyshashank">
<img alt="Get it on Google Play"
height="80"
src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" />
</a>
## Prerequisites
Add this in your root `build.gradle` file (**not** your module `build.gradle` file):
```gradle
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
## Dependency
Add this to your module's `build.gradle` file (make sure the version matches the JitPack badge above):
```gradle
dependencies {
...
implementation 'com.github.Shashank02051997:FancyGifDialog-Android:1.5'
}
```
## Fancy Gif Dialog
Dialog with two buttons:
``` java
new FancyGifDialog.Builder(this)
.setTitle("Granny eating chocolate dialog box") // You can also send title like R.string.from_resources
.setMessage("This is a granny eating chocolate dialog box. This library is used to help you easily create fancy gify dialog.") // or pass like R.string.description_from_resources
.setTitleTextColor(R.color.titleText)
.setDescriptionTextColor(R.color.descriptionText)
.setNegativeBtnText("Cancel") // or pass it like android.R.string.cancel
.setPositiveBtnBackground(R.color.positiveButton)
.setPositiveBtnText("Ok") // or pass it like android.R.string.ok
.setNegativeBtnBackground(R.color.negativeButton)
.setGifResource(R.drawable.gif1) //Pass your Gif here
.isCancellable(true)
.OnPositiveClicked(new FancyGifDialogListener() {
@Override
public void OnClick() {
Toast.makeText(MainActivity.this,"Ok",Toast.LENGTH_SHORT).show();
}
})
.OnNegativeClicked(new FancyGifDialogListener() {
@Override
public void OnClick() {
Toast.makeText(MainActivity.this,"Cancel",Toast.LENGTH_SHORT).show();
}
})
.build();
```
Dialog with one button:
``` java
new FancyGifDialog.Builder(this)
.setTitle("Granny eating chocolate dialog box")
.setMessage("This is a granny eating chocolate dialog box. This library is used to help you easily create fancy gify dialog.")
.setTitleTextColor(R.color.titleText)
.setDescriptionTextColor(R.color.descriptionText)
.setPositiveBtnText("Ok")
.setPositiveBtnBackground(R.color.positiveButton)
.setGifResource(R.drawable.gif1) //Pass your Gif here
.isCancellable(true)
.OnPositiveClicked(new FancyGifDialogListener() {
@Override
public void OnClick() {
Toast.makeText(MainActivity.this,"Ok",Toast.LENGTH_SHORT).show();
}
})
.build();
```
## Screenshots
**Please click the image below to enlarge.**
<img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_215855.gif" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_220303.gif" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_220829.gif" height="420" width="240">
<img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_221054.gif" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_221227.gif" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_221357.gif" height="420" width="240">
<img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/Screenshot_2018-01-07-10-24-37.png" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/Screenshot_2018-01-07-10-25-07.png" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/Screenshot_2018-01-07-10-25-26.png" height="420" width="240">
## Dependencies
This project use this libraries ~ Thanks to them.
[android-gif-drawable](https://github.com/koral--/android-gif-drawable)
## Contributing
Please fork this repository and contribute back using
[pull requests](https://github.com/Shashank02051997/FancyGifDialog-Android/pulls).
Any contributions, large or small, major features, bug fixes, are welcomed and appreciated
but will be thoroughly reviewed .
### Contact - Let's become friend
- [Twitter](https://twitter.com/shashank020597)
- [Github](https://github.com/Shashank02051997)
- [Linkedin](https://www.linkedin.com/in/shashank-singhal-a87729b5/)
- [Facebook](https://www.facebook.com/shashanksinghal02)
## Donation
If this project help you reduce time to develop, you can give me a cup of coffee :)
<a href="https://www.buymeacoffee.com/mXUuDW7" target="_blank"><img src="https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
## License
* [Apache Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
```
Copyright 2018 Shashank Singhal
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: app/.gitignore
================================================
/build
================================================
FILE: app/build.gradle
================================================
apply plugin: 'com.android.application'
android {
compileSdkVersion 31
defaultConfig {
applicationId "com.shashank.sony.fancygifdialoglibrary"
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation project(':fancygifdialoglib')
}
================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
================================================
FILE: app/src/androidTest/java/com/shashank/sony/fancygifdialoglibrary/ExampleInstrumentedTest.java
================================================
package com.shashank.sony.fancygifdialoglibrary;
import android.content.Context;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.assertEquals;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.shashank.sony.fancygifdialoglibrary", appContext.getPackageName());
}
}
================================================
FILE: app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.shashank.sony.fancygifdialoglibrary">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
================================================
FILE: app/src/main/java/com/shashank/sony/fancygifdialoglibrary/MainActivity.java
================================================
package com.shashank.sony.fancygifdialoglibrary;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.shashank.sony.fancygifdialoglib.FancyGifDialog;
import com.shashank.sony.fancygifdialoglib.FancyGifDialogListener;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
Button b1, b2;
Context context;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
context = this;
b1 = findViewById(R.id.button);
b2 = findViewById(R.id.button2);
b1.setOnClickListener(this);
b2.setOnClickListener(this);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.button:
new FancyGifDialog.Builder(this)
.setTitle("Granny eating chocolate dialog box")
.setMessage("This is a granny eating chocolate dialog box. This library is used to help you easily create fancy gify dialog.")
.setNegativeBtnText("Cancel")
.setTitleTextColor(R.color.titleText)
.setDescriptionTextColor(R.color.descriptionText)
.setPositiveBtnBackground(R.color.positiveButton)
.setPositiveBtnText("Ok")
.setNegativeBtnBackground(R.color.negativeButton)
.setGifResource(R.drawable.gif1)
.isCancellable(true)
.OnPositiveClicked(() -> toaster("ok"))
.OnNegativeClicked(() -> toaster("cancel"))
.build();
break;
case R.id.button2:
new FancyGifDialog.Builder(this)
.setTitle(R.string.from_resources)
.setMessage(R.string.description_from_resources)
.setNegativeBtnText(android.R.string.cancel)
.setTitleTextColor(R.color.titleText)
.setDescriptionTextColor(R.color.descriptionText)
.setPositiveBtnBackground(R.color.positiveButton)
.setPositiveBtnText(android.R.string.ok)
.setNegativeBtnBackground(R.color.negativeButton)
.setGifResource(R.drawable.gif1)
.isCancellable(true)
.setOnCancelListener(dialogInterface -> toaster("Cancelled"))
.OnPositiveClicked(() -> toaster("Ok"))
.OnNegativeClicked(() -> toaster("Cancel"))
.build();
break;
}
}
private void toaster(String message) {
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
@Override
public void onPointerCaptureChanged(boolean hasCapture) {
}
}
================================================
FILE: app/src/main/res/drawable/ic_launcher_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
================================================
FILE: app/src/main/res/drawable-v24/ic_launcher_foreground.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
================================================
FILE: app/src/main/res/layout/activity_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:context="com.shashank.sony.fancygifdialoglibrary.MainActivity">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Click Me" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Click Me too!" />
</LinearLayout>
================================================
FILE: app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
================================================
FILE: app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
================================================
FILE: app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="titleText">#000000</color>
<color name="descriptionText">#777777</color>
<color name="positiveButton">#FF4081</color>
<color name="negativeButton">#A9A7A8</color>
</resources>
================================================
FILE: app/src/main/res/values/strings.xml
================================================
<resources>
<string name="app_name">FancyGifDialogLibrary</string>
<string name="from_resources">This title came from resources</string>
<string name="description_from_resources">This description also came from the resources.</string>
</resources>
================================================
FILE: app/src/main/res/values/styles.xml
================================================
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
================================================
FILE: app/src/test/java/com/shashank/sony/fancygifdialoglibrary/ExampleUnitTest.java
================================================
package com.shashank.sony.fancygifdialoglibrary;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
================================================
FILE: build.gradle
================================================
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
================================================
FILE: fancygifdialoglib/.gitignore
================================================
/build
================================================
FILE: fancygifdialoglib/build.gradle
================================================
apply plugin: 'com.android.library'
group = 'com.github.Shashank02051997'
android {
compileSdkVersion 31
defaultConfig {
minSdkVersion 15
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.3.0'
//noinspection GradleCompatible
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.10'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
================================================
FILE: fancygifdialoglib/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
================================================
FILE: fancygifdialoglib/src/androidTest/java/com/shashank/sony/fancygifdialoglib/ExampleInstrumentedTest.java
================================================
package com.shashank.sony.fancygifdialoglib;
import android.content.Context;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.assertEquals;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.shashank.sony.fancygifdialoglib.test", appContext.getPackageName());
}
}
================================================
FILE: fancygifdialoglib/src/main/AndroidManifest.xml
================================================
<manifest package="com.shashank.sony.fancygifdialoglib" />
================================================
FILE: fancygifdialoglib/src/main/java/com/shashank/sony/fancygifdialoglib/FancyGifDialog.java
================================================
package com.shashank.sony.fancygifdialoglib;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.GradientDrawable;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.ColorRes;
import androidx.annotation.StringRes;
import androidx.core.content.ContextCompat;
import pl.droidsonroids.gif.GifImageView;
/**
* Created by Shashank Singhal on 06/01/2018.
*/
public class FancyGifDialog {
private String title, message, positiveBtnText, negativeBtnText;
@ColorRes
private int pBtnColor, nBtnColor;
@ColorRes
private int titleTxtColor, desTxtColor;
private Context context;
private FancyGifDialogListener pListener, nListener;
private Dialog.OnCancelListener cancelListener;
private boolean cancel;
int gifImageResource;
private FancyGifDialog(Builder builder) {
this.title = builder.title;
this.message = builder.message;
this.context = builder.context;
this.pListener = builder.pListener;
this.nListener = builder.nListener;
this.titleTxtColor = builder.titleTxtColor;
this.desTxtColor = builder.desTxtColor;
this.pBtnColor = builder.pBtnColor;
this.nBtnColor = builder.nBtnColor;
this.positiveBtnText = builder.positiveBtnText;
this.negativeBtnText = builder.negativeBtnText;
this.gifImageResource = builder.gifImageResource;
this.cancel = builder.cancel;
this.cancelListener = builder.cancelListener;
}
public static class Builder {
private String title, message, positiveBtnText, negativeBtnText;
@ColorRes
private int pBtnColor, nBtnColor;
private int titleTxtColor, desTxtColor;
private Context context;
private FancyGifDialogListener pListener, nListener;
private boolean cancel;
int gifImageResource;
private Dialog.OnCancelListener cancelListener;
public Builder(Context context) {
this.context = context;
}
public Builder setTitle(String title) {
this.title = title;
return this;
}
public Builder setTitle(@StringRes int title) {
return setTitle(context.getString(title));
}
public Builder setMessage(String message) {
this.message = message;
return this;
}
public Builder setMessage(@StringRes int message) {
return setMessage(context.getString(message));
}
public Builder setTitleTextColor(@ColorRes int titleTxtColor) {
this.titleTxtColor = titleTxtColor;
return this;
}
public Builder setDescriptionTextColor(@ColorRes int desTxtColor) {
this.desTxtColor = desTxtColor;
return this;
}
public Builder setPositiveBtnText(String positiveBtnText) {
this.positiveBtnText = positiveBtnText;
return this;
}
public Builder setPositiveBtnText(@StringRes int positiveBtnText) {
return setPositiveBtnText(context.getString(positiveBtnText));
}
public Builder setPositiveBtnBackground(@ColorRes int pBtnColor) {
this.pBtnColor = pBtnColor;
return this;
}
public Builder setNegativeBtnText(String negativeBtnText) {
this.negativeBtnText = negativeBtnText;
return this;
}
public Builder setNegativeBtnText(@StringRes int negativeBtnText) {
return setNegativeBtnText(context.getString(negativeBtnText));
}
public Builder setNegativeBtnBackground(@ColorRes int nBtnColor) {
this.nBtnColor = nBtnColor;
return this;
}
//set Positive listener
public Builder OnPositiveClicked(FancyGifDialogListener pListener) {
this.pListener = pListener;
return this;
}
//set Negative listener
public Builder OnNegativeClicked(FancyGifDialogListener nListener) {
this.nListener = nListener;
return this;
}
public Builder isCancellable(boolean cancel) {
this.cancel = cancel;
return this;
}
public Builder setOnCancelListener(Dialog.OnCancelListener cancelListener) {
this.cancelListener = cancelListener;
return this;
}
public Builder setGifResource(int gifImageResource) {
this.gifImageResource = gifImageResource;
return this;
}
public FancyGifDialog build() {
TextView message1, title1;
Button nBtn, pBtn;
GifImageView gifImageView;
final Dialog dialog;
dialog = new Dialog(context);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
if (dialog.getWindow() != null)
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.setCancelable(cancel);
dialog.setContentView(R.layout.fancygifdialog);
//getting resources
title1 = dialog.findViewById(R.id.title);
message1 = dialog.findViewById(R.id.message);
nBtn = dialog.findViewById(R.id.negativeBtn);
pBtn = dialog.findViewById(R.id.positiveBtn);
gifImageView = dialog.findViewById(R.id.gifImageView);
gifImageView.setImageResource(gifImageResource);
title1.setText(title);
message1.setText(message);
title1.setTextColor(ContextCompat.getColor(context, titleTxtColor));
message1.setTextColor(ContextCompat.getColor(context, desTxtColor));
if (positiveBtnText != null)
pBtn.setText(positiveBtnText);
if (negativeBtnText != null)
nBtn.setText(negativeBtnText);
GradientDrawable pbgShape = (GradientDrawable) pBtn.getBackground();
pbgShape.setColor(ContextCompat.getColor(context, pBtnColor));
GradientDrawable nbgShape = (GradientDrawable) nBtn.getBackground();
nbgShape.setColor(ContextCompat.getColor(context, nBtnColor));
if (pListener != null) {
pBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
pListener.OnClick();
dialog.dismiss();
}
});
} else {
pBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dialog.dismiss();
}
});
}
if (nListener != null) {
nBtn.setVisibility(View.VISIBLE);
nBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
nListener.OnClick();
dialog.dismiss();
}
});
}
if (cancelListener != null)
dialog.setOnCancelListener(cancelListener);
dialog.show();
return new FancyGifDialog(this);
}
}
}
================================================
FILE: fancygifdialoglib/src/main/java/com/shashank/sony/fancygifdialoglib/FancyGifDialogListener.java
================================================
package com.shashank.sony.fancygifdialoglib;
/**
* Created by Administrator on 11/20/2017.
*/
public interface FancyGifDialogListener {
void OnClick();
}
================================================
FILE: fancygifdialoglib/src/main/res/drawable/curved_shape.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FF4081" />
<corners
android:bottomLeftRadius="40dp"
android:bottomRightRadius="40dp"
android:topLeftRadius="40dp"
android:topRightRadius="40dp" />
</shape>
================================================
FILE: fancygifdialoglib/src/main/res/drawable/curved_shape2.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/darker_gray" />
<corners
android:bottomLeftRadius="60dp"
android:bottomRightRadius="60dp"
android:topLeftRadius="60dp"
android:topRightRadius="60dp" />
</shape>
================================================
FILE: fancygifdialoglib/src/main/res/layout/fancygifdialog.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="10dp"
app:cardElevation="16dp"
app:cardUseCompatPadding="true">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/relativelayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<pl.droidsonroids.gif.GifImageView
android:id="@+id/gifImageView"
android:layout_width="match_parent"
android:layout_height="140dp"
android:layout_centerHorizontal="true"
android:scaleType="centerCrop"
android:src="@drawable/gif1" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/relativelayout1">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="16dp"
tools:text="Granny eating chocolate dialog box" />
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:layout_marginTop="16dp"
android:gravity="center"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textAlignment="center"
android:textSize="14dp"
tools:text="This is a granny eating chocolate dialog box. This library is used to help you easily create fancy gify dialog." />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/message"
android:layout_marginTop="32dp"
android:clipToPadding="false"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingBottom="12dp"
android:weightSum="100">
<Button
android:id="@+id/negativeBtn"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="50"
android:background="@drawable/curved_shape2"
android:textAllCaps="false"
android:textColor="#ffffff"
tools:text="Rate" />
<Button
android:id="@+id/positiveBtn"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="50"
android:background="@drawable/curved_shape"
android:textAllCaps="false"
android:textColor="#ffffff"
tools:text="Ok" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
================================================
FILE: fancygifdialoglib/src/main/res/values/strings.xml
================================================
<resources>
<string name="app_name">fancygifdialoglib</string>
</resources>
================================================
FILE: fancygifdialoglib/src/test/java/com/shashank/sony/fancygifdialoglib/ExampleUnitTest.java
================================================
package com.shashank.sony.fancygifdialoglib;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
#Wed May 08 11:55:32 IST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
================================================
FILE: gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
================================================
FILE: gradlew
================================================
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
================================================
FILE: gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: settings.gradle
================================================
include ':app', ':fancygifdialoglib'
gitextract_m7sh3g1n/ ├── .gitignore ├── .idea/ │ ├── compiler.xml │ ├── encodings.xml │ ├── gradle.xml │ ├── jarRepositories.xml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml ├── LICENSE ├── README.md ├── app/ │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src/ │ ├── androidTest/ │ │ └── java/ │ │ └── com/ │ │ └── shashank/ │ │ └── sony/ │ │ └── fancygifdialoglibrary/ │ │ └── ExampleInstrumentedTest.java │ ├── main/ │ │ ├── AndroidManifest.xml │ │ ├── java/ │ │ │ └── com/ │ │ │ └── shashank/ │ │ │ └── sony/ │ │ │ └── fancygifdialoglibrary/ │ │ │ └── MainActivity.java │ │ └── res/ │ │ ├── drawable/ │ │ │ └── ic_launcher_background.xml │ │ ├── drawable-v24/ │ │ │ └── ic_launcher_foreground.xml │ │ ├── layout/ │ │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26/ │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ └── values/ │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test/ │ └── java/ │ └── com/ │ └── shashank/ │ └── sony/ │ └── fancygifdialoglibrary/ │ └── ExampleUnitTest.java ├── build.gradle ├── fancygifdialoglib/ │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src/ │ ├── androidTest/ │ │ └── java/ │ │ └── com/ │ │ └── shashank/ │ │ └── sony/ │ │ └── fancygifdialoglib/ │ │ └── ExampleInstrumentedTest.java │ ├── main/ │ │ ├── AndroidManifest.xml │ │ ├── java/ │ │ │ └── com/ │ │ │ └── shashank/ │ │ │ └── sony/ │ │ │ └── fancygifdialoglib/ │ │ │ ├── FancyGifDialog.java │ │ │ └── FancyGifDialogListener.java │ │ └── res/ │ │ ├── drawable/ │ │ │ ├── curved_shape.xml │ │ │ └── curved_shape2.xml │ │ ├── layout/ │ │ │ └── fancygifdialog.xml │ │ └── values/ │ │ └── strings.xml │ └── test/ │ └── java/ │ └── com/ │ └── shashank/ │ └── sony/ │ └── fancygifdialoglib/ │ └── ExampleUnitTest.java ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew ├── gradlew.bat └── settings.gradle
SYMBOL INDEX (37 symbols across 7 files)
FILE: app/src/androidTest/java/com/shashank/sony/fancygifdialoglibrary/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 18) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 20) | @Test
FILE: app/src/main/java/com/shashank/sony/fancygifdialoglibrary/MainActivity.java
class MainActivity (line 15) | public class MainActivity extends AppCompatActivity implements View.OnCl...
method onCreate (line 19) | @Override
method onClick (line 30) | @Override
method toaster (line 71) | private void toaster(String message) {
method onPointerCaptureChanged (line 75) | @Override
FILE: app/src/test/java/com/shashank/sony/fancygifdialoglibrary/ExampleUnitTest.java
class ExampleUnitTest (line 12) | public class ExampleUnitTest {
method addition_isCorrect (line 13) | @Test
FILE: fancygifdialoglib/src/androidTest/java/com/shashank/sony/fancygifdialoglib/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 18) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 20) | @Test
FILE: fancygifdialoglib/src/main/java/com/shashank/sony/fancygifdialoglib/FancyGifDialog.java
class FancyGifDialog (line 23) | public class FancyGifDialog {
method FancyGifDialog (line 37) | private FancyGifDialog(Builder builder) {
class Builder (line 55) | public static class Builder {
method Builder (line 67) | public Builder(Context context) {
method setTitle (line 71) | public Builder setTitle(String title) {
method setTitle (line 76) | public Builder setTitle(@StringRes int title) {
method setMessage (line 80) | public Builder setMessage(String message) {
method setMessage (line 85) | public Builder setMessage(@StringRes int message) {
method setTitleTextColor (line 89) | public Builder setTitleTextColor(@ColorRes int titleTxtColor) {
method setDescriptionTextColor (line 94) | public Builder setDescriptionTextColor(@ColorRes int desTxtColor) {
method setPositiveBtnText (line 99) | public Builder setPositiveBtnText(String positiveBtnText) {
method setPositiveBtnText (line 104) | public Builder setPositiveBtnText(@StringRes int positiveBtnText) {
method setPositiveBtnBackground (line 108) | public Builder setPositiveBtnBackground(@ColorRes int pBtnColor) {
method setNegativeBtnText (line 113) | public Builder setNegativeBtnText(String negativeBtnText) {
method setNegativeBtnText (line 118) | public Builder setNegativeBtnText(@StringRes int negativeBtnText) {
method setNegativeBtnBackground (line 122) | public Builder setNegativeBtnBackground(@ColorRes int nBtnColor) {
method OnPositiveClicked (line 128) | public Builder OnPositiveClicked(FancyGifDialogListener pListener) {
method OnNegativeClicked (line 134) | public Builder OnNegativeClicked(FancyGifDialogListener nListener) {
method isCancellable (line 139) | public Builder isCancellable(boolean cancel) {
method setOnCancelListener (line 144) | public Builder setOnCancelListener(Dialog.OnCancelListener cancelLis...
method setGifResource (line 149) | public Builder setGifResource(int gifImageResource) {
method build (line 154) | public FancyGifDialog build() {
FILE: fancygifdialoglib/src/main/java/com/shashank/sony/fancygifdialoglib/FancyGifDialogListener.java
type FancyGifDialogListener (line 7) | public interface FancyGifDialogListener {
method OnClick (line 8) | void OnClick();
FILE: fancygifdialoglib/src/test/java/com/shashank/sony/fancygifdialoglib/ExampleUnitTest.java
class ExampleUnitTest (line 12) | public class ExampleUnitTest {
method addition_isCorrect (line 13) | @Test
Condensed preview — 44 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (75K chars).
[
{
"path": ".gitignore",
"chars": 118,
"preview": "*.iml\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
},
{
"path": ".idea/compiler.xml",
"chars": 170,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"CompilerConfiguration\">\n <bytecodeTar"
},
{
"path": ".idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": ".idea/gradle.xml",
"chars": 790,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"GradleMigrationSettings\" migrationVersio"
},
{
"path": ".idea/jarRepositories.xml",
"chars": 1052,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"RemoteRepositoriesConfiguration\">\n <r"
},
{
"path": ".idea/misc.xml",
"chars": 3788,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"DesignSurface\">\n <option name=\"filePa"
},
{
"path": ".idea/modules.xml",
"chars": 2008,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": ".idea/vcs.xml",
"chars": 180,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 6885,
"preview": "# FancyGifDialog-Android\n[](https://www.android.com"
},
{
"path": "app/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "app/build.gradle",
"chars": 994,
"preview": "apply plugin: 'com.android.application'\n\nandroid {\n compileSdkVersion 31\n defaultConfig {\n applicationId \"c"
},
{
"path": "app/proguard-rules.pro",
"chars": 751,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "app/src/androidTest/java/com/shashank/sony/fancygifdialoglibrary/ExampleInstrumentedTest.java",
"chars": 801,
"preview": "package com.shashank.sony.fancygifdialoglibrary;\n\nimport android.content.Context;\n\nimport androidx.test.ext.junit.runner"
},
{
"path": "app/src/main/AndroidManifest.xml",
"chars": 769,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "app/src/main/java/com/shashank/sony/fancygifdialoglibrary/MainActivity.java",
"chars": 3181,
"preview": "package com.shashank.sony.fancygifdialoglibrary;\n\nimport android.content.Context;\nimport android.content.DialogInterface"
},
{
"path": "app/src/main/res/drawable/ic_launcher_background.xml",
"chars": 5606,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:wi"
},
{
"path": "app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
"chars": 1880,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:aapt=\"http://schemas.android.com/aapt\"\n "
},
{
"path": "app/src/main/res/layout/activity_main.xml",
"chars": 745,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmln"
},
{
"path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
"chars": 272,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
"chars": 272,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "app/src/main/res/values/colors.xml",
"chars": 403,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"colorPrimary\">#3F51B5</color>\n <color name=\"color"
},
{
"path": "app/src/main/res/values/strings.xml",
"chars": 260,
"preview": "<resources>\n <string name=\"app_name\">FancyGifDialogLibrary</string>\n <string name=\"from_resources\">This title came"
},
{
"path": "app/src/main/res/values/styles.xml",
"chars": 383,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
},
{
"path": "app/src/test/java/com/shashank/sony/fancygifdialoglibrary/ExampleUnitTest.java",
"chars": 428,
"preview": "package com.shashank.sony.fancygifdialoglibrary;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\n"
},
{
"path": "build.gradle",
"chars": 375,
"preview": "buildscript {\n \n repositories {\n google()\n jcenter()\n }\n dependencies {\n classpath 'com"
},
{
"path": "fancygifdialoglib/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "fancygifdialoglib/build.gradle",
"chars": 1010,
"preview": "apply plugin: 'com.android.library'\ngroup = 'com.github.Shashank02051997'\n\nandroid {\n compileSdkVersion 31\n\n defau"
},
{
"path": "fancygifdialoglib/proguard-rules.pro",
"chars": 751,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "fancygifdialoglib/src/androidTest/java/com/shashank/sony/fancygifdialoglib/ExampleInstrumentedTest.java",
"chars": 798,
"preview": "package com.shashank.sony.fancygifdialoglib;\n\nimport android.content.Context;\n\nimport androidx.test.ext.junit.runners.An"
},
{
"path": "fancygifdialoglib/src/main/AndroidManifest.xml",
"chars": 59,
"preview": "<manifest package=\"com.shashank.sony.fancygifdialoglib\" />\n"
},
{
"path": "fancygifdialoglib/src/main/java/com/shashank/sony/fancygifdialoglib/FancyGifDialog.java",
"chars": 7578,
"preview": "package com.shashank.sony.fancygifdialoglib;\n\nimport android.app.Dialog;\nimport android.content.Context;\nimport android."
},
{
"path": "fancygifdialoglib/src/main/java/com/shashank/sony/fancygifdialoglib/FancyGifDialogListener.java",
"chars": 162,
"preview": "package com.shashank.sony.fancygifdialoglib;\n\n/**\n * Created by Administrator on 11/20/2017.\n */\n\npublic interface Fancy"
},
{
"path": "fancygifdialoglib/src/main/res/drawable/curved_shape.xml",
"chars": 327,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <solid an"
},
{
"path": "fancygifdialoglib/src/main/res/drawable/curved_shape2.xml",
"chars": 347,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <solid a"
},
{
"path": "fancygifdialoglib/src/main/res/layout/fancygifdialog.xml",
"chars": 5137,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xm"
},
{
"path": "fancygifdialoglib/src/main/res/values/strings.xml",
"chars": 80,
"preview": "<resources>\n <string name=\"app_name\">fancygifdialoglib</string>\n</resources>\n"
},
{
"path": "fancygifdialoglib/src/test/java/com/shashank/sony/fancygifdialoglib/ExampleUnitTest.java",
"chars": 424,
"preview": "package com.shashank.sony.fancygifdialoglib;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\n/**\n"
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 230,
"preview": "#Wed May 08 11:55:32 IST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
},
{
"path": "gradle.properties",
"chars": 783,
"preview": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will o"
},
{
"path": "gradlew",
"chars": 4971,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "gradlew.bat",
"chars": 2314,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "settings.gradle",
"chars": 37,
"preview": "include ':app', ':fancygifdialoglib'\n"
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the Shashank02051997/FancyGifDialog-Android GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 44 files (67.0 KB), approximately 18.2k tokens, and a symbol index with 37 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.