├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable │ │ │ └── gradient.xml │ │ └── layout │ │ │ └── activity_example.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── yalantis │ │ └── beamazingtoday │ │ └── sample │ │ ├── Goal.java │ │ └── ExampleActivity.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── content_shot_to-do_dribbble.gif ├── library ├── src │ └── main │ │ ├── assets │ │ ├── font.otf │ │ └── avenir.ttf │ │ ├── res │ │ ├── drawable-xxxhdpi │ │ │ ├── ic_menu.png │ │ │ ├── button_checked.png │ │ │ └── button_unchecked.png │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-hdpi │ │ │ ├── button_checked.png │ │ │ └── button_unchecked.png │ │ ├── drawable-ldpi │ │ │ ├── button_checked.png │ │ │ └── button_unchecked.png │ │ ├── drawable-mdpi │ │ │ ├── button_checked.png │ │ │ └── button_unchecked.png │ │ ├── drawable-xhdpi │ │ │ ├── button_checked.png │ │ │ └── button_unchecked.png │ │ ├── drawable-xxhdpi │ │ │ ├── button_checked.png │ │ │ └── button_unchecked.png │ │ ├── drawable │ │ │ ├── list_item_background.xml │ │ │ ├── background_card.xml │ │ │ ├── header_background_rounded.xml │ │ │ ├── recycler_view_background.xml │ │ │ ├── selector_button_add.xml │ │ │ ├── selector_radio_button.xml │ │ │ ├── header_background.xml │ │ │ └── ic_cursor_drawable.xml │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── styles.xml │ │ │ ├── colors.xml │ │ │ ├── attrs.xml │ │ │ └── dimens.xml │ │ ├── values-hdpi │ │ │ └── dimens.xml │ │ ├── values-mdpi │ │ │ └── dimens.xml │ │ ├── values-xhdpi │ │ │ └── dimens.xml │ │ ├── values-xxxhdpi │ │ │ └── dimens.xml │ │ ├── anim │ │ │ ├── blinking_anim.xml │ │ │ └── increasing_anim.xml │ │ ├── values-xxhdpi │ │ │ └── dimens.xml │ │ └── layout │ │ │ ├── bat_add_view.xml │ │ │ ├── bat_edit_text.xml │ │ │ ├── bat_recycler_view.xml │ │ │ ├── list_item.xml │ │ │ └── bat_header_view.xml │ │ ├── java │ │ └── com │ │ │ └── yalantis │ │ │ └── beamazingtoday │ │ │ ├── Constant.java │ │ │ ├── ui │ │ │ ├── callback │ │ │ │ ├── EditListener.java │ │ │ │ ├── OnCursorMovedListener.java │ │ │ │ └── BatCallback.java │ │ │ ├── widget │ │ │ │ ├── WatcherEditText.java │ │ │ │ ├── AddView.java │ │ │ │ ├── BatEditText.java │ │ │ │ ├── BatRecyclerView.java │ │ │ │ └── BatHeaderView.java │ │ │ ├── adapter │ │ │ │ └── BatAdapter.java │ │ │ └── animator │ │ │ │ └── BatItemAnimator.java │ │ │ ├── listeners │ │ │ ├── OnOutsideClickedListener.java │ │ │ ├── MoveAnimationListener.java │ │ │ ├── BatListener.java │ │ │ ├── OnItemClickListener.java │ │ │ └── AnimationListener.java │ │ │ ├── interfaces │ │ │ ├── BatModel.java │ │ │ └── AnimationType.java │ │ │ └── util │ │ │ ├── TypefaceUtil.java │ │ │ └── AnimationUtil.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── gradlew └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':library' 2 | -------------------------------------------------------------------------------- /content_shot_to-do_dribbble.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/content_shot_to-do_dribbble.gif -------------------------------------------------------------------------------- /library/src/main/assets/font.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/assets/font.otf -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /library/src/main/assets/avenir.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/assets/avenir.ttf -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | BeAmazingToday 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/ic_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-xxxhdpi/ic_menu.png -------------------------------------------------------------------------------- /library/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/button_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-hdpi/button_checked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/button_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-hdpi/button_unchecked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/button_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-ldpi/button_checked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/button_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-ldpi/button_unchecked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/button_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-mdpi/button_checked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/button_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-mdpi/button_unchecked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/button_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-xhdpi/button_checked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/button_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-xxhdpi/button_checked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/button_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-xhdpi/button_unchecked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/button_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-xxhdpi/button_unchecked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/button_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-xxxhdpi/button_checked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/button_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yalantis/ToDoList/HEAD/library/src/main/res/drawable-xxxhdpi/button_unchecked.png -------------------------------------------------------------------------------- /library/src/main/res/drawable/list_item_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Be awesome today 3 | Add new goal 4 | Add 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-hdpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 260dp 4 | 240dp 5 | 220dp 6 | -------------------------------------------------------------------------------- /library/src/main/res/values-mdpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 240dp 4 | 220dp 5 | 200dp 6 | -------------------------------------------------------------------------------- /library/src/main/res/values-xhdpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 280dp 4 | 260dp 5 | 240dp 6 | -------------------------------------------------------------------------------- /library/src/main/res/values-xxxhdpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 360dp 4 | 340dp 5 | 320dp 6 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/Constant.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday; 2 | 3 | /** 4 | * Created by galata on 15.07.16. 5 | */ 6 | public class Constant { 7 | 8 | public static final long ANIM_DURATION_MILLIS = 300; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/background_card.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/ui/callback/EditListener.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.ui.callback; 2 | 3 | /** 4 | * Created by irinagalata on 11/29/16. 5 | */ 6 | 7 | public interface EditListener { 8 | 9 | void onStartEdit(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Aug 22 08:24:47 EEST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/header_background_rounded.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/listeners/OnOutsideClickedListener.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.listeners; 2 | 3 | /** 4 | * Created by galata on 30.08.16. 5 | */ 6 | public interface OnOutsideClickedListener { 7 | 8 | void onOutsideClicked(); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/recycler_view_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/ui/callback/OnCursorMovedListener.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.ui.callback; 2 | 3 | /** 4 | * Created by irinagalata on 11/29/16. 5 | */ 6 | 7 | public interface OnCursorMovedListener { 8 | 9 | void onCursorMoved(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/selector_button_add.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/selector_radio_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/listeners/MoveAnimationListener.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.listeners; 2 | 3 | /** 4 | * Created by galata on 25.08.16. 5 | */ 6 | public interface MoveAnimationListener { 7 | 8 | void onAnimationStarted(); 9 | 10 | void onAnimationFinished(); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/header_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/interfaces/BatModel.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.interfaces; 2 | 3 | /** 4 | * Created by galata on 22.08.16. 5 | */ 6 | public interface BatModel { 7 | 8 | boolean isChecked(); 9 | 10 | String getText(); 11 | 12 | void setChecked(boolean checked); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/listeners/BatListener.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.listeners; 2 | 3 | /** 4 | * Created by galata on 22.08.16. 5 | */ 6 | public interface BatListener { 7 | 8 | void add(String string); 9 | 10 | void delete(int position); 11 | 12 | void move(int from, int to); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /library/src/main/res/anim/blinking_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/gradient.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/listeners/OnItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.listeners; 2 | 3 | import com.yalantis.beamazingtoday.interfaces.BatModel; 4 | 5 | /** 6 | * Created by galata on 26.08.16. 7 | */ 8 | public interface OnItemClickListener { 9 | 10 | void onClick(BatModel item, int position); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/listeners/AnimationListener.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.listeners; 2 | 3 | /** 4 | * Created by galata on 15.07.16. 5 | */ 6 | public interface AnimationListener { 7 | 8 | void onIncreaseAnimationStarted(); 9 | 10 | void onDecreaseAnimationStarted(); 11 | 12 | void onAddAnimationStarted(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/ic_cursor_drawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /library/src/main/res/values-xxhdpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 300dp 4 | 280dp 5 | 260dp 6 | 3dp 7 | 20dp 8 | 1dp 9 | -------------------------------------------------------------------------------- /library/src/main/res/anim/increasing_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/interfaces/AnimationType.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.interfaces; 2 | 3 | import android.support.annotation.IntDef; 4 | 5 | /** 6 | * Created by galata on 22.08.16. 7 | */ 8 | 9 | @IntDef({AnimationType.ADD, AnimationType.REMOVE, AnimationType.MOVE}) 10 | public @interface AnimationType { 11 | 12 | int ADD = 0; 13 | 14 | int REMOVE = 1; 15 | 16 | int MOVE = 2; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /library/src/main/res/layout/bat_add_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /library/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /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 /home/igalata/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 | -------------------------------------------------------------------------------- /library/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 /home/igalata/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 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.3" 6 | 7 | defaultConfig { 8 | applicationId "com.yalantis.beamazingtoday" 9 | minSdkVersion 16 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | compile 'com.android.support:appcompat-v7:23.4.0' 25 | compile project(':library') 26 | } 27 | -------------------------------------------------------------------------------- /library/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #08ADEF 8 | #BBCEE4 9 | #94DEFF 10 | #DEDEDE 11 | #00ffffff 12 | #383939 13 | #EFEFF1 14 | #96CCEB 15 | #EEEEF0 16 | 17 | -------------------------------------------------------------------------------- /library/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/yalantis/beamazingtoday/sample/Goal.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.sample; 2 | 3 | import com.yalantis.beamazingtoday.interfaces.BatModel; 4 | 5 | /** 6 | * Created by galata on 22.08.16. 7 | */ 8 | public class Goal implements BatModel { 9 | 10 | private String name; 11 | 12 | private boolean isChecked; 13 | 14 | public Goal(String name) { 15 | this.name = name; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public void setName(String name) { 23 | this.name = name; 24 | } 25 | 26 | public void setChecked(boolean checked) { 27 | isChecked = checked; 28 | } 29 | 30 | @Override 31 | public boolean isChecked() { 32 | return isChecked; 33 | } 34 | 35 | @Override 36 | public String getText() { 37 | return getName(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /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 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/util/TypefaceUtil.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.util; 2 | 3 | import android.content.Context; 4 | import android.graphics.Typeface; 5 | 6 | /** 7 | * Created by galata on 26.07.16. 8 | */ 9 | public class TypefaceUtil { 10 | 11 | private static final String FONT_NAME = "font.otf"; 12 | private static final String AVENIR_FONT_NAME = "avenir.ttf"; 13 | 14 | private static Typeface sTypeface; 15 | private static Typeface sAvenirTypeface; 16 | 17 | public static Typeface getTypeface(Context context) { 18 | if (sTypeface == null) { 19 | sTypeface = Typeface.createFromAsset(context.getAssets(), FONT_NAME); 20 | } 21 | 22 | return sTypeface; 23 | } 24 | 25 | public static Typeface getAvenirTypeface(Context context) { 26 | if (sAvenirTypeface == null) { 27 | sAvenirTypeface = Typeface.createFromAsset(context.getAssets(), AVENIR_FONT_NAME); 28 | } 29 | 30 | return sAvenirTypeface; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/ui/callback/BatCallback.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.ui.callback; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | import android.support.v7.widget.helper.ItemTouchHelper; 5 | 6 | import com.yalantis.beamazingtoday.listeners.BatListener; 7 | 8 | /** 9 | * Created by galata on 18.07.16. 10 | */ 11 | public class BatCallback extends ItemTouchHelper.SimpleCallback { 12 | 13 | private BatListener mListener; 14 | 15 | public BatCallback(BatListener listener) { 16 | super(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT); 17 | mListener = listener; 18 | } 19 | 20 | @Override 21 | public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) { 22 | return false; 23 | } 24 | 25 | @Override 26 | public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { 27 | if (mListener != null) { 28 | mListener.delete(viewHolder.getAdapterPosition()); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /library/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | 24dp 7 | 16dp 8 | 24dp 9 | 4.5dp 10 | 22dp 11 | 16dp 12 | 6dp 13 | 10dp 14 | 18sp 15 | 20sp 16 | 2dp 17 | 60dp 18 | 10dp 19 | 360dp 20 | 80dp 21 | 20dp 22 | 0.7dp 23 | 24 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'android-apt' 3 | apply plugin: 'com.jakewharton.butterknife' 4 | 5 | android { 6 | compileSdkVersion 23 7 | buildToolsVersion "23.0.3" 8 | 9 | defaultConfig { 10 | minSdkVersion 16 11 | targetSdkVersion 23 12 | versionCode 1 13 | versionName "1.0" 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | } 22 | 23 | dependencies { 24 | compile fileTree(dir: 'libs', include: ['*.jar']) 25 | compile 'com.android.support:appcompat-v7:23.4.0' 26 | compile 'com.android.support:recyclerview-v7:23.4.0' 27 | compile 'com.android.support:design:23.4.0' 28 | 29 | //RX 30 | compile('io.reactivex:rxandroid:1.1.0') { 31 | exclude module: 'rxjava' 32 | } 33 | compile 'io.reactivex:rxjava:1.1.0' 34 | compile 'com.jakewharton.rxbinding:rxbinding:0.4.0' 35 | compile 'com.jakewharton:butterknife:8.2.1' 36 | apt 'com.jakewharton:butterknife-compiler:8.2.1' 37 | } 38 | -------------------------------------------------------------------------------- /library/src/main/res/layout/bat_edit_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 26 | 27 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/ui/widget/WatcherEditText.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.ui.widget; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.EditText; 6 | 7 | import com.yalantis.beamazingtoday.ui.callback.OnCursorMovedListener; 8 | 9 | /** 10 | * Created by irinagalata on 11/29/16. 11 | */ 12 | 13 | public class WatcherEditText extends EditText { 14 | 15 | private OnCursorMovedListener mListener; 16 | 17 | public WatcherEditText(Context context) { 18 | super(context); 19 | } 20 | 21 | public WatcherEditText(Context context, AttributeSet attrs) { 22 | super(context, attrs); 23 | } 24 | 25 | public WatcherEditText(Context context, AttributeSet attrs, int defStyleAttr) { 26 | super(context, attrs, defStyleAttr); 27 | } 28 | 29 | public void setCursorListener(OnCursorMovedListener listener) { 30 | mListener = listener; 31 | } 32 | 33 | @Override 34 | protected void onSelectionChanged(int selStart, int selEnd) { 35 | super.onSelectionChanged(selStart, selEnd); 36 | 37 | if (mListener != null) { 38 | mListener.onCursorMoved(); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_example.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 25 | 26 | 27 | 28 | 36 | 37 | -------------------------------------------------------------------------------- /library/src/main/res/layout/bat_recycler_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 22 | 23 | 31 | 32 | 37 | 38 | 45 | -------------------------------------------------------------------------------- /library/src/main/res/layout/list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 18 | 19 | 27 | 28 | 40 | 41 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /library/src/main/java/com/yalantis/beamazingtoday/ui/widget/AddView.java: -------------------------------------------------------------------------------- 1 | package com.yalantis.beamazingtoday.ui.widget; 2 | 3 | import android.content.Context; 4 | import android.content.res.ColorStateList; 5 | import android.support.annotation.ColorInt; 6 | import android.support.annotation.Nullable; 7 | import android.support.v7.widget.AppCompatImageView; 8 | import android.util.AttributeSet; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.animation.AnimationUtils; 12 | import android.widget.FrameLayout; 13 | import android.widget.ImageView; 14 | 15 | import com.yalantis.beamazingtoday.R2; 16 | import com.yalantis.beamazingtoday.util.AnimationUtil; 17 | import com.yalantis.beamazingtoday.R; 18 | 19 | import butterknife.BindView; 20 | import butterknife.ButterKnife; 21 | 22 | /** 23 | * Created by galata on 14.07.16. 24 | */ 25 | public class AddView extends FrameLayout { 26 | 27 | private static final int START_POSITION = 90; 28 | private static final int END_POSITION = 180; 29 | 30 | @BindView(R2.id.view_horizontal) 31 | AppCompatImageView mHorizontalView; 32 | @BindView(R2.id.view_vertical) 33 | AppCompatImageView mVerticalView; 34 | 35 | public AddView(Context context) { 36 | this(context, null); 37 | } 38 | 39 | public AddView(Context context, AttributeSet attrs) { 40 | this(context, attrs, 0); 41 | } 42 | 43 | public AddView(Context context, AttributeSet attrs, int defStyleAttr) { 44 | super(context, attrs, defStyleAttr); 45 | LayoutInflater.from(context).inflate(R.layout.bat_add_view, this, true); 46 | ButterKnife.bind(this); 47 | } 48 | 49 | public void rotate(@Nullable Runnable endAction) { 50 | AnimationUtil.rotate(mHorizontalView, END_POSITION, endAction); 51 | } 52 | 53 | public void rotateBack(@Nullable Runnable endAction) { 54 | AnimationUtil.rotate(mHorizontalView, START_POSITION, endAction); 55 | } 56 | 57 | public void increase() { 58 | setVisibility(VISIBLE); 59 | setAlpha(1); 60 | mHorizontalView.setRotation(START_POSITION); 61 | startAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.increasing_anim)); 62 | } 63 | 64 | public void show() { 65 | AnimationUtil.show(this); 66 | } 67 | 68 | public void hide() { 69 | AnimationUtil.hide(this); 70 | } 71 | 72 | void setColor(@ColorInt int color) { 73 | ColorStateList list = ColorStateList.valueOf(color); 74 | mHorizontalView.setSupportBackgroundTintList(list); 75 | mVerticalView.setSupportBackgroundTintList(list); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /library/src/main/res/layout/bat_header_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | 19 | 28 | 29 | 36 | 37 |