All Projects → claudiodegio → Msvsearch

claudiodegio / Msvsearch

Material Search View

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Msvsearch

Kau
An extensive collection of Kotlin Android Utils
Stars: ✭ 182 (+22.97%)
Mutual labels:  library, material
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+11089.19%)
Mutual labels:  library, material
Materialshadows
Material Shadows for android : A library for supporting convex material shadows
Stars: ✭ 2,145 (+1349.32%)
Mutual labels:  library, material
Tutoshowcase
A simple and Elegant Showcase view for Android
Stars: ✭ 499 (+237.16%)
Mutual labels:  library, material
Meowbottomnavigation
Android Meow Bottm Navigation
Stars: ✭ 912 (+516.22%)
Mutual labels:  library, material
Smartmaterialspinner
The powerful android spinner library for your application
Stars: ✭ 108 (-27.03%)
Mutual labels:  library, material
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (+49.32%)
Mutual labels:  library, material
Textfieldboxes
Material Design text field that comes in a box, based on (OLD) Google Material Design guidelines.
Stars: ✭ 760 (+413.51%)
Mutual labels:  library, material
Matter
Material Design Components in Pure CSS. Materializing HTML at just one class per component 🍰
Stars: ✭ 888 (+500%)
Mutual labels:  library, material
Material About Library
Makes it easy to create beautiful about screens for your apps
Stars: ✭ 1,099 (+642.57%)
Mutual labels:  library, material
Blazorise
Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Bulma, AntDesign, and Material.
Stars: ✭ 2,103 (+1320.95%)
Mutual labels:  library, material
Libnmea
Lightweight C library for parsing NMEA 0183 sentences
Stars: ✭ 146 (-1.35%)
Mutual labels:  library
Simpleratingbar
SimpleRatingBar allows us to create a RatingBar with margin between items
Stars: ✭ 144 (-2.7%)
Mutual labels:  library
Ornamentum
🚀 Lightweight, feature rich, highly configurable, UI framework agnostic, fully responsive Angular data table with no external dependencies
Stars: ✭ 143 (-3.38%)
Mutual labels:  library
Material
New Material —— A Material Design Theme for Typecho
Stars: ✭ 144 (-2.7%)
Mutual labels:  material
Esp32 epaper example
Full featured ePaper library for ESP32 with demo application
Stars: ✭ 147 (-0.68%)
Mutual labels:  library
Cordova Plugin Console
[DEPRECATED] Apache Cordova Plugin console
Stars: ✭ 145 (-2.03%)
Mutual labels:  library
Android Cookie Store
Android InMemory and persistent Cookie Store for HttpURLConnection and OkHttp, with extensions to easily sync cookies in Android WebViews.
Stars: ✭ 144 (-2.7%)
Mutual labels:  library
Metamodel
Mirror of Apache Metamodel
Stars: ✭ 143 (-3.38%)
Mutual labels:  library
Chromaterial
ChroMATERIAL is an IntelliJ Platform coloring scheme that expresses the chromatic nature of Material Design within IntelliJ and Android Studio. It is intended to highlight the most import aspects of your code.
Stars: ✭ 143 (-3.38%)
Mutual labels:  material

Android Arsenal

Material Search View

Cute library to implement SearchView in a Material Design Approach. Works from Android API 14 (ICS) and above.

Get it on Google Play

sample sample sample sample

Usage

Add the dependencies to your gradle file:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
dependencies {
        compile 'com.github.claudiodegio:MsvSearch:1.0.0'
}

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):

<!— Must be last for right layering display —>
<FrameLayout
    android:id="@+id/toolbar_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@color/theme_primary" />

   <com.claudiodegio.msv.MaterialSearchView
        android:id="@+id/sv"
        android:elevation="5dip"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    </com.claudiodegio.msv.MaterialSearchView>
</FrameLayout>

Create a menu resource file and add the search item into the menu file:

	<menu xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto">

        <item
            android:id="@+id/action_search"
            android:title="Search"
            android:icon="@drawable/ic_magnify_white_24dp"
            app:showAsAction="always"
            />
    </menu>

Add define it in the onCreateOptionsMenu:

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_main, menu);

        MenuItem item = menu.findItem(R.id.action_search);
        searchView.setMenuItem(item);

        return true;
    }

Implement following methods from OnSearchViewListener

    @Override
    public void onSearchViewShown() {

    }

    @Override
    public void onSearchViewClosed() {

    }

    @Override
    public boolean onQueryTextSubmit(String query) {
        // handle text submit and then return true
        return false;
    }

    @Override
    public void onQueryTextChange(String newText) {

    }

Hook your OnSearchViewListener and don't forget to add toolbar and set it as support action bar!!

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.test_msv_simple);

        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        mSearchView = (MaterialSearchView) findViewById(R.id.sv);
        mSearchView.setOnSearchViewListener(this); // this class implements OnSearchViewListener
    }

More detailed and advanced examples coming soon!

Help me

Pull requests are more than welcome, help me and others improve this awesome library.

License

Copyright 2016 Claudio Degioanni

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].