├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── dimens.xml │ │ │ ├── styles.xml │ │ │ └── colors.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── drawable │ │ │ ├── chip_unselected.xml │ │ │ ├── states_fab_button.xml │ │ │ ├── chip_selected.xml │ │ │ ├── done.xml │ │ │ ├── ic_filter.xml │ │ │ └── refresh.xml │ │ └── layout │ │ │ ├── activity_fragment_example.xml │ │ │ ├── single_chip.xml │ │ │ ├── view_filters_sorters.xml │ │ │ ├── fragment_example.xml │ │ │ ├── activity_main_sample.xml │ │ │ ├── activity_menu.xml │ │ │ ├── activity_main.xml │ │ │ ├── filter_sample_view.xml │ │ │ ├── filter_view.xml │ │ │ └── single_movie.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── allattentionhere │ │ └── fabulousfiltersample │ │ ├── FragmentExampleActivity.java │ │ ├── SingleMovie.java │ │ ├── MenuActivity.java │ │ ├── MainSampleActivity.java │ │ ├── MySampleFabFragment.java │ │ ├── ExampleFragment.java │ │ ├── MovieData.java │ │ ├── MoviesAdapter.java │ │ ├── MainActivity.java │ │ ├── MyFabFragment.java │ │ └── Util.java ├── proguard-rules.pro └── build.gradle ├── fabulousfilter ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── anim │ │ │ ├── bottomsheet_enter.xml │ │ │ └── bottomsheet_exit.xml │ │ ├── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── layout │ │ │ └── design_view_pager_bottom_sheet_dialog.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── allattentionhere │ │ └── fabulousfilter │ │ ├── viewpagerbottomsheet │ │ ├── ViewPagerBottomSheetDialogFragment.java │ │ ├── BottomSheetUtils.java │ │ ├── ViewPagerBottomSheetDialog.java │ │ └── ViewPagerBottomSheetBehavior.java │ │ ├── AAH_FilterView.java │ │ ├── AAH_ArcTranslateAnimation.java │ │ └── AAH_FabulousFragment.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── concept.gif ├── newDemo1.gif ├── newDemo2.gif ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── .gitignore ├── scripts ├── publish-root.gradle └── publish-module.gradle ├── gradlew.bat ├── gradlew ├── README.md └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /fabulousfilter/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':fabulousfilter' 2 | include ':scripts' 3 | -------------------------------------------------------------------------------- /concept.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/concept.gif -------------------------------------------------------------------------------- /newDemo1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/newDemo1.gif -------------------------------------------------------------------------------- /newDemo2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/newDemo2.gif -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FabulousFilterSample 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12dp 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krupen/FabulousFilter/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /fabulousfilter/src/main/res/anim/bottomsheet_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Jul 16 12:01:40 BST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /fabulousfilter/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Fabulous Filter Library 3 | com.allattentionhere.fabulousfilter.viewpagerbottomsheet.ViewPagerBottomSheetBehavior 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chip_unselected.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/states_fab_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fabulousfilter/src/main/res/anim/bottomsheet_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /fabulousfilter/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chip_selected.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/done.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /fabulousfilter/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_filter.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_fragment_example.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/refresh.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /fabulousfilter/src/main/java/com/allattentionhere/fabulousfilter/viewpagerbottomsheet/ViewPagerBottomSheetDialogFragment.java: -------------------------------------------------------------------------------- 1 | package com.allattentionhere.fabulousfilter.viewpagerbottomsheet; 2 | 3 | import android.app.Dialog; 4 | import android.os.Bundle; 5 | 6 | import androidx.annotation.NonNull; 7 | 8 | import com.google.android.material.bottomsheet.BottomSheetDialogFragment; 9 | 10 | public class ViewPagerBottomSheetDialogFragment extends BottomSheetDialogFragment { 11 | 12 | @NonNull 13 | @Override 14 | public Dialog onCreateDialog(Bundle savedInstanceState) { 15 | return new ViewPagerBottomSheetDialog(getContext(), getTheme()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #000 4 | #000 5 | #000 6 | #f5f5f5 7 | #464756 8 | 9 | #3f51b5 10 | #303f9f 11 | #ff4081 12 | #c2185b 13 | #b3e5fc 14 | 15 | #ff5722 16 | #795548 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | android.enableJetifier=true 13 | android.useAndroidX=true 14 | org.gradle.jvmargs=-Xmx1536m 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/single_chip.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/krupenghetiya/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /fabulousfilter/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/krupenghetiya/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | 36 | # keys 37 | app/src/main/res/values/keys.xml 38 | 39 | .idea/ 40 | app/app.iml 41 | app/.DS_Store 42 | .DS_Store 43 | 44 | # Intellij 45 | *.iml 46 | .idea/workspace.xml 47 | .idea/tasks.xml 48 | .idea/gradle.xml 49 | .idea/dictionaries 50 | .idea/libraries 51 | 52 | # Keystore files 53 | *.jks 54 | 55 | # External native build folder generated in Android Studio 2.2 and later 56 | .externalNativeBuild 57 | 58 | # Google Services (e.g. APIs or Firebase) 59 | google-services.json 60 | 61 | # Freeline 62 | freeline.py 63 | freeline/ 64 | freeline_project_description.json 65 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 15 | 18 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_filters_sorters.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/allattentionhere/fabulousfiltersample/FragmentExampleActivity.java: -------------------------------------------------------------------------------- 1 | package com.allattentionhere.fabulousfiltersample; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.fragment.app.FragmentTransaction; 6 | import androidx.appcompat.app.AppCompatActivity; 7 | import android.widget.FrameLayout; 8 | 9 | import com.allattentionhere.fabulousfilter.AAH_FabulousFragment; 10 | 11 | public class FragmentExampleActivity extends AppCompatActivity 12 | implements AAH_FabulousFragment.Callbacks { 13 | 14 | FrameLayout frameLayout; 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | setContentView(R.layout.activity_fragment_example); 20 | frameLayout = findViewById(R.id.fl); 21 | 22 | ExampleFragment exampleFragment = ExampleFragment.newInstance(); 23 | FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); 24 | transaction.replace(R.id.fl, exampleFragment, "tag"); 25 | transaction.commitAllowingStateLoss(); 26 | } 27 | 28 | @Override 29 | public void onResult(Object result) { 30 | if (result.toString().equalsIgnoreCase("swiped_down")) { 31 | // do something or nothing 32 | } else { 33 | // handle result 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 33 5 | 6 | defaultConfig { 7 | applicationId "com.allattentionhere.fabulousfiltersample" 8 | minSdkVersion 15 9 | targetSdkVersion 33 10 | versionCode 1 11 | versionName "0.0.1" 12 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(include: ['*.jar'], dir: 'libs') 24 | androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | implementation 'androidx.appcompat:appcompat:1.4.2' 28 | implementation 'com.squareup.picasso:picasso:2.5.2' 29 | implementation 'androidx.cardview:cardview:1.0.0' 30 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 31 | implementation 'com.google.android.material:material:1.6.1' 32 | implementation 'com.google.android.flexbox:flexbox:3.0.0' 33 | testImplementation 'junit:junit:4.12' 34 | implementation project(':fabulousfilter') 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_example.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/allattentionhere/fabulousfiltersample/SingleMovie.java: -------------------------------------------------------------------------------- 1 | package com.allattentionhere.fabulousfiltersample; 2 | 3 | /** Created by krupenghetiya on 27/06/17. */ 4 | public class SingleMovie { 5 | private final String title; 6 | private final String url; 7 | private final String medium_cover_image; 8 | private final String genre; 9 | private final String quality; 10 | private final int year; 11 | private final float rating; 12 | 13 | public SingleMovie( 14 | String title, 15 | String url, 16 | String medium_cover_image, 17 | String genre, 18 | String quality, 19 | int year, 20 | float rating) { 21 | this.title = title; 22 | this.url = url; 23 | this.medium_cover_image = medium_cover_image; 24 | this.genre = genre; 25 | this.quality = quality; 26 | this.year = year; 27 | this.rating = rating; 28 | } 29 | 30 | public String getTitle() { 31 | return title; 32 | } 33 | 34 | public String getUrl() { 35 | return url; 36 | } 37 | 38 | public String getMedium_cover_image() { 39 | return medium_cover_image; 40 | } 41 | 42 | public String getGenre() { 43 | return genre; 44 | } 45 | 46 | public String getQuality() { 47 | return quality; 48 | } 49 | 50 | public int getYear() { 51 | return year; 52 | } 53 | 54 | public float getRating() { 55 | return rating; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main_sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/allattentionhere/fabulousfiltersample/MenuActivity.java: -------------------------------------------------------------------------------- 1 | package com.allattentionhere.fabulousfiltersample; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | 7 | public class MenuActivity extends AppCompatActivity { 8 | 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | setContentView(R.layout.activity_menu); 13 | 14 | findViewById(R.id.btn_bottom) 15 | .setOnClickListener( 16 | v -> { 17 | Intent i = new Intent(MenuActivity.this, MainActivity.class); 18 | i.putExtra("fab", 1); 19 | startActivity(i); 20 | }); 21 | 22 | findViewById(R.id.btn_top) 23 | .setOnClickListener( 24 | v -> { 25 | Intent i = new Intent(MenuActivity.this, MainActivity.class); 26 | i.putExtra("fab", 2); 27 | startActivity(i); 28 | }); 29 | 30 | findViewById(R.id.btn_understanding) 31 | .setOnClickListener( 32 | v -> { 33 | Intent i = new Intent(MenuActivity.this, MainSampleActivity.class); 34 | startActivity(i); 35 | }); 36 | 37 | findViewById(R.id.btn_fragment) 38 | .setOnClickListener( 39 | v -> { 40 | Intent i = new Intent(MenuActivity.this, FragmentExampleActivity.class); 41 | startActivity(i); 42 | }); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /scripts/publish-root.gradle: -------------------------------------------------------------------------------- 1 | // Create variables with empty default values 2 | ext["signing.keyId"] = '' 3 | ext["signing.password"] = '' 4 | ext["signing.secretKeyRingFile"] = '' 5 | ext["ossrhUsername"] = '' 6 | ext["ossrhPassword"] = '' 7 | ext["sonatypeStagingProfileId"] = '' 8 | 9 | File secretPropsFile = project.rootProject.file('local.properties') 10 | if (secretPropsFile.exists()) { 11 | // Read local.properties file first if it exists 12 | Properties p = new Properties() 13 | new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) } 14 | p.each { name, value -> ext[name] = value } 15 | } else { 16 | // Use system environment variables 17 | ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') 18 | ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') 19 | ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') 20 | ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') 21 | ext["signing.password"] = System.getenv('SIGNING_PASSWORD') 22 | ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE') 23 | } 24 | 25 | // Set up Sonatype repository 26 | nexusPublishing { 27 | repositories { 28 | sonatype { 29 | stagingProfileId = sonatypeStagingProfileId 30 | username = ossrhUsername 31 | password = ossrhPassword 32 | nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) 33 | snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /fabulousfilter/src/main/java/com/allattentionhere/fabulousfilter/AAH_FilterView.java: -------------------------------------------------------------------------------- 1 | package com.allattentionhere.fabulousfilter; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.Context; 5 | import android.os.Build; 6 | import com.google.android.material.floatingactionbutton.FloatingActionButton; 7 | import android.util.AttributeSet; 8 | import android.widget.FrameLayout; 9 | 10 | import androidx.annotation.NonNull; 11 | 12 | /** Created by krupenghetiya on 26/06/17. */ 13 | public class AAH_FilterView extends FrameLayout { 14 | @NonNull FrameLayout fabContainer; 15 | @NonNull FloatingActionButton fab; 16 | 17 | public AAH_FilterView(Context context) { 18 | super(context); 19 | init(); 20 | } 21 | 22 | public AAH_FilterView(Context context, AttributeSet attrs) { 23 | super(context, attrs); 24 | init(); 25 | } 26 | 27 | public AAH_FilterView(Context context, AttributeSet attrs, int defStyleAttr) { 28 | super(context, attrs, defStyleAttr); 29 | init(); 30 | } 31 | 32 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 33 | public AAH_FilterView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 34 | super(context, attrs, defStyleAttr, defStyleRes); 35 | init(); 36 | } 37 | 38 | public void init() { 39 | fabContainer = new FrameLayout(getContext()); 40 | fabContainer.setTag("aah_fl"); 41 | fab = new FloatingActionButton(getContext()); 42 | fab.setTag("aah_fab"); 43 | fab.setCompatElevation(0); 44 | fabContainer.addView(fab); 45 | this.addView(fabContainer); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /fabulousfilter/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | ext { 4 | PUBLISH_GROUP_ID = 'io.github.krupen' 5 | PUBLISH_VERSION = '0.0.6' 6 | PUBLISH_ARTIFACT_ID = 'fabulousfilter' 7 | PUBLISH_DESCRIPTION = 'FabulousFilter Android SDK' 8 | PUBLISH_URL = 'https://github.com/krupen/FabulousFilter' 9 | PUBLISH_LICENSE_NAME = 'Apache License' 10 | PUBLISH_LICENSE_URL = 11 | 'https://github.com/Krupen/FabulousFilter#license' 12 | PUBLISH_DEVELOPER_ID = 'krupen' 13 | PUBLISH_DEVELOPER_NAME = 'Krupen Ghetiya' 14 | PUBLISH_DEVELOPER_EMAIL = 'krupen.ghetiya@gmail.com' 15 | PUBLISH_SCM_CONNECTION = 16 | 'scm:git:github.com/krupen/FabulousFilter.git' 17 | PUBLISH_SCM_DEVELOPER_CONNECTION = 18 | 'scm:git:ssh://github.com/krupen/FabulousFilter.git' 19 | PUBLISH_SCM_URL = 20 | 'https://github.com/krupen/FabulousFilter/tree/master' 21 | } 22 | 23 | apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" 24 | 25 | android { 26 | compileSdkVersion 33 27 | 28 | defaultConfig { 29 | minSdkVersion 15 30 | targetSdkVersion 33 31 | 32 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 33 | 34 | } 35 | buildTypes { 36 | release { 37 | minifyEnabled false 38 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 39 | } 40 | } 41 | } 42 | 43 | dependencies { 44 | implementation 'androidx.appcompat:appcompat:1.4.2' 45 | implementation 'com.google.android.material:material:1.6.1' 46 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/allattentionhere/fabulousfiltersample/MainSampleActivity.java: -------------------------------------------------------------------------------- 1 | package com.allattentionhere.fabulousfiltersample; 2 | 3 | import android.content.res.Configuration; 4 | import android.os.Bundle; 5 | import com.google.android.material.floatingactionbutton.FloatingActionButton; 6 | import androidx.annotation.NonNull; 7 | import androidx.appcompat.app.AppCompatActivity; 8 | import android.widget.RelativeLayout; 9 | import com.allattentionhere.fabulousfilter.AAH_FabulousFragment; 10 | 11 | public class MainSampleActivity extends AppCompatActivity 12 | implements AAH_FabulousFragment.Callbacks { 13 | 14 | FloatingActionButton fab; 15 | MySampleFabFragment dialogFragment; 16 | RelativeLayout root; 17 | 18 | @Override 19 | protected void onCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.activity_main_sample); 22 | fab = findViewById(R.id.fab); 23 | root = findViewById(R.id.root); 24 | dialogFragment = MySampleFabFragment.newInstance(); 25 | dialogFragment.setParentFab(fab); 26 | fab.setOnClickListener( 27 | v -> dialogFragment.show(getSupportFragmentManager(), dialogFragment.getTag())); 28 | } 29 | 30 | @Override 31 | public void onResult(Object result) { 32 | if (result.toString().equalsIgnoreCase("swiped_down")) { 33 | // do something or nothing 34 | } else { 35 | // handle result 36 | } 37 | } 38 | 39 | @Override 40 | public void onConfigurationChanged(@NonNull Configuration newConfig) { 41 | super.onConfigurationChanged(newConfig); 42 | if (dialogFragment.isAdded()) { 43 | dialogFragment.dismiss(); 44 | dialogFragment.show(getSupportFragmentManager(), dialogFragment.getTag()); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 |