├── .gitignore
├── README.md
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── lib
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── claudiodegio
│ │ └── msv
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── claudiodegio
│ │ │ └── msv
│ │ │ ├── AnimationUtil.java
│ │ │ ├── BaseMaterialSearchView.java
│ │ │ ├── FilterMaterialSearchView.java
│ │ │ ├── MaterialSearchView.java
│ │ │ ├── OnFilterViewListener.java
│ │ │ ├── OnSearchViewListener.java
│ │ │ ├── SuggestionMaterialSearchView.java
│ │ │ ├── adapter
│ │ │ ├── FilterRvAdapter.java
│ │ │ ├── SearchSuggestRvAdapter.java
│ │ │ └── SelectFilterRvAdapter.java
│ │ │ ├── model
│ │ │ ├── BaseElement.java
│ │ │ ├── Filter.java
│ │ │ └── Section.java
│ │ │ └── recycleview
│ │ │ └── RecyclerItemClickListener.java
│ └── res
│ │ ├── drawable-hdpi
│ │ ├── ic_close_circle_grey600_24dp.png
│ │ ├── ic_close_grey600_24dp.png
│ │ ├── ic_information_outline_grey600_24dp.png
│ │ └── ic_keyboard_backspace_grey600_24dp.png
│ │ ├── drawable-mdpi
│ │ ├── ic_close_circle_grey600_24dp.png
│ │ ├── ic_close_grey600_24dp.png
│ │ ├── ic_information_outline_grey600_24dp.png
│ │ └── ic_keyboard_backspace_grey600_24dp.png
│ │ ├── drawable-xhdpi
│ │ ├── ic_close_circle_grey600_24dp.png
│ │ ├── ic_close_grey600_24dp.png
│ │ ├── ic_information_outline_grey600_24dp.png
│ │ └── ic_keyboard_backspace_grey600_24dp.png
│ │ ├── drawable-xxhdpi
│ │ ├── ic_close_circle_grey600_24dp.png
│ │ ├── ic_close_grey600_24dp.png
│ │ ├── ic_information_outline_grey600_24dp.png
│ │ └── ic_keyboard_backspace_grey600_24dp.png
│ │ ├── drawable-xxxhdpi
│ │ ├── ic_close_circle_grey600_24dp.png
│ │ ├── ic_close_grey600_24dp.png
│ │ ├── ic_information_outline_grey600_24dp.png
│ │ └── ic_keyboard_backspace_grey600_24dp.png
│ │ ├── drawable
│ │ └── msv_filter_background.xml
│ │ ├── layout
│ │ ├── msv_filter.xml
│ │ ├── msv_filter_civ.xml
│ │ ├── msv_filter_iv.xml
│ │ ├── msv_item_suggestion.xml
│ │ ├── msv_select_filter_item.xml
│ │ ├── msv_select_filter_section.xml
│ │ ├── msv_simple.xml
│ │ └── msv_suggestions.xml
│ │ ├── values-v21
│ │ └── style.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ ├── color.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── style.xml
│ └── test
│ └── java
│ └── com
│ └── claudiodegio
│ └── msv
│ └── ExampleUnitTest.java
├── sample
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── claudiodegio
│ │ └── sample
│ │ └── msv
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── claudiodegio
│ │ │ └── sample
│ │ │ └── msv
│ │ │ ├── BaseMatSearchViewActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MatSearchViewActivity.java
│ │ │ ├── MatSearchViewFilterActivity.java
│ │ │ ├── MatSearchViewSuggestionActivity.java
│ │ │ └── ThemedMatSearchViewActivity.java
│ └── res
│ │ ├── drawable-hdpi
│ │ ├── cat_duck_100dp.png
│ │ ├── cat_duck_48dp.png
│ │ ├── cat_elephant_100dp.png
│ │ ├── cat_elephant_48dp.png
│ │ ├── cat_forest_100dp.png
│ │ ├── cat_forest_48dp.png
│ │ ├── cat_frog_100dp.png
│ │ ├── cat_frog_48dp.png
│ │ ├── cat_mountain_100dp.png
│ │ ├── cat_mountain_48dp.png
│ │ ├── cat_tent_100dp.png
│ │ ├── cat_tent_48dp.png
│ │ ├── ic_magnify_black_18dp.png
│ │ ├── ic_magnify_black_24dp.png
│ │ ├── ic_magnify_black_36dp.png
│ │ ├── ic_magnify_black_48dp.png
│ │ ├── ic_magnify_grey600_18dp.png
│ │ ├── ic_magnify_grey600_24dp.png
│ │ ├── ic_magnify_grey600_36dp.png
│ │ ├── ic_magnify_grey600_48dp.png
│ │ ├── ic_magnify_white_18dp.png
│ │ ├── ic_magnify_white_24dp.png
│ │ ├── ic_magnify_white_36dp.png
│ │ └── ic_magnify_white_48dp.png
│ │ ├── drawable-mdpi
│ │ ├── cat_duck_100dp.png
│ │ ├── cat_duck_48dp.png
│ │ ├── cat_elephant_100dp.png
│ │ ├── cat_elephant_48dp.png
│ │ ├── cat_forest_100dp.png
│ │ ├── cat_forest_48dp.png
│ │ ├── cat_frog_100dp.png
│ │ ├── cat_frog_48dp.png
│ │ ├── cat_mountain_100dp.png
│ │ ├── cat_mountain_48dp.png
│ │ ├── cat_tent_100dp.png
│ │ ├── cat_tent_48dp.png
│ │ ├── ic_magnify_black_18dp.png
│ │ ├── ic_magnify_black_24dp.png
│ │ ├── ic_magnify_black_36dp.png
│ │ ├── ic_magnify_black_48dp.png
│ │ ├── ic_magnify_grey600_18dp.png
│ │ ├── ic_magnify_grey600_24dp.png
│ │ ├── ic_magnify_grey600_36dp.png
│ │ ├── ic_magnify_grey600_48dp.png
│ │ ├── ic_magnify_white_18dp.png
│ │ ├── ic_magnify_white_24dp.png
│ │ ├── ic_magnify_white_36dp.png
│ │ └── ic_magnify_white_48dp.png
│ │ ├── drawable-xhdpi
│ │ ├── cat_duck_100dp.png
│ │ ├── cat_duck_48dp.png
│ │ ├── cat_elephant_100dp.png
│ │ ├── cat_elephant_48dp.png
│ │ ├── cat_forest_100dp.png
│ │ ├── cat_forest_48dp.png
│ │ ├── cat_frog_100dp.png
│ │ ├── cat_frog_48dp.png
│ │ ├── cat_mountain_100dp.png
│ │ ├── cat_mountain_48dp.png
│ │ ├── cat_tent_100dp.png
│ │ ├── cat_tent_48dp.png
│ │ ├── ic_magnify_black_18dp.png
│ │ ├── ic_magnify_black_24dp.png
│ │ ├── ic_magnify_black_36dp.png
│ │ ├── ic_magnify_black_48dp.png
│ │ ├── ic_magnify_grey600_18dp.png
│ │ ├── ic_magnify_grey600_24dp.png
│ │ ├── ic_magnify_grey600_36dp.png
│ │ ├── ic_magnify_grey600_48dp.png
│ │ ├── ic_magnify_white_18dp.png
│ │ ├── ic_magnify_white_24dp.png
│ │ ├── ic_magnify_white_36dp.png
│ │ └── ic_magnify_white_48dp.png
│ │ ├── drawable-xxhdpi
│ │ ├── cat_duck_100dp.png
│ │ ├── cat_duck_48dp.png
│ │ ├── cat_elephant_100dp.png
│ │ ├── cat_elephant_48dp.png
│ │ ├── cat_forest_100dp.png
│ │ ├── cat_forest_48dp.png
│ │ ├── cat_frog_100dp.png
│ │ ├── cat_frog_48dp.png
│ │ ├── cat_mountain_100dp.png
│ │ ├── cat_mountain_48dp.png
│ │ ├── cat_tent_100dp.png
│ │ ├── cat_tent_48dp.png
│ │ ├── ic_magnify_black_18dp.png
│ │ ├── ic_magnify_black_24dp.png
│ │ ├── ic_magnify_black_36dp.png
│ │ ├── ic_magnify_black_48dp.png
│ │ ├── ic_magnify_grey600_18dp.png
│ │ ├── ic_magnify_grey600_24dp.png
│ │ ├── ic_magnify_grey600_36dp.png
│ │ ├── ic_magnify_grey600_48dp.png
│ │ ├── ic_magnify_white_18dp.png
│ │ ├── ic_magnify_white_24dp.png
│ │ ├── ic_magnify_white_36dp.png
│ │ └── ic_magnify_white_48dp.png
│ │ ├── drawable-xxxhdpi
│ │ ├── cat_duck_100dp.png
│ │ ├── cat_duck_48dp.png
│ │ ├── cat_elephant_100dp.png
│ │ ├── cat_elephant_48dp.png
│ │ ├── cat_forest_100dp.png
│ │ ├── cat_forest_48dp.png
│ │ ├── cat_frog_100dp.png
│ │ ├── cat_frog_48dp.png
│ │ ├── cat_mountain_100dp.png
│ │ ├── cat_mountain_48dp.png
│ │ ├── cat_tent_100dp.png
│ │ ├── cat_tent_48dp.png
│ │ ├── ic_magnify_black_18dp.png
│ │ ├── ic_magnify_black_24dp.png
│ │ ├── ic_magnify_black_36dp.png
│ │ ├── ic_magnify_black_48dp.png
│ │ ├── ic_magnify_grey600_18dp.png
│ │ ├── ic_magnify_grey600_24dp.png
│ │ ├── ic_magnify_grey600_36dp.png
│ │ ├── ic_magnify_grey600_48dp.png
│ │ ├── ic_magnify_white_18dp.png
│ │ ├── ic_magnify_white_24dp.png
│ │ ├── ic_magnify_white_36dp.png
│ │ └── ic_magnify_white_48dp.png
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── test_msv_filter.xml
│ │ ├── test_msv_simple.xml
│ │ ├── test_msv_suggestions.xml
│ │ └── test_msv_themed_simple.xml
│ │ ├── menu
│ │ └── test_adv_serach_view.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
│ │ ├── values-v21
│ │ └── styles.xml
│ │ └── values
│ │ ├── cat_array.xml
│ │ ├── cat_color.xml
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ ├── styles.xml
│ │ └── test_arrays.xml
│ └── test
│ └── java
│ └── com
│ └── claudiodegio
│ └── sample
│ └── msv
│ └── ExampleUnitTest.java
├── screen
├── Resized-1.png
├── Resized-2.png
├── Resized-3.png
├── Resized-4.png
├── device1.png
├── device2.png
├── device3.png
├── device4.png
└── device5.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 | .idea/
11 | Icons.txt
12 | immagini/
13 | sample/sample-release.apk
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://android-arsenal.com/details/1/4765)
2 |
3 | # Material Search View
4 | Cute library to implement SearchView in a Material Design Approach. *Works from Android API 14 (ICS) and above*.
5 |
6 |
7 |
9 |
10 |
11 | 
12 | 
13 | 
14 | 
15 |
16 |
17 | # Usage
18 | **Add the dependencies to your gradle file:**
19 | ```javascript
20 | allprojects {
21 | repositories {
22 | ...
23 | maven { url 'https://jitpack.io' }
24 | }
25 | }
26 | dependencies {
27 | compile 'com.github.claudiodegio:MsvSearch:1.0.0'
28 | }
29 | ```
30 | **Add MaterialSearchView to your layout file along with the Toolbar** *(Add this block at the bottom of your layout, in order to display it over the rest of the view)*:
31 |
32 | ```xml
33 |
34 |
38 |
39 |
44 |
45 |
50 |
51 |
52 | ```
53 |
54 | **Create a menu resource file and add the search item into the menu file:**
55 | ```xml
56 |
66 | ```
67 | **Add define it in the *onCreateOptionsMenu*:**
68 | ```java
69 | @Override
70 | public boolean onCreateOptionsMenu(Menu menu) {
71 | getMenuInflater().inflate(R.menu.menu_main, menu);
72 |
73 | MenuItem item = menu.findItem(R.id.action_search);
74 | searchView.setMenuItem(item);
75 |
76 | return true;
77 | }
78 | ```
79 |
80 | **Implement following methods from OnSearchViewListener**
81 | ```java
82 | @Override
83 | public void onSearchViewShown() {
84 |
85 | }
86 |
87 | @Override
88 | public void onSearchViewClosed() {
89 |
90 | }
91 |
92 | @Override
93 | public boolean onQueryTextSubmit(String query) {
94 | // handle text submit and then return true
95 | return false;
96 | }
97 |
98 | @Override
99 | public void onQueryTextChange(String newText) {
100 |
101 | }
102 | ```
103 | **Hook your OnSearchViewListener and don't forget to add toolbar and set it as support action bar!!**
104 | ```java
105 | @Override
106 | protected void onCreate(@Nullable Bundle savedInstanceState) {
107 | super.onCreate(savedInstanceState);
108 | setContentView(R.layout.test_msv_simple);
109 |
110 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
111 | setSupportActionBar(toolbar);
112 |
113 | mSearchView = (MaterialSearchView) findViewById(R.id.sv);
114 | mSearchView.setOnSearchViewListener(this); // this class implements OnSearchViewListener
115 | }
116 | ```
117 |
118 | **More detailed and advanced examples coming soon!**
119 |
120 |
121 |
122 | # Help me
123 | Pull requests are more than welcome, help me and others improve this awesome library.
124 |
125 | # License
126 | Copyright 2016 Claudio Degioanni
127 |
128 | Licensed under the Apache License, Version 2.0 (the "License");
129 | you may not use this file except in compliance with the License.
130 | You may obtain a copy of the License at
131 |
132 | http://www.apache.org/licenses/LICENSE-2.0
133 |
134 | Unless required by applicable law or agreed to in writing, software
135 | distributed under the License is distributed on an "AS IS" BASIS,
136 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
137 | See the License for the specific language governing permissions and
138 | limitations under the License.
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.0.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | google()
19 | }
20 | }
21 |
22 | task clean(type: Delete) {
23 | delete rootProject.buildDir
24 | }
25 |
--------------------------------------------------------------------------------
/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 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Oct 12 23:07:21 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/lib/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 27
5 | buildToolsVersion "26.0.2"
6 |
7 | defaultConfig {
8 | minSdkVersion 15
9 | targetSdkVersion 27
10 | versionCode 2
11 | versionName "1.3.0"
12 |
13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14 |
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 | }
23 |
24 | dependencies {
25 | implementation 'com.android.support:appcompat-v7:27.0.2'
26 | implementation 'com.android.support:recyclerview-v7:27.0.2'
27 |
28 | // Immagini circolari
29 | implementation 'de.hdodenhof:circleimageview:2.2.0'
30 | }
31 |
--------------------------------------------------------------------------------
/lib/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 D:\IDE\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 |
--------------------------------------------------------------------------------
/lib/src/androidTest/java/com/claudiodegio/msv/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.claudiodegio.msv.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/AnimationUtil.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv;
2 |
3 | /**
4 | * Created by claud on 22/11/2016.
5 | */
6 |
7 | import android.animation.Animator;
8 | import android.animation.AnimatorListenerAdapter;
9 | import android.annotation.TargetApi;
10 | import android.os.Build;
11 | import android.support.v4.view.ViewCompat;
12 | import android.support.v4.view.ViewPropertyAnimatorListener;
13 | import android.util.TypedValue;
14 | import android.view.View;
15 | import android.view.ViewAnimationUtils;
16 |
17 | /**
18 | * @author Miguel Catalan Bañuls
19 | */
20 | public class AnimationUtil {
21 |
22 | public static int ANIMATION_DURATION_SHORT = 150;
23 | public static int ANIMATION_DURATION_MEDIUM = 400;
24 | public static int ANIMATION_DURATION_LONG = 800;
25 |
26 | public interface AnimationListener {
27 | /**
28 | * @return true to override parent. Else execute Parent method
29 | */
30 | boolean onAnimationStart(View view);
31 |
32 | boolean onAnimationEnd(View view);
33 |
34 | boolean onAnimationCancel(View view);
35 | }
36 |
37 | public static void crossFadeViews(View showView, View hideView) {
38 | crossFadeViews(showView, hideView, ANIMATION_DURATION_SHORT);
39 | }
40 |
41 | public static void crossFadeViews(View showView, final View hideView, int duration) {
42 | fadeInView(showView, duration);
43 | fadeOutView(hideView, duration);
44 | }
45 |
46 | public static void fadeInView(View view) {
47 | fadeInView(view, ANIMATION_DURATION_SHORT);
48 | }
49 |
50 | public static void fadeInView(View view, int duration) {
51 | fadeInView(view, duration, null);
52 | }
53 |
54 | public static void fadeInView(View view, int duration, final AnimationUtil.AnimationListener listener) {
55 | view.setVisibility(View.VISIBLE);
56 | view.setAlpha(0f);
57 | ViewPropertyAnimatorListener vpListener = null;
58 |
59 | if (listener != null) {
60 | vpListener = new ViewPropertyAnimatorListener() {
61 | @Override
62 | public void onAnimationStart(View view) {
63 | if (!listener.onAnimationStart(view)) {
64 | view.setDrawingCacheEnabled(true);
65 | }
66 | }
67 |
68 | @Override
69 | public void onAnimationEnd(View view) {
70 | if (!listener.onAnimationEnd(view)) {
71 | view.setDrawingCacheEnabled(false);
72 | }
73 | }
74 |
75 | @Override
76 | public void onAnimationCancel(View view) {
77 | }
78 | };
79 | }
80 | ViewCompat.animate(view).alpha(1f).setDuration(duration).setListener(vpListener);
81 | }
82 |
83 | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
84 | public static void reveal(final View view, final AnimationUtil.AnimationListener listener) {
85 | int cx = view.getWidth() - (int) TypedValue.applyDimension(
86 | TypedValue.COMPLEX_UNIT_DIP, 24, view.getResources().getDisplayMetrics());
87 | int cy = view.getHeight() / 2;
88 | int finalRadius = Math.max(view.getWidth(), view.getHeight());
89 |
90 | Animator anim = ViewAnimationUtils.createCircularReveal(view, cx, cy, 0, finalRadius);
91 | view.setVisibility(View.VISIBLE);
92 | anim.addListener(new AnimatorListenerAdapter() {
93 | @Override
94 | public void onAnimationStart(Animator animation) {
95 | listener.onAnimationStart(view);
96 | }
97 |
98 | @Override
99 | public void onAnimationEnd(Animator animation) {
100 | listener.onAnimationEnd(view);
101 | }
102 |
103 | @Override
104 | public void onAnimationCancel(Animator animation) {
105 | listener.onAnimationCancel(view);
106 | }
107 |
108 | @Override
109 | public void onAnimationRepeat(Animator animation) {
110 |
111 | }
112 | });
113 | anim.start();
114 | }
115 |
116 | public static void fadeOutView(View view) {
117 | fadeOutView(view, ANIMATION_DURATION_SHORT);
118 | }
119 |
120 | public static void fadeOutView(View view, int duration) {
121 | fadeOutView(view, duration, null);
122 | }
123 |
124 | public static void fadeOutView(View view, int duration, final AnimationUtil.AnimationListener listener) {
125 | ViewCompat.animate(view).alpha(0f).setDuration(duration).setListener(new ViewPropertyAnimatorListener() {
126 | @Override
127 | public void onAnimationStart(View view) {
128 | if (listener == null || !listener.onAnimationStart(view)) {
129 | view.setDrawingCacheEnabled(true);
130 | }
131 | }
132 |
133 | @Override
134 | public void onAnimationEnd(View view) {
135 | if (listener == null || !listener.onAnimationEnd(view)) {
136 | view.setVisibility(View.GONE);
137 | view.setDrawingCacheEnabled(false);
138 | }
139 | }
140 |
141 | @Override
142 | public void onAnimationCancel(View view) {
143 | }
144 | });
145 | }
146 | }
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/BaseMaterialSearchView.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.graphics.drawable.Drawable;
6 | import android.os.Build;
7 | import android.os.Parcel;
8 | import android.os.Parcelable;
9 | import android.text.Editable;
10 | import android.text.TextWatcher;
11 | import android.util.AttributeSet;
12 | import android.util.Log;
13 | import android.view.KeyEvent;
14 | import android.view.LayoutInflater;
15 | import android.view.MenuItem;
16 | import android.view.View;
17 | import android.view.ViewGroup;
18 | import android.view.inputmethod.EditorInfo;
19 | import android.view.inputmethod.InputMethodManager;
20 | import android.widget.EditText;
21 | import android.widget.FrameLayout;
22 | import android.widget.ImageButton;
23 | import android.widget.TextView;
24 |
25 | public abstract class BaseMaterialSearchView extends FrameLayout implements View.OnClickListener, View.OnFocusChangeListener, TextView.OnEditorActionListener, TextWatcher {
26 |
27 | final static String TAG = "BMSV";
28 |
29 | protected EditText mETSearchText;
30 | protected ImageButton mBtBack;
31 | protected ImageButton mBtClear;
32 | protected ViewGroup mSearchTopBar;
33 | protected OnSearchViewListener mListener;
34 |
35 | private boolean mIsOpen = false;
36 | protected boolean mIgnoreNextTextChange = false;
37 |
38 | public BaseMaterialSearchView(Context context) {
39 | this(context, null);
40 | }
41 |
42 | public BaseMaterialSearchView(Context context, AttributeSet attrs) {
43 | this(context, attrs, 0);
44 | }
45 |
46 | public BaseMaterialSearchView(Context context, AttributeSet attrs, int defStyleAttr) {
47 | super(context, attrs, defStyleAttr);
48 | initView();
49 |
50 | initStyle(attrs, defStyleAttr);
51 | }
52 |
53 | private void initStyle(AttributeSet attrs, int defStyleAttr) {
54 | final TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.Msv, defStyleAttr, 0);
55 |
56 | if (a != null) {
57 | if (a.hasValue(R.styleable.Msv_msvSearchBackground)) {
58 | setBackground(a.getDrawable(R.styleable.Msv_msvSearchBackground));
59 | }
60 |
61 | if (a.hasValue(R.styleable.Msv_msvHint)) {
62 | mETSearchText.setHint(a.getString(R.styleable.Msv_msvHint));
63 | }
64 |
65 | if (a.hasValue(R.styleable.Msv_msvTextColor)) {
66 | mETSearchText.setTextColor(a.getColor(R.styleable.Msv_msvTextColor, defStyleAttr));
67 | }
68 |
69 | if (a.hasValue(R.styleable.Msv_msvTextColorHint)) {
70 | mETSearchText.setHintTextColor(a.getColor(R.styleable.Msv_msvTextColorHint, defStyleAttr));
71 | }
72 |
73 | a.recycle();
74 | }
75 | }
76 |
77 | public void setMenuItem(MenuItem menuItem) {
78 | menuItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
79 | @Override
80 | public boolean onMenuItemClick(MenuItem item) {
81 | showSearch(true);
82 | return true;
83 | }
84 | });
85 | }
86 |
87 | public void showSearch(){
88 | showSearch(false);
89 | }
90 |
91 | public void showSearch(boolean animate){
92 | if (mIsOpen) {
93 | return;
94 | }
95 |
96 | if (animate) {
97 | setVisibleWithAnimation();
98 | } else {
99 | mIsOpen = true;
100 |
101 | this.setVisibility(VISIBLE);
102 |
103 | if (mListener != null) {
104 | mListener.onSearchViewShown();
105 | }
106 | mETSearchText.requestFocus();
107 | }
108 | }
109 | public void closeSearch(){
110 | setVisibility(GONE);
111 | hideKeyboard(mETSearchText);
112 | mETSearchText.getEditableText().clear();
113 | mIsOpen = false;
114 |
115 | if (mListener != null) {
116 | mListener.onSearchViewClosed();
117 | }
118 | }
119 |
120 | public boolean isOpen(){
121 | return mIsOpen;
122 | }
123 |
124 | public void setQuery(String query, boolean submit) {
125 | mETSearchText.setText(query);
126 |
127 | if (submit) {
128 | handleSubmitQuery();
129 | }
130 | }
131 |
132 | private void setVisibleWithAnimation() {
133 | AnimationUtil.AnimationListener animationListener = new AnimationUtil.AnimationListener() {
134 | @Override
135 | public boolean onAnimationStart(View view) {
136 | return false;
137 | }
138 |
139 | @Override
140 | public boolean onAnimationEnd(View view) {
141 | mIsOpen = true;
142 | mETSearchText.requestFocus();
143 | if (mListener != null) {
144 | mListener.onSearchViewShown();
145 | }
146 | return false;
147 | }
148 |
149 | @Override
150 | public boolean onAnimationCancel(View view) {
151 | return false;
152 | }
153 | };
154 |
155 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
156 | setVisibility(View.VISIBLE);
157 | AnimationUtil.reveal(this, animationListener);
158 |
159 | } else {
160 | // TODO da sistemare
161 | AnimationUtil.fadeInView(this, 1000, animationListener);
162 | }
163 | }
164 |
165 | private void initView(){
166 | Log.v(TAG, "initView: ");
167 | LayoutInflater.from(getContext()).inflate(getLayoutId(), this, true);
168 |
169 | mETSearchText = (EditText) findViewById(R.id.ed_search_text);
170 | mBtBack = (ImageButton) findViewById(R.id.bt_back);
171 | mBtClear = (ImageButton) findViewById(R.id.bt_clear);
172 | mSearchTopBar = (ViewGroup) findViewById(R.id.search_top_bar);
173 |
174 | setVisibility(GONE);
175 |
176 | mBtBack.setOnClickListener(this);
177 | mBtClear.setOnClickListener(this);
178 | mETSearchText.setOnClickListener(this);
179 |
180 | mETSearchText.setOnFocusChangeListener(this);
181 | mETSearchText.setOnEditorActionListener(this);
182 | mETSearchText.addTextChangedListener(this);
183 | }
184 |
185 | abstract protected int getLayoutId();
186 |
187 | @Override
188 | public void onClick(View view) {
189 |
190 | Log.d(TAG, "onClick: ");
191 | if (view.getId() == R.id.bt_back) {
192 | closeSearch();
193 | } else if (view.getId() == R.id.bt_clear) {
194 | setQuery("", false);
195 | }
196 | }
197 |
198 | @Override
199 | public void onFocusChange(View view, boolean b) {
200 | // Log.d(TAG, "onFocusChange: " + b);
201 |
202 | }
203 |
204 | @Override
205 | public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) {
206 | Log.d(TAG, "onEditorAction: " + actionId);
207 |
208 | if (actionId == EditorInfo.IME_ACTION_SEARCH) {
209 | handleSubmitQuery();
210 | return true;
211 | }
212 | return false;
213 | }
214 |
215 | @Override
216 | public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
217 |
218 | }
219 |
220 | @Override
221 | public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
222 | if (mIgnoreNextTextChange) {
223 | Log.d(TAG, "onTextChanged: " + charSequence+ " ignored");
224 | return;
225 | }
226 |
227 | Log.d(TAG, "onTextChanged: " + charSequence);
228 |
229 | if (mListener != null) {
230 | mListener.onQueryTextChange(charSequence.toString());
231 | }
232 |
233 | if (charSequence.length() > 0) {
234 | mBtClear.setVisibility(VISIBLE);
235 | } else {
236 | mBtClear.setVisibility(INVISIBLE);
237 | }
238 | }
239 |
240 | @Override
241 | public void afterTextChanged(Editable editable) {
242 |
243 | }
244 |
245 | private void handleSubmitQuery(){
246 | boolean submitHandled = false;
247 |
248 | if (mListener != null) {
249 | submitHandled = mListener.onQueryTextSubmit(mETSearchText.getText().toString());
250 | }
251 |
252 | if (!submitHandled) {
253 | closeSearch();
254 | } else {
255 | hideKeyboard(mETSearchText);
256 | }
257 | }
258 |
259 | public void hideKeyboard(View view) {
260 | InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
261 | imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
262 | }
263 |
264 | public void showKeyboard(View view) {
265 | if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD_MR1 && view.hasFocus()) {
266 | view.clearFocus();
267 | }
268 | view.requestFocus();
269 | InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
270 | imm.showSoftInput(view, 0);
271 | }
272 |
273 | public void setOnSearchViewListener(OnSearchViewListener mListener) {
274 | this.mListener = mListener;
275 | }
276 |
277 | @Override
278 | protected void onRestoreInstanceState(Parcelable state) {
279 | if (!(state instanceof BaseMSVSavedState)) {
280 | super.onRestoreInstanceState(state);
281 | return;
282 | }
283 |
284 | BaseMSVSavedState mSavedState = (BaseMSVSavedState) state;
285 |
286 | if (mSavedState.isOpen) {
287 | showSearch(false);
288 | }
289 |
290 | super.onRestoreInstanceState(mSavedState.getSuperState());
291 | }
292 |
293 | @Override
294 | protected Parcelable onSaveInstanceState() {
295 |
296 | BaseMSVSavedState savedState = new BaseMSVSavedState(super.onSaveInstanceState());
297 |
298 | savedState.isOpen = mIsOpen;
299 |
300 | return savedState;
301 | }
302 |
303 | static class BaseMSVSavedState extends BaseSavedState {
304 | public boolean isOpen;
305 |
306 | public BaseMSVSavedState(Parcelable superState) {
307 | super(superState);
308 | }
309 |
310 | @Override
311 | public void writeToParcel(Parcel out, int flags) {
312 | super.writeToParcel(out, flags);
313 | out.writeByte(isOpen ? (byte) 1 : (byte) 0);
314 | }
315 |
316 | public static final Parcelable.Creator CREATOR =
317 | new Parcelable.Creator() {
318 | public BaseMSVSavedState createFromParcel(Parcel in) {
319 | return new BaseMSVSavedState(in);
320 | }
321 |
322 | public BaseMSVSavedState[] newArray(int size) {
323 | return new BaseMSVSavedState[size];
324 | }
325 | };
326 |
327 | public BaseMSVSavedState(Parcel in) {
328 | super(in);
329 | isOpen = in.readByte() == 1;
330 | }
331 | }
332 |
333 | @Override
334 | public void setBackground(Drawable background) {
335 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
336 | mSearchTopBar.setBackground(background);
337 | } else {
338 | mSearchTopBar.setBackgroundDrawable(background);
339 | }
340 | }
341 |
342 |
343 | public String getQuery(){
344 | return mETSearchText.getEditableText().toString();
345 | }
346 | }
347 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/FilterMaterialSearchView.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv;
2 |
3 |
4 | import android.content.Context;
5 | import android.content.res.TypedArray;
6 | import android.os.Parcelable;
7 | import android.support.v7.widget.GridLayoutManager;
8 | import android.support.v7.widget.LinearLayoutManager;
9 | import android.support.v7.widget.RecyclerView;
10 | import android.util.AttributeSet;
11 | import android.util.Log;
12 | import android.view.KeyEvent;
13 | import android.view.View;
14 | import android.view.inputmethod.EditorInfo;
15 | import android.widget.Filterable;
16 | import android.widget.TextView;
17 |
18 | import com.claudiodegio.msv.adapter.FilterRvAdapter;
19 | import com.claudiodegio.msv.adapter.SelectFilterRvAdapter;
20 | import com.claudiodegio.msv.model.BaseElement;
21 | import com.claudiodegio.msv.model.Filter;
22 | import com.claudiodegio.msv.model.Section;
23 | import com.claudiodegio.msv.recycleview.RecyclerItemClickListener;
24 |
25 | import java.util.List;
26 |
27 | public class FilterMaterialSearchView extends BaseMaterialSearchView implements RecyclerItemClickListener.OnItemClickListener {
28 |
29 | private RecyclerView mRvFilter;
30 | private RecyclerView mRvSelectFilter;
31 | private SelectFilterRvAdapter mSelectFilterRvAdapter;
32 | private FilterRvAdapter mFilterRvAdapter;
33 | private OnFilterViewListener mOnFilterViewListener;
34 | private TextView mTvNoFilter;
35 | private boolean isContainFilter;
36 |
37 | public FilterMaterialSearchView(Context context) {
38 | super(context, null);
39 | }
40 |
41 | public FilterMaterialSearchView(Context context, AttributeSet attrs) {
42 | this(context, attrs, 0);
43 | }
44 |
45 | public FilterMaterialSearchView(Context context, AttributeSet attrs, int defStyleAttr) {
46 | super(context, attrs, defStyleAttr);
47 | initStyle(attrs, defStyleAttr);
48 | initView();
49 | }
50 |
51 | @Override
52 | protected int getLayoutId() {
53 | return R.layout.msv_filter;
54 | }
55 |
56 | public void addSection(Section section) {
57 | mSelectFilterRvAdapter.addElement(section);
58 | }
59 |
60 | public void addFilter(Filter filter) {
61 | mSelectFilterRvAdapter.addElement(filter);
62 | }
63 |
64 | public void swapList(List list) {
65 | mSelectFilterRvAdapter.swapList(list);
66 | }
67 |
68 | public List getFilter(){
69 | return mFilterRvAdapter.getFilters();
70 | }
71 |
72 | public String getQuery(){
73 | return mETSearchText.getText().toString();
74 | }
75 |
76 | private void initView(){
77 | mRvFilter = (RecyclerView) findViewById(R.id.rv_filter);
78 | mRvSelectFilter = (RecyclerView) findViewById(R.id.rv_select_filter);
79 | mTvNoFilter = (TextView) findViewById(R.id.tv_no_filter);
80 |
81 | mSelectFilterRvAdapter = new SelectFilterRvAdapter(getContext(), isContainFilter);
82 | mRvSelectFilter.setHasFixedSize(false);
83 | mRvSelectFilter.setAdapter(mSelectFilterRvAdapter);
84 | mRvSelectFilter.addOnItemTouchListener(new RecyclerItemClickListener(getContext(), this));
85 |
86 | mFilterRvAdapter = new FilterRvAdapter(getContext());
87 | mRvFilter.setHasFixedSize(false);
88 | mRvFilter.setAdapter(mFilterRvAdapter);
89 | mRvFilter.addOnItemTouchListener(new RecyclerItemClickListener(getContext(), this));
90 |
91 | // Griglia
92 | GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 1, LinearLayoutManager.HORIZONTAL, false);
93 | mRvFilter.setLayoutManager(gridLayoutManager);
94 | mFilterRvAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
95 | @Override
96 | public void onChanged() {
97 | if (mFilterRvAdapter.getItemCount() == 0){
98 | mTvNoFilter.setVisibility(VISIBLE);
99 | } else {
100 | mTvNoFilter.setVisibility(GONE);
101 | }
102 | }
103 |
104 | @Override
105 | public void onItemRangeInserted(int positionStart, int itemCount) {
106 | if (mFilterRvAdapter.getItemCount() == 0){
107 | mTvNoFilter.setVisibility(VISIBLE);
108 | } else {
109 | mTvNoFilter.setVisibility(GONE);
110 | }
111 | }
112 |
113 | @Override
114 | public void onItemRangeRemoved(int positionStart, int itemCount) {
115 | if (mFilterRvAdapter.getItemCount() == 0){
116 | mTvNoFilter.setVisibility(VISIBLE);
117 | } else {
118 | mTvNoFilter.setVisibility(GONE);
119 | }
120 | }
121 | });
122 | }
123 |
124 | @Override
125 | public void showSearch(boolean animate) {
126 | super.showSearch(animate);
127 | showSelectFilter();
128 | mFilterRvAdapter.clear();
129 | }
130 |
131 | @Override
132 | public void closeSearch() {
133 | super.closeSearch();
134 | mFilterRvAdapter.clear();
135 | }
136 |
137 | private void showSelectFilter(){
138 | mRvSelectFilter.setVisibility(VISIBLE);
139 | }
140 |
141 | private void hideSelectFilter(){
142 | mRvSelectFilter.setVisibility(GONE);
143 | }
144 |
145 | public boolean isFilterVisible(){
146 | return mRvFilter.getVisibility() == VISIBLE;
147 | }
148 |
149 | public int getFilterHeight(){
150 | return mRvFilter.getHeight();
151 | }
152 |
153 | @Override
154 | public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) {
155 | Log.d(TAG, "onEditorAction: " + actionId);
156 |
157 | if (actionId == EditorInfo.IME_ACTION_SEARCH) {
158 | hideSelectFilter();
159 | return super.onEditorAction(textView, actionId, keyEvent);
160 | }
161 | return false;
162 | }
163 |
164 | @Override
165 | public void onClick(View view) {
166 |
167 | if (view == mETSearchText) {
168 | if (mRvSelectFilter.getVisibility() == GONE) {
169 | showSelectFilter();
170 | hideKeyboard(mETSearchText);
171 | return;
172 | }
173 | }
174 | super.onClick(view);
175 | }
176 |
177 | @Override
178 | public void onItemClick(RecyclerView rv, View view, int position) {
179 | Log.d(TAG, "onItemClick: position:" + position);
180 |
181 | if (rv == mRvSelectFilter) {
182 | BaseElement element = mSelectFilterRvAdapter.getItem(position);
183 |
184 | if (element instanceof Filter) {
185 | mFilterRvAdapter.addFilter((Filter) element);
186 | hideSelectFilter();
187 | hideKeyboard(mETSearchText);
188 | mETSearchText.setText(null);
189 |
190 | if (mOnFilterViewListener != null) {
191 | mOnFilterViewListener.onFilterAdded((Filter) element);
192 | }
193 | }
194 | } else {
195 | final Filter filter = mFilterRvAdapter.removeFilter(position);
196 |
197 |
198 | if (mFilterRvAdapter.getItemCount() == 0) {
199 | showSelectFilter();
200 | }
201 |
202 | if (mOnFilterViewListener != null) {
203 | mOnFilterViewListener.onFilterRemoved((Filter) filter);
204 | }
205 | }
206 |
207 | if (mOnFilterViewListener != null) {
208 | mOnFilterViewListener.onFilterChanged(mFilterRvAdapter.getFilters());
209 | }
210 | }
211 |
212 | private void startFilter(String text) {
213 | ((Filterable) mSelectFilterRvAdapter).getFilter().filter(text);
214 | }
215 |
216 | @Override
217 | public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
218 | super.onTextChanged(charSequence, i, i1, i2);
219 |
220 | startFilter(charSequence.toString());
221 | }
222 |
223 | public void setOnFilterViewListener(OnFilterViewListener mOnFilterViewListener) {
224 | this.mOnFilterViewListener = mOnFilterViewListener;
225 | }
226 |
227 |
228 | @Override
229 | protected void onRestoreInstanceState(Parcelable state) {
230 | if (!(state instanceof FilterMSVSavedState)) {
231 | super.onRestoreInstanceState(state);
232 | return;
233 | }
234 |
235 | FilterMSVSavedState mSavedState = (FilterMSVSavedState) state;
236 |
237 | super.onRestoreInstanceState(mSavedState.getSuperState());
238 |
239 | if (mSavedState.isFilterSelectOpen) {
240 | showSelectFilter();
241 | } else {
242 | hideSelectFilter();
243 | }
244 |
245 | mFilterRvAdapter.setFilters(mSavedState.filters);
246 | }
247 |
248 | @Override
249 | protected Parcelable onSaveInstanceState() {
250 |
251 | FilterMSVSavedState savedState = new FilterMSVSavedState(super.onSaveInstanceState());
252 |
253 | savedState.isFilterSelectOpen = mRvSelectFilter.getVisibility() == VISIBLE;
254 | savedState.filters = mFilterRvAdapter.getFilters();
255 |
256 | return savedState;
257 | }
258 |
259 | class FilterMSVSavedState extends View.BaseSavedState {
260 |
261 | public boolean isFilterSelectOpen;
262 | public List filters;
263 |
264 | public FilterMSVSavedState(Parcelable superState) {
265 | super(superState);
266 | }
267 | }
268 |
269 | private void initStyle(AttributeSet attrs, int defStyleAttr) {
270 | final TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.Msv, defStyleAttr, 0);
271 |
272 | if (a != null) {
273 | if (a.hasValue(R.styleable.Msv_msvIsContainEnabled)) {
274 | isContainFilter = a.getBoolean(R.styleable.Msv_msvIsContainEnabled, false);
275 | }
276 |
277 | a.recycle();
278 | }
279 | }
280 | }
281 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/MaterialSearchView.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | public class MaterialSearchView extends BaseMaterialSearchView {
7 | public MaterialSearchView(Context context) {
8 | super(context);
9 | }
10 |
11 | public MaterialSearchView(Context context, AttributeSet attrs) {
12 | super(context, attrs);
13 | }
14 |
15 | public MaterialSearchView(Context context, AttributeSet attrs, int defStyleAttr) {
16 | super(context, attrs, defStyleAttr);
17 | }
18 |
19 | @Override
20 | public void showSearch(boolean animate) {
21 | super.showSearch(animate);
22 |
23 | this.showKeyboard(mETSearchText);
24 | }
25 |
26 | @Override
27 | protected int getLayoutId() {
28 | return R.layout.msv_simple;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/OnFilterViewListener.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv;
2 |
3 | import com.claudiodegio.msv.model.Filter;
4 |
5 | import java.util.List;
6 |
7 | public interface OnFilterViewListener {
8 | void onFilterAdded(Filter filter);
9 |
10 | void onFilterRemoved(Filter filter);
11 |
12 | void onFilterChanged(List list);
13 | }
14 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/OnSearchViewListener.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv;
2 |
3 | public interface OnSearchViewListener {
4 |
5 | /**
6 | * called when search view and keyboard is shown
7 | */
8 | void onSearchViewShown();
9 |
10 | /**
11 | * called when search view and keyboard is closed
12 | */
13 | void onSearchViewClosed();
14 |
15 | /**
16 | *
17 | * @param query String submitted to search view
18 | * @return boolean whether the text submit was handled or not
19 | */
20 | boolean onQueryTextSubmit(String query);
21 |
22 | /**
23 | * handles change of text in search view
24 | * @param newText current text in search view
25 | */
26 | void onQueryTextChange(String newText);
27 | }
28 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/SuggestionMaterialSearchView.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.util.AttributeSet;
7 | import android.util.Log;
8 | import android.view.View;
9 | import android.widget.Filter;
10 | import android.widget.Filterable;
11 |
12 | import com.claudiodegio.msv.adapter.SearchSuggestRvAdapter;
13 | import com.claudiodegio.msv.recycleview.RecyclerItemClickListener;
14 |
15 | import java.util.Arrays;
16 | import java.util.List;
17 |
18 | public class SuggestionMaterialSearchView extends BaseMaterialSearchView implements RecyclerItemClickListener.OnItemClickListener, Filter.FilterListener {
19 |
20 | private RecyclerView mRvSuggestion;
21 | private View mVOverlay;
22 | private RecyclerView.Adapter mSuggestsAdapter;
23 | private boolean hideShadow = false;
24 |
25 | public SuggestionMaterialSearchView(Context context) {
26 | this(context, null);
27 | }
28 |
29 | public SuggestionMaterialSearchView(Context context, AttributeSet attrs) {
30 | this(context, attrs, 0);
31 | }
32 |
33 | public SuggestionMaterialSearchView(Context context, AttributeSet attrs, int defStyleAttr) {
34 | super(context, attrs, defStyleAttr);
35 |
36 | initStyle(attrs, defStyleAttr);
37 |
38 | initView();
39 | }
40 |
41 |
42 | private void initView(){
43 | mRvSuggestion = (RecyclerView) findViewById(R.id.rv_suggestions);
44 | mVOverlay = findViewById(R.id.v_overlay);
45 | mVOverlay.setOnClickListener(this);
46 | mRvSuggestion.addOnItemTouchListener(new RecyclerItemClickListener(getContext(), this));
47 |
48 | if (hideShadow) {
49 | mVOverlay.setVisibility(GONE);
50 | }
51 | }
52 |
53 | @Override
54 | protected int getLayoutId() {
55 | return R.layout.msv_suggestions;
56 | }
57 |
58 | @Override
59 | public void showSearch(boolean animate) {
60 | super.showSearch(animate);
61 | showKeyboard(mETSearchText);
62 | if (!hideShadow) {
63 | mVOverlay.setVisibility(VISIBLE);
64 | }
65 | }
66 |
67 | public void setSuggestion(String[] suggestions) {
68 | setSuggestion(suggestions, false);
69 | }
70 |
71 | public void setSuggestion(String[] suggestions, Boolean isContain) {
72 | if (suggestions != null) {
73 | setSuggestion(Arrays.asList(suggestions), isContain);
74 | }
75 | }
76 |
77 | public void setSuggestion(List suggestions) {
78 | setSuggestion(suggestions, false);
79 | }
80 |
81 | public void setSuggestion(List suggestions, Boolean isContain) {
82 | if (suggestions != null && !suggestions.isEmpty()) {
83 | final SearchSuggestRvAdapter adapter = new SearchSuggestRvAdapter(getContext(), suggestions, isContain);
84 |
85 | setSuggestAdapter(adapter);
86 | }
87 | }
88 |
89 | @Override
90 | public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
91 | super.onTextChanged(charSequence, i, i1, i2);
92 |
93 | if (!mIgnoreNextTextChange) {
94 | if (!hideShadow) {
95 | mVOverlay.setVisibility(VISIBLE);
96 | }
97 | startFilter(mETSearchText.getText().toString());
98 | }
99 | }
100 |
101 | public void setSuggestAdapter(RecyclerView.Adapter extends RecyclerView.ViewHolder> adapter) {
102 | mSuggestsAdapter = adapter;
103 | mRvSuggestion.setAdapter(adapter);
104 | if (!hideShadow) {
105 | mVOverlay.setVisibility(VISIBLE);
106 | }
107 | }
108 |
109 | public void showSuggestion(){
110 | mRvSuggestion.setVisibility(VISIBLE);
111 | }
112 |
113 | public void hideSuggestion(){
114 | mRvSuggestion.setVisibility(GONE);
115 | }
116 |
117 | private void startFilter(String text) {
118 | if (mSuggestsAdapter != null && mSuggestsAdapter instanceof Filterable) {
119 | ((Filterable) mSuggestsAdapter).getFilter().filter(text, this);
120 | }
121 | }
122 |
123 | @Override
124 | public void onItemClick(RecyclerView rv, View view, int position) {
125 | Log.d(TAG, "onItemClick: " + position);
126 |
127 | mIgnoreNextTextChange = true;
128 |
129 | if (mSuggestsAdapter instanceof SearchSuggestRvAdapter) {
130 |
131 | String suggestion = ((SearchSuggestRvAdapter) mSuggestsAdapter).getItem(position);
132 | setQuery(suggestion, true);
133 | if (mETSearchText.getText().length() > 0) {
134 | mETSearchText.setSelection(mETSearchText.getText().toString().length());
135 | }
136 | }
137 |
138 | mIgnoreNextTextChange = false;
139 | hideSuggestion();
140 | if (!hideShadow) {
141 | mVOverlay.setVisibility(GONE);
142 | }
143 | }
144 |
145 | @Override
146 | public void onFilterComplete(int count) {
147 | if (count > 0) {
148 | showSuggestion();
149 | } else {
150 | hideSuggestion();
151 | }
152 | }
153 |
154 | @Override
155 | public void onClick(View view) {
156 |
157 | super.onClick(view);
158 | int i = view.getId();
159 | if (i == R.id.bt_back) {
160 | closeSearch();
161 | } else if (i == R.id.ed_search_text && !hideShadow) {
162 | mVOverlay.setVisibility(VISIBLE);
163 | } else if (i == R.id.v_overlay) {
164 | closeSearch();
165 | }
166 | }
167 |
168 | private void initStyle(AttributeSet attrs, int defStyleAttr) {
169 | final TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.Msv, defStyleAttr, 0);
170 |
171 | if (a != null) {
172 | if (a.hasValue(R.styleable.Msv_msvHideShadow)) {
173 | hideShadow = a.getBoolean(R.styleable.Msv_msvHideShadow, false);
174 | }
175 |
176 | a.recycle();
177 | }
178 | }
179 | }
180 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/adapter/FilterRvAdapter.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 |
12 | import com.claudiodegio.msv.R;
13 | import com.claudiodegio.msv.model.Filter;
14 |
15 | import java.util.ArrayList;
16 | import java.util.List;
17 |
18 | import de.hdodenhof.circleimageview.CircleImageView;
19 |
20 | public class FilterRvAdapter extends RecyclerView.Adapter {
21 |
22 |
23 | private Context mCtx;
24 | private LayoutInflater mInflater;
25 | private List mList;
26 |
27 | public FilterRvAdapter(Context context){
28 | this.mCtx = context;
29 | this.mInflater = LayoutInflater.from(context);
30 | mList = new ArrayList<>();
31 | setHasStableIds(false);
32 | }
33 | @Override
34 | public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
35 | View view = null;
36 | BaseViewHolder holder = null;
37 | switch (viewType) {
38 | case 0:
39 | view = mInflater.inflate(R.layout.msv_filter_iv, parent, false);
40 | holder = new IvViewHolder(view);
41 | break;
42 | case 1:
43 | view = mInflater.inflate(R.layout.msv_filter_civ, parent, false);
44 | holder = new CivViewHolder(view);
45 | break;
46 | }
47 |
48 | return holder;
49 | }
50 |
51 | public void addFilter(Filter mFilter) {
52 |
53 | for (int i = 0; i < mList.size(); ++i) {
54 | Filter filter = mList.get(i);
55 |
56 | if (filter.getType() == mFilter.getType()) {
57 | mList.set(i, mFilter);
58 | notifyItemChanged(i);
59 | return;
60 | }
61 | }
62 |
63 | mList.add(mFilter);
64 | notifyItemInserted(mList.size()-1);
65 | }
66 |
67 | public void clear(){
68 | mList.clear();
69 | notifyDataSetChanged();
70 | }
71 |
72 | public Filter getItem(int position) {
73 | return mList.get(position);
74 | }
75 |
76 | public Filter removeFilter(int position) {
77 | Filter filter = mList.remove(position);
78 | notifyItemRemoved(position);
79 | return filter;
80 | }
81 |
82 | public void setFilters(List list){
83 | mList = list;
84 | notifyDataSetChanged();
85 | }
86 |
87 | public List getFilters(){
88 | return mList;
89 | }
90 | @Override
91 | public void onBindViewHolder(BaseViewHolder holder, int position) {
92 | holder.bind(mList.get(position));
93 | }
94 |
95 | @Override
96 | public int getItemCount() {
97 | if (mList == null) {
98 | return 0;
99 | }
100 | return mList.size();
101 | }
102 |
103 | @Override
104 | public int getItemViewType(int position) {
105 |
106 | Filter filter = mList.get(position);
107 |
108 | if (filter.getIconBgColor() == View.NO_ID){
109 | return 0;
110 | }
111 | return 1;
112 | }
113 |
114 | class BaseViewHolder extends RecyclerView.ViewHolder {
115 |
116 | TextView mTextView;
117 | public BaseViewHolder(View itemView) {
118 | super(itemView);
119 | mTextView = (TextView) itemView.findViewById(android.R.id.text1);
120 | }
121 |
122 | public void bind(Filter filter) {
123 | mTextView.setText(filter.getName());
124 | }
125 | }
126 |
127 | class IvViewHolder extends BaseViewHolder {
128 |
129 | ImageView mIv;
130 | public IvViewHolder(View itemView) {
131 | super(itemView);
132 | mIv = (ImageView) itemView.findViewById(R.id.iv_icon);
133 | }
134 |
135 | @Override
136 | public void bind(Filter filter) {
137 | super.bind(filter);
138 |
139 | if (filter.hasIconRefId()) {
140 | mIv.setImageResource(filter.getIconRefId());
141 | } else {
142 | mIv.setImageDrawable(filter.getIconDrawable());
143 | }
144 | }
145 | }
146 |
147 | class CivViewHolder extends BaseViewHolder {
148 |
149 | CircleImageView mCIV;
150 |
151 | public CivViewHolder(View itemView) {
152 | super(itemView);
153 | mCIV = (CircleImageView) itemView.findViewById(R.id.civ_icon);
154 | }
155 |
156 | @Override
157 | public void bind(Filter filter) {
158 | super.bind(filter);
159 | if (filter.hasIconRefId()) {
160 | mCIV.setImageResource(filter.getIconRefId());
161 | } else {
162 | mCIV.setImageDrawable(filter.getIconDrawable());
163 | }
164 | mCIV.setFillColor(filter.getIconBgColor());
165 | }
166 | }
167 | }
168 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/adapter/SearchSuggestRvAdapter.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.text.TextUtils;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.Filter;
10 | import android.widget.Filterable;
11 | import android.widget.TextView;
12 |
13 |
14 | import com.claudiodegio.msv.R;
15 |
16 | import java.util.ArrayList;
17 | import java.util.List;
18 |
19 | public class SearchSuggestRvAdapter extends RecyclerView.Adapter implements Filterable {
20 |
21 |
22 | private Context mCtx;
23 | private List mSuggestions;
24 | private List mSuggestionsFiltered;
25 |
26 | private LayoutInflater mInflater;
27 | private Boolean isContain;
28 |
29 | public SearchSuggestRvAdapter(Context context, List suggestions, Boolean isContain){
30 | this.mCtx = context;
31 | this.mSuggestionsFiltered = suggestions;
32 | this.mSuggestions = suggestions;
33 | this.mInflater = LayoutInflater.from(context);
34 | this.isContain = isContain;
35 | }
36 |
37 | public SearchSuggestRvAdapter(Context context, List suggestions){
38 | this(context, suggestions, false);
39 | }
40 |
41 | @Override
42 | public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
43 | View view = mInflater.inflate(R.layout.msv_item_suggestion, parent, false);
44 | return new ViewHolder(view);
45 | }
46 |
47 | @Override
48 | public void onBindViewHolder(ViewHolder holder, int position) {
49 | String suggestion = mSuggestionsFiltered.get(position);
50 | holder.mTextView.setText(suggestion);
51 | }
52 |
53 | @Override
54 | public int getItemCount() {
55 | if (mSuggestionsFiltered == null || mSuggestionsFiltered.isEmpty()) {
56 | return 0;
57 | }
58 | return mSuggestionsFiltered.size();
59 | }
60 |
61 | public String getItem(int position) {
62 | return mSuggestionsFiltered.get(position);
63 | }
64 |
65 | @Override
66 | public Filter getFilter() {
67 | Filter filter = new Filter() {
68 | @Override
69 | protected FilterResults performFiltering(CharSequence constraint) {
70 | FilterResults filterResults = new FilterResults();
71 | if (!TextUtils.isEmpty(constraint)) {
72 |
73 | // Retrieve the autocomplete results.
74 | List searchData = new ArrayList<>();
75 |
76 | for (String string : mSuggestions) {
77 | if (isContain) {
78 | if (string.toLowerCase().contains(constraint.toString().toLowerCase())) {
79 | searchData.add(string);
80 | }
81 | } else {
82 | if (string.toLowerCase().startsWith(constraint.toString().toLowerCase())) {
83 | searchData.add(string);
84 | }
85 | }
86 |
87 | }
88 |
89 | // Assign the data to the FilterResults
90 | filterResults.values = searchData;
91 | filterResults.count = searchData.size();
92 | }
93 | return filterResults;
94 | }
95 |
96 | @Override
97 | protected void publishResults(CharSequence constraint, FilterResults results) {
98 | if (results.values != null) {
99 | mSuggestionsFiltered = (ArrayList) results.values;
100 | notifyDataSetChanged();
101 | }
102 | }
103 | };
104 | return filter;
105 | }
106 |
107 | class ViewHolder extends RecyclerView.ViewHolder {
108 |
109 | public TextView mTextView;
110 |
111 | public ViewHolder(View itemView) {
112 | super(itemView);
113 | mTextView = (TextView) itemView.findViewById(R.id.suggestion_text);
114 | }
115 | }
116 |
117 | }
118 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/adapter/SelectFilterRvAdapter.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.text.TextUtils;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.Filterable;
10 | import android.widget.ImageView;
11 | import android.widget.TextView;
12 |
13 |
14 | import com.claudiodegio.msv.R;
15 | import com.claudiodegio.msv.model.BaseElement;
16 | import com.claudiodegio.msv.model.Filter;
17 | import com.claudiodegio.msv.model.Section;
18 |
19 | import java.util.ArrayList;
20 | import java.util.List;
21 |
22 | import de.hdodenhof.circleimageview.CircleImageView;
23 |
24 | public class SelectFilterRvAdapter extends RecyclerView.Adapter implements Filterable {
25 |
26 | private List mList;
27 | private List mListFiltered;
28 | private boolean isContain;
29 |
30 | private Context mCtx;
31 | private LayoutInflater mInflater;
32 |
33 | public SelectFilterRvAdapter(Context context, boolean isContain){
34 | this.mCtx = context;
35 | this.mInflater = LayoutInflater.from(context);
36 | mList = new ArrayList<>();
37 | mListFiltered = mList;
38 | setHasStableIds(false);
39 | this.isContain = isContain;
40 | }
41 |
42 | public void addElement(BaseElement element) {
43 | mList.add(element);
44 | notifyDataSetChanged();
45 | }
46 |
47 |
48 | public void swapList(List list) {
49 | mList = list;
50 | mListFiltered = list;
51 | notifyDataSetChanged();
52 | }
53 |
54 | public BaseElement getItem(int position) {
55 | return mListFiltered.get(position);
56 | }
57 | @Override
58 | public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
59 |
60 | View view;
61 | BaseViewHolder holder = null;
62 |
63 | switch (viewType) {
64 | case 0:
65 | view = mInflater.inflate(R.layout.msv_select_filter_section, parent, false);
66 | holder = new SectionViewHolder(view);
67 | break;
68 |
69 | case 1:
70 | view = mInflater.inflate(R.layout.msv_select_filter_item, parent, false);
71 | holder = new ItemViewHolder(view);
72 | break;
73 | }
74 |
75 | return holder;
76 | }
77 |
78 | @Override
79 | public void onBindViewHolder(BaseViewHolder holder, int position) {
80 | final BaseElement element = mListFiltered.get(position);
81 |
82 | holder.bind(element);
83 | }
84 |
85 | @Override
86 | public int getItemCount() {
87 | if (mListFiltered == null) {
88 | return 0;
89 | }
90 | return mListFiltered.size();
91 | }
92 |
93 | @Override
94 | public int getItemViewType(int position) {
95 |
96 | BaseElement baseElement = mListFiltered.get(position);
97 |
98 | if (baseElement instanceof Section) {
99 | return 0;
100 | }
101 |
102 | return 1;
103 | }
104 |
105 | @Override
106 | public android.widget.Filter getFilter() {
107 | return new SelectFilter();
108 | }
109 |
110 |
111 | class SelectFilter extends android.widget.Filter {
112 | @Override
113 | protected FilterResults performFiltering(CharSequence charSequence) {
114 | if (mList == null) {
115 | return null;
116 | }
117 |
118 | FilterResults result = new FilterResults();
119 |
120 | List filteredList;
121 |
122 | if (!TextUtils.isEmpty(charSequence)) {
123 | Section sezione = null;
124 | filteredList = new ArrayList<>();
125 | for (BaseElement filter : mList) {
126 |
127 | if (filter instanceof Filter) {
128 | final String charSequenceLowerCase = charSequence.toString().toLowerCase();
129 | final String filterNameLowerCase = filter.getName().toLowerCase();
130 |
131 | if ((!isContain && filterNameLowerCase.startsWith(charSequenceLowerCase))
132 | || isContain && filterNameLowerCase.contains(charSequenceLowerCase)) {
133 | if (sezione != null) {
134 | filteredList.add(sezione);
135 | sezione = null;
136 | }
137 | filteredList.add(filter);
138 | }
139 | } else {
140 | sezione = (Section) filter;
141 | }
142 | }
143 | } else {
144 | filteredList = mList;
145 | }
146 |
147 | result.values = filteredList;
148 |
149 | return result;
150 | }
151 |
152 | @Override
153 | protected void publishResults(CharSequence charSequence, FilterResults filterResults) {
154 |
155 | mListFiltered = (List) filterResults.values;
156 |
157 | notifyDataSetChanged();
158 | }
159 | }
160 |
161 |
162 | class BaseViewHolder extends RecyclerView.ViewHolder {
163 |
164 | public BaseViewHolder(View itemView) {
165 | super(itemView);
166 | }
167 |
168 | public void bind(BaseElement element) {}
169 | }
170 |
171 | class ItemViewHolder extends BaseViewHolder {
172 |
173 | TextView mTextView;
174 | CircleImageView mCiv;
175 | ImageView mIv;
176 | public ItemViewHolder(View itemView) {
177 | super(itemView);
178 | mTextView = (TextView) itemView.findViewById(R.id.tv_name);
179 | mCiv = (CircleImageView)itemView.findViewById(R.id.civ_icon);
180 | mIv = (ImageView)itemView.findViewById(R.id.iv_icon);
181 | }
182 |
183 | @Override
184 | public void bind(BaseElement element) {
185 | mTextView.setText(element.getName());
186 |
187 | Filter filter = (Filter)element;
188 |
189 | // Colore
190 | int color = filter.getIconBgColor();
191 |
192 | if (color != View.NO_ID) {
193 | // mCiv.setBackgroundColor();
194 | mIv.setVisibility(View.GONE);
195 | mCiv.setVisibility(View.VISIBLE);
196 |
197 | mCiv.setFillColor(color);
198 | if (filter.hasIconRefId()) {
199 | mCiv.setImageResource(filter.getIconRefId());
200 | } else {
201 | mCiv.setImageDrawable(filter.getIconDrawable());
202 | }
203 | } else {
204 | mIv.setVisibility(View.VISIBLE);
205 | mCiv.setVisibility(View.GONE);
206 |
207 | if (filter.hasIconRefId()) {
208 | mIv.setImageResource(filter.getIconRefId());
209 | } else {
210 | mIv.setImageDrawable(filter.getIconDrawable());
211 | }
212 | }
213 | }
214 | }
215 |
216 |
217 | class SectionViewHolder extends BaseViewHolder {
218 |
219 | TextView mTextView;
220 | public SectionViewHolder(View itemView) {
221 | super(itemView);
222 | mTextView = (TextView) itemView;
223 | }
224 |
225 | @Override
226 | public void bind(BaseElement element) {
227 | mTextView.setText(element.getName());
228 |
229 | // Set del icona
230 | }
231 | }
232 | }
233 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/model/BaseElement.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv.model;
2 |
3 | /**
4 | * Created by claud on 02/11/2016.
5 | */
6 |
7 | public abstract class BaseElement {
8 |
9 | private String mName;
10 |
11 | public BaseElement(String mName) {
12 | this.mName = mName;
13 | }
14 |
15 | public String getName() {
16 | return mName;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/model/Filter.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv.model;
2 |
3 | import android.graphics.drawable.Drawable;
4 | import android.view.View;
5 |
6 |
7 | public class Filter extends BaseElement {
8 | private int mId;
9 | private int mIconRefId;
10 | private Drawable mIconDrawable = null;
11 | private int mIconBgColor;
12 | private int mType;
13 |
14 | public Filter(int type, String name, int id, int iconRefId, int iconBgColor) {
15 | super(name);
16 | this.mType = type;
17 | this.mIconRefId = iconRefId;
18 | this.mId = id;
19 | this.mIconBgColor = iconBgColor;
20 | this.mIconDrawable = null;
21 | }
22 |
23 | public Filter(int type, String name, int id, Drawable iconDraweable, int iconBgColor) {
24 | super(name);
25 | this.mType = type;
26 | this.mIconRefId = View.NO_ID;
27 | this.mId = id;
28 | this.mIconBgColor = iconBgColor;
29 | this.mIconDrawable = iconDraweable;
30 | }
31 |
32 | public Filter(int type, String name) {
33 | this(type, name, View.NO_ID, View.NO_ID, View.NO_ID);
34 | }
35 |
36 | public int getType() {
37 | return mType;
38 | }
39 |
40 | public int getIconBgColor() {
41 | return mIconBgColor;
42 | }
43 |
44 | public int getIconRefId() {
45 | return mIconRefId;
46 | }
47 |
48 | public int getId() {
49 | return mId;
50 | }
51 |
52 |
53 | public boolean hasIconRefId(){
54 | return mIconRefId != View.NO_ID;
55 | }
56 |
57 | public Drawable getIconDrawable(){
58 | return mIconDrawable;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/model/Section.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv.model;
2 |
3 | /**
4 | * Created by claud on 02/11/2016.
5 | */
6 |
7 | public class Section extends BaseElement {
8 |
9 |
10 |
11 | public Section(String name) {
12 | super(name);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/claudiodegio/msv/recycleview/RecyclerItemClickListener.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv.recycleview;
2 |
3 |
4 | import android.content.Context;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.GestureDetector;
7 | import android.view.MotionEvent;
8 | import android.view.View;
9 |
10 | public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener {
11 | private OnItemClickListener mListener;
12 |
13 | public interface OnItemClickListener {
14 | public void onItemClick(RecyclerView rv, View view, int position);
15 | }
16 |
17 | GestureDetector mGestureDetector;
18 |
19 | public RecyclerItemClickListener(Context context, OnItemClickListener listener) {
20 | mListener = listener;
21 | mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
22 | @Override
23 | public boolean onSingleTapUp(MotionEvent e) {
24 | return true;
25 | }
26 | });
27 | }
28 |
29 | @Override
30 | public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) {
31 | View childView = view.findChildViewUnder(e.getX(), e.getY());
32 | if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) {
33 | mListener.onItemClick(view, childView, view.getChildAdapterPosition(childView));
34 | }
35 | return false;
36 | }
37 |
38 | @Override
39 | public void onTouchEvent(RecyclerView view, MotionEvent motionEvent) {
40 | }
41 |
42 | @Override
43 | public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
44 |
45 | }
46 | }
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/ic_close_circle_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-hdpi/ic_close_circle_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/ic_close_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-hdpi/ic_close_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/ic_information_outline_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-hdpi/ic_information_outline_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/ic_keyboard_backspace_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-hdpi/ic_keyboard_backspace_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/ic_close_circle_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-mdpi/ic_close_circle_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/ic_close_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-mdpi/ic_close_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/ic_information_outline_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-mdpi/ic_information_outline_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/ic_keyboard_backspace_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-mdpi/ic_keyboard_backspace_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/ic_close_circle_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xhdpi/ic_close_circle_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/ic_close_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xhdpi/ic_close_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/ic_information_outline_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xhdpi/ic_information_outline_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/ic_keyboard_backspace_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xhdpi/ic_keyboard_backspace_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xxhdpi/ic_close_circle_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xxhdpi/ic_close_circle_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xxhdpi/ic_close_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xxhdpi/ic_close_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xxhdpi/ic_information_outline_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xxhdpi/ic_information_outline_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xxhdpi/ic_keyboard_backspace_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xxhdpi/ic_keyboard_backspace_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xxxhdpi/ic_close_circle_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xxxhdpi/ic_close_circle_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xxxhdpi/ic_close_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xxxhdpi/ic_close_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xxxhdpi/ic_information_outline_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xxxhdpi/ic_information_outline_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xxxhdpi/ic_keyboard_backspace_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/lib/src/main/res/drawable-xxxhdpi/ic_keyboard_backspace_grey600_24dp.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable/msv_filter_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/lib/src/main/res/layout/msv_filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
24 |
25 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
59 |
65 |
66 |
76 |
82 |
83 |
84 |
92 |
--------------------------------------------------------------------------------
/lib/src/main/res/layout/msv_filter_civ.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
23 |
24 |
31 |
--------------------------------------------------------------------------------
/lib/src/main/res/layout/msv_filter_iv.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
16 |
17 |
23 |
24 |
31 |
--------------------------------------------------------------------------------
/lib/src/main/res/layout/msv_item_suggestion.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
18 |
19 |
28 |
--------------------------------------------------------------------------------
/lib/src/main/res/layout/msv_select_filter_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
24 |
25 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/lib/src/main/res/layout/msv_select_filter_section.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/lib/src/main/res/layout/msv_simple.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
20 |
21 |
30 |
31 |
42 |
43 |
49 |
50 |
--------------------------------------------------------------------------------
/lib/src/main/res/layout/msv_suggestions.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
22 |
23 |
32 |
33 |
42 |
43 |
53 |
54 |
60 |
61 |
62 |
69 |
--------------------------------------------------------------------------------
/lib/src/main/res/values-v21/style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
12 |
13 |
14 |
19 |
20 |
25 |
--------------------------------------------------------------------------------
/lib/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 64dp
3 | 120dip
4 |
5 |
--------------------------------------------------------------------------------
/lib/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lib/src/main/res/values/color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #FFF2F2F2
5 | #FFFFFF
6 |
7 |
8 | #59000000
9 | #8C000000
10 | #D9000000
11 | #59efefef
12 | #8Cefefef
13 | #D9efefef
14 |
--------------------------------------------------------------------------------
/lib/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 8dip
5 |
6 | 12dp
7 | 65dp
8 |
9 | 48dp
10 |
11 | 32dip
12 | 2dip
13 | 2dip
14 | 40dip
15 | 4dip
16 |
17 | 16dp
18 | 12dip
19 | 72dip
20 | 36dip
21 | 48dip
22 | 48dip
23 |
24 |
--------------------------------------------------------------------------------
/lib/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | No filter
3 | Search…
4 |
5 |
--------------------------------------------------------------------------------
/lib/src/main/res/values/style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
14 |
15 |
20 |
21 |
25 |
26 |
30 |
--------------------------------------------------------------------------------
/lib/src/test/java/com/claudiodegio/msv/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.msv;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/sample/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/sample/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 27
5 | buildToolsVersion "26.0.2"
6 | defaultConfig {
7 | applicationId "com.claudiodegio.sample.msv"
8 | minSdkVersion 15
9 | targetSdkVersion 27
10 | versionCode 4
11 | versionName "1.3.0"
12 | testInstrumentationRunner "android.support.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 project(path: ':lib', configuration: 'default')
24 | compile fileTree(dir: 'libs', include: ['*.jar'])
25 |
26 | implementation 'com.jakewharton:butterknife:8.8.1'
27 | annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
28 |
29 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
30 | exclude group: 'com.android.support', module: 'support-annotations'
31 | })
32 | implementation 'com.android.support:appcompat-v7:27.0.2'
33 | implementation "com.android.support:design:27.0.2"
34 | implementation 'com.android.support:recyclerview-v7:27.0.2'
35 | testCompile 'junit:junit:4.12'
36 | }
37 |
--------------------------------------------------------------------------------
/sample/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 D:\IDE\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 |
--------------------------------------------------------------------------------
/sample/src/androidTest/java/com/claudiodegio/sample/msv/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.sample.msv;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.claudiodegio.sample.msv", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sample/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
25 |
26 |
29 |
30 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/claudiodegio/sample/msv/BaseMatSearchViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.sample.msv;
2 |
3 | import android.os.Bundle;
4 |
5 | import android.support.annotation.Nullable;
6 | import android.support.design.widget.CoordinatorLayout;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.support.v7.widget.LinearLayoutManager;
9 | import android.support.v7.widget.RecyclerView;
10 | import android.support.v7.widget.Toolbar;
11 |
12 | import android.view.LayoutInflater;
13 | import android.view.Menu;
14 | import android.view.View;
15 | import android.view.ViewGroup;
16 | import android.widget.TextView;
17 |
18 |
19 | import com.claudiodegio.msv.BaseMaterialSearchView;
20 |
21 | import java.util.ArrayList;
22 | import java.util.List;
23 |
24 | import butterknife.BindView;
25 | import butterknife.ButterKnife;
26 |
27 |
28 | public abstract class BaseMatSearchViewActivity extends AppCompatActivity {
29 |
30 | Toolbar mToolbar;
31 | @BindView(R.id.rv_item)
32 | RecyclerView mRvItem;
33 |
34 | @BindView(R.id.sv)
35 | BaseMaterialSearchView mSearchView;
36 |
37 | @BindView(R.id.cl)
38 | CoordinatorLayout mCoordinator;
39 |
40 | @Override
41 | protected void onCreate(@Nullable Bundle savedInstanceState) {
42 | super.onCreate(savedInstanceState);
43 | setContentView(getLayoutId());
44 |
45 | mToolbar = (Toolbar) findViewById(R.id.toolbar);
46 | // Action bar di supporti
47 | setSupportActionBar(mToolbar);
48 | mToolbar.setTitle(getTitle());
49 |
50 | ButterKnife.bind(this);
51 |
52 | init();
53 |
54 | initCustom();
55 | }
56 |
57 | public int getLayoutId() {
58 | return R.layout.test_msv_simple;
59 | }
60 |
61 | protected void init(){
62 | final RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);
63 |
64 | mRvItem.setLayoutManager(layoutManager);
65 | mRvItem.setHasFixedSize(true);
66 |
67 | List list = new ArrayList<>();
68 |
69 | list.add("Have");
70 | list.add("Sodium");
71 | list.add("Routine");
72 | list.add("Systematic");
73 | list.add("Departure");
74 | list.add("Transparent");
75 | list.add("Amputate");
76 | list.add("Dialogue");
77 | list.add("Uncle");
78 | list.add("Credit card");
79 | list.add("Greet");
80 | list.add("Dollar");
81 |
82 | mRvItem.setAdapter(new MatSearchViewActivity.SimpleRVAdapter(list));
83 | }
84 |
85 | protected void initCustom(){
86 |
87 | }
88 |
89 |
90 | @Override
91 | public boolean onCreateOptionsMenu(Menu menu) {
92 | super.onCreateOptionsMenu(menu);
93 | getMenuInflater().inflate(R.menu.test_adv_serach_view, menu);
94 | mSearchView.setMenuItem(menu.findItem(R.id.action_search));
95 | return true;
96 | }
97 | public class SimpleRVAdapter extends RecyclerView.Adapter {
98 | private List dataSource;
99 | public SimpleRVAdapter(List dataArgs){
100 | dataSource = dataArgs;
101 | }
102 |
103 | @Override
104 | public SimpleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
105 | // create a new view
106 | View view = LayoutInflater.from(BaseMatSearchViewActivity.this).inflate(android.R.layout.simple_list_item_1, parent, false);
107 | SimpleViewHolder viewHolder = new SimpleViewHolder(view);
108 | return viewHolder;
109 | }
110 |
111 | public class SimpleViewHolder extends RecyclerView.ViewHolder{
112 | public TextView textView;
113 | public SimpleViewHolder(View itemView) {
114 | super(itemView);
115 | textView = (TextView) itemView;
116 | }
117 | }
118 |
119 | @Override
120 | public void onBindViewHolder(SimpleViewHolder holder, int position) {
121 | holder.textView.setText(dataSource.get(position));
122 | }
123 |
124 | @Override
125 | public int getItemCount() {
126 | return dataSource.size();
127 | }
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/claudiodegio/sample/msv/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.sample.msv;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.view.View;
8 |
9 | import butterknife.ButterKnife;
10 | import butterknife.OnClick;
11 |
12 | public class MainActivity extends AppCompatActivity {
13 |
14 | @Override
15 | protected void onCreate(@Nullable Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 |
18 | setContentView(R.layout.activity_main);
19 |
20 | ButterKnife.bind(this);
21 | }
22 |
23 |
24 | @OnClick({R.id.bt_simple, R.id.bt_suggestions, R.id.bt_filter, R.id.bt_themed})
25 | public void onButtonClick(View view){
26 |
27 | Intent intent = null;
28 |
29 | switch (view.getId()) {
30 | case R.id.bt_simple:
31 | intent = new Intent(this, MatSearchViewActivity.class);
32 | break;
33 | case R.id.bt_suggestions:
34 | intent = new Intent(this, MatSearchViewSuggestionActivity.class);
35 | break;
36 | case R.id.bt_filter:
37 | intent = new Intent(this, MatSearchViewFilterActivity.class);
38 | break;
39 | case R.id.bt_themed:
40 | intent = new Intent(this, ThemedMatSearchViewActivity.class);
41 | break;
42 | }
43 |
44 | if (intent != null) {
45 | startActivity(intent);
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/claudiodegio/sample/msv/MatSearchViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.sample.msv;
2 |
3 | import android.util.Log;
4 | import android.widget.Toast;
5 |
6 | import com.claudiodegio.msv.BaseMaterialSearchView;
7 | import com.claudiodegio.msv.OnSearchViewListener;
8 |
9 |
10 | public class MatSearchViewActivity extends BaseMatSearchViewActivity implements OnSearchViewListener {
11 |
12 |
13 | @Override
14 | protected void initCustom() {
15 | mSearchView.setOnSearchViewListener(this);
16 | }
17 |
18 | public int getLayoutId() {
19 | return R.layout.test_msv_simple;
20 | }
21 |
22 | @Override
23 | public void onSearchViewShown() {
24 |
25 | Toast.makeText(this, "onSearchViewShown", Toast.LENGTH_SHORT).show();
26 | }
27 |
28 | @Override
29 | public void onSearchViewClosed() {
30 |
31 | Toast.makeText(this, "onSearchViewClosed", Toast.LENGTH_SHORT).show();
32 | }
33 |
34 | @Override
35 | public boolean onQueryTextSubmit(String query) {
36 | Toast.makeText(this, "onQueryTextSubmit: " + query, Toast.LENGTH_SHORT).show();
37 | return false;
38 | }
39 |
40 | @Override
41 | public void onQueryTextChange(String newText) {
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/claudiodegio/sample/msv/MatSearchViewFilterActivity.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.sample.msv;
2 |
3 | import android.util.Log;
4 | import android.widget.Toast;
5 |
6 |
7 | import com.claudiodegio.msv.BaseMaterialSearchView;
8 | import com.claudiodegio.msv.FilterMaterialSearchView;
9 | import com.claudiodegio.msv.OnFilterViewListener;
10 | import com.claudiodegio.msv.OnSearchViewListener;
11 | import com.claudiodegio.msv.model.Filter;
12 | import com.claudiodegio.msv.model.Section;
13 |
14 | import java.util.List;
15 |
16 | public class MatSearchViewFilterActivity extends BaseMatSearchViewActivity implements OnSearchViewListener, OnFilterViewListener {
17 |
18 | @Override
19 | protected void initCustom() {
20 | super.initCustom();
21 | mSearchView.setOnSearchViewListener(this);
22 |
23 | FilterMaterialSearchView cast = (FilterMaterialSearchView)mSearchView;
24 |
25 | Section section = new Section("Animals");
26 |
27 | cast.addSection(section);
28 |
29 | Filter filter = new Filter(1, "Duck", 0, R.drawable.cat_duck_48dp, getResources().getColor(R.color.color_cat_duck));
30 | cast.addFilter(filter);
31 |
32 | filter = new Filter(1, "Elephant", 0, R.drawable.cat_elephant_48dp,getResources().getColor(R.color.color_cat_elephant));
33 | cast.addFilter(filter);
34 |
35 | filter = new Filter(1, "Frog", 0, R.drawable.cat_frog_48dp,getResources().getColor(R.color.color_cat_frog));
36 | cast.addFilter(filter);
37 |
38 | section = new Section("Outdoor");
39 |
40 | cast.addSection(section);
41 |
42 | filter = new Filter(2, "Forest", 1, R.drawable.cat_forest_48dp, getResources().getColor(R.color.color_cat_forest));
43 | cast.addFilter(filter);
44 |
45 | filter = new Filter(2, "Mountain", 1, R.drawable.cat_mountain_48dp,getResources().getColor(R.color.color_cat_mountain));
46 | cast.addFilter(filter);
47 |
48 | filter = new Filter(2, "Tent", 1, getResources().getDrawable(R.drawable.cat_tent_48dp), getResources().getColor(R.color.color_cat_tent));
49 | cast.addFilter(filter);
50 |
51 | cast.setOnFilterViewListener(this);
52 | }
53 |
54 | @Override
55 | public int getLayoutId() {
56 | return R.layout.test_msv_filter;
57 | }
58 |
59 | @Override
60 | public void onSearchViewShown(){
61 | }
62 |
63 | @Override
64 | public void onSearchViewClosed() {
65 | }
66 |
67 | @Override
68 | public boolean onQueryTextSubmit(String query) {
69 | Toast.makeText(this, "onQueryTextSubmit:" + query, Toast.LENGTH_SHORT).show();
70 |
71 | return true;
72 | }
73 |
74 | @Override
75 | public void onQueryTextChange(String newText) {
76 |
77 | }
78 |
79 | @Override
80 | public void onFilterAdded(Filter filter) {
81 |
82 | Log.d("TAG", "onFilterAdded:" + filter.getName());
83 |
84 | }
85 |
86 | @Override
87 | public void onFilterRemoved(Filter filter) {
88 | Log.d("TAG", "onFilterRemoved:" + filter.getName());
89 |
90 | }
91 |
92 | @Override
93 | public void onFilterChanged(List list) {
94 | Log.d("TAG", "onFilterChanged:" + list.size());
95 |
96 | }
97 |
98 | /*
99 | public class SimpleRVAdapter extends RecyclerView.Adapter {
100 | private List dataSource;
101 | public SimpleRVAdapter(List dataArgs){
102 | dataSource = dataArgs;
103 | }
104 |
105 | @Override
106 | public BaseMatSearchViewActivity.SimpleRVAdapter.SimpleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
107 | // create a new view
108 | View view = LayoutInflater.from(BaseMatSearchViewActivity.this).inflate(android.R.layout.simple_list_item_1, parent, false);
109 | BaseMatSearchViewActivity.SimpleRVAdapter.SimpleViewHolder viewHolder = new BaseMatSearchViewActivity.SimpleRVAdapter.SimpleViewHolder(view);
110 | return viewHolder;
111 | }
112 |
113 | public class SimpleViewHolder extends RecyclerView.ViewHolder{
114 | public TextView textView;
115 | public SimpleViewHolder(View itemView) {
116 | super(itemView);
117 | textView = (TextView) itemView;
118 | }
119 | }
120 |
121 | @Override
122 | public void onBindViewHolder(BaseMatSearchViewActivity.SimpleRVAdapter.SimpleViewHolder holder, int position) {
123 | holder.textView.setText(dataSource.get(position));
124 | }
125 |
126 | @Override
127 | public int getItemCount() {
128 | return dataSource.size();
129 | }
130 | }*/
131 | }
132 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/claudiodegio/sample/msv/MatSearchViewSuggestionActivity.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.sample.msv;
2 |
3 |
4 | import android.widget.Toast;
5 |
6 | import com.claudiodegio.msv.BaseMaterialSearchView;
7 | import com.claudiodegio.msv.OnSearchViewListener;
8 | import com.claudiodegio.msv.SuggestionMaterialSearchView;
9 |
10 | public class MatSearchViewSuggestionActivity extends BaseMatSearchViewActivity implements OnSearchViewListener {
11 |
12 |
13 | @Override
14 | protected void initCustom() {
15 | super.initCustom();
16 |
17 | String[] arrays = getResources().getStringArray(R.array.query_suggestions);
18 |
19 | SuggestionMaterialSearchView cast = (SuggestionMaterialSearchView)mSearchView;
20 |
21 | cast.setSuggestion(arrays, true);
22 |
23 | mSearchView.setOnSearchViewListener(this);
24 | }
25 |
26 | @Override
27 | public int getLayoutId() {
28 | return R.layout.test_msv_suggestions;
29 | }
30 |
31 | @Override
32 | public void onSearchViewShown() {
33 |
34 | Toast.makeText(this, "onSearchViewShown", Toast.LENGTH_SHORT).show();
35 | }
36 |
37 | @Override
38 | public void onSearchViewClosed() {
39 |
40 | Toast.makeText(this, "onSearchViewClosed", Toast.LENGTH_SHORT).show();
41 | }
42 |
43 | @Override
44 | public boolean onQueryTextSubmit(String query) {
45 | Toast.makeText(this, "onQueryTextSubmit: " + query, Toast.LENGTH_SHORT).show();
46 | return true;
47 | }
48 |
49 | @Override
50 | public void onQueryTextChange(String newText) {
51 | Toast.makeText(this, "onQueryTextChange: " + newText, Toast.LENGTH_SHORT).show();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/claudiodegio/sample/msv/ThemedMatSearchViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.sample.msv;
2 |
3 | import android.util.Log;
4 |
5 | import com.claudiodegio.msv.BaseMaterialSearchView;
6 | import com.claudiodegio.msv.OnSearchViewListener;
7 |
8 |
9 | public class ThemedMatSearchViewActivity extends BaseMatSearchViewActivity implements OnSearchViewListener {
10 |
11 |
12 | @Override
13 | protected void initCustom() {
14 | mSearchView.setOnSearchViewListener(this);
15 | }
16 |
17 | public int getLayoutId() {
18 | return R.layout.test_msv_themed_simple;
19 | }
20 |
21 | @Override
22 | public void onSearchViewShown() {
23 | Log.d("TAG", "onSearchViewShown: ");
24 | }
25 |
26 | @Override
27 | public void onSearchViewClosed() {
28 | Log.d("TAG", "onSearchViewClosed: ");
29 | }
30 |
31 | @Override
32 | public boolean onQueryTextSubmit(String query) {
33 | Log.d("TAG", "onQueryTextSubmit: " + query);
34 | return true;
35 | }
36 |
37 | @Override
38 | public void onQueryTextChange(String newText) {
39 | Log.d("TAG", "onQueryTextChange: " + newText);
40 |
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_duck_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_duck_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_duck_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_duck_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_elephant_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_elephant_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_elephant_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_elephant_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_forest_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_forest_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_forest_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_forest_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_frog_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_frog_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_frog_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_frog_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_mountain_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_mountain_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_mountain_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_mountain_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_tent_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_tent_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/cat_tent_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/cat_tent_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_black_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_black_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_black_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_black_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_black_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_grey600_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_grey600_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_grey600_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_grey600_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_grey600_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_grey600_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_grey600_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_white_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_white_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_white_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_magnify_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-hdpi/ic_magnify_white_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_duck_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_duck_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_duck_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_duck_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_elephant_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_elephant_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_elephant_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_elephant_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_forest_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_forest_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_forest_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_forest_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_frog_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_frog_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_frog_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_frog_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_mountain_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_mountain_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_mountain_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_mountain_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_tent_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_tent_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/cat_tent_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/cat_tent_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_black_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_black_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_black_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_black_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_black_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_grey600_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_grey600_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_grey600_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_grey600_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_grey600_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_grey600_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_grey600_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_white_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_white_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_white_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_magnify_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-mdpi/ic_magnify_white_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_duck_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_duck_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_duck_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_duck_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_elephant_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_elephant_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_elephant_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_elephant_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_forest_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_forest_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_forest_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_forest_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_frog_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_frog_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_frog_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_frog_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_mountain_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_mountain_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_mountain_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_mountain_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_tent_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_tent_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/cat_tent_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/cat_tent_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_black_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_black_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_black_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_black_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_black_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_grey600_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_grey600_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_grey600_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_grey600_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_grey600_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_grey600_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_grey600_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_white_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_white_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_white_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_magnify_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xhdpi/ic_magnify_white_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_duck_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_duck_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_duck_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_duck_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_elephant_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_elephant_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_elephant_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_elephant_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_forest_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_forest_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_forest_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_forest_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_frog_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_frog_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_frog_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_frog_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_mountain_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_mountain_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_mountain_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_mountain_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_tent_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_tent_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/cat_tent_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/cat_tent_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_black_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_black_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_black_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_black_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_black_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_grey600_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_grey600_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_grey600_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_grey600_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_grey600_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_grey600_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_grey600_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_white_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_white_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_white_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_magnify_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxhdpi/ic_magnify_white_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_duck_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_duck_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_duck_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_duck_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_elephant_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_elephant_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_elephant_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_elephant_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_forest_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_forest_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_forest_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_forest_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_frog_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_frog_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_frog_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_frog_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_mountain_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_mountain_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_mountain_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_mountain_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_tent_100dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_tent_100dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/cat_tent_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/cat_tent_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_black_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_black_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_black_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_black_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_black_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_grey600_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_grey600_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_grey600_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_grey600_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_grey600_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_grey600_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_grey600_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_white_18dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_white_24dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_white_36dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_magnify_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/drawable-xxxhdpi/ic_magnify_white_48dp.png
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
13 |
14 |
20 |
21 |
27 |
28 |
34 |
35 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/test_msv_filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
17 |
21 |
27 |
28 |
29 |
30 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/test_msv_simple.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
20 |
21 |
27 |
28 |
29 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/test_msv_suggestions.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
16 |
17 |
18 |
22 |
28 |
29 |
30 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/test_msv_themed_simple.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
17 |
21 |
22 |
25 |
26 |
32 |
33 |
34 |
35 |
44 |
45 |
--------------------------------------------------------------------------------
/sample/src/main/res/menu/test_adv_serach_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/cat_array.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @drawable/cat_duck_48dp
5 | - @drawable/cat_elephant_48dp
6 | - @drawable/cat_forest_48dp
7 | - @drawable/cat_frog_48dp
8 | - @drawable/cat_mountain_48dp
9 | - @drawable/cat_tent_48dp
10 |
11 |
12 | - @drawable/cat_duck_100dp
13 | - @drawable/cat_elephant_100dp
14 | - @drawable/cat_forest_100dp
15 | - @drawable/cat_frog_100dp
16 | - @drawable/cat_mountain_100dp
17 | - @drawable/cat_tent_100dp
18 |
19 |
20 | - @color/color_cat_duck
21 | - @color/color_cat_elephant
22 | - @color/color_cat_forest
23 | - @color/color_cat_frog
24 | - @color/color_cat_mountain
25 | - @color/color_cat_tent
26 |
27 |
28 | - @color/color_dark_cat_duck
29 | - @color/color_dark_cat_elephant
30 | - @color/color_dark_cat_forest
31 | - @color/color_dark_cat_frog
32 | - @color/color_dark_cat_mountain
33 | - @color/color_dark_cat_tent
34 |
35 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/cat_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #408cfb
4 | #726a5b
5 | #8b54c3
6 | #b0094b
7 | #6350c7
8 | #3966eb
9 | #0e6efa
10 | #565044
11 | #723ba9
12 | #7f0736
13 | #4a37ad
14 | #1648db
15 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
8 | #FF3333
9 | #FFEB3B
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Msv Sample
3 |
4 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 |
15 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/test_arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | - A very very long suggestion that would span multiple lines.
6 | - Android
7 | - iOS
8 | - SCALA
9 | - Ruby
10 | - JavaScript
11 | - C#
12 | - Python
13 | - C
14 | - C++
15 | - PHP
16 | - Go
17 | - Perl
18 | - Bash
19 | - Lua
20 | - R
21 | - TCL
22 | - Haskell
23 | - Objective C
24 | - Swift
25 | - Kotlin
26 | - jQuery
27 | - Development
28 | - Web
29 | - Ajax
30 | - Test
31 | - Testing
32 | - CookBook
33 | - Beagle
34 | - VMware
35 | - Less.js
36 | - IDE
37 | - Arduino
38 | - Xamarin
39 | - UI
40 | - Microsoft
41 | - Application
42 | - Development
43 | - JUnit
44 | - SQL
45 | - Beagle
46 |
47 |
--------------------------------------------------------------------------------
/sample/src/test/java/com/claudiodegio/sample/msv/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.claudiodegio.sample.msv;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/screen/Resized-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/screen/Resized-1.png
--------------------------------------------------------------------------------
/screen/Resized-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/screen/Resized-2.png
--------------------------------------------------------------------------------
/screen/Resized-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/screen/Resized-3.png
--------------------------------------------------------------------------------
/screen/Resized-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/screen/Resized-4.png
--------------------------------------------------------------------------------
/screen/device1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/screen/device1.png
--------------------------------------------------------------------------------
/screen/device2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/screen/device2.png
--------------------------------------------------------------------------------
/screen/device3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/screen/device3.png
--------------------------------------------------------------------------------
/screen/device4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/screen/device4.png
--------------------------------------------------------------------------------
/screen/device5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/claudiodegio/MsvSearch/4f1b4f8dd4fa530c9a1919d3cdee386ba0cf1623/screen/device5.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':sample', ':lib'
2 |
--------------------------------------------------------------------------------