Material Design-style searchview for voice search
Material design style Searchview to achieve voice search function, pop-up recording dialog box effect is also very beautiful.
But this code supports more than 5.0 of the phone to see the effect.
The Voiceactivity class enables recording of speech functions. Customizing a Materialsearchview
searchview.setonquerytextlistener (new Materialsearchview.onquerytextlistener () {
@Override
public boolean onquerytextsubmit (String query) {
Snackbar.make (Findviewbyid (R.id.container), " Query: "+ query, Snackbar.length_long)
Show ();
return false;
}
@Override
public boolean onquerytextchange (String newtext) {
//do some magic
return false;
}
});
Searchview.setonsearchviewlistener (new Materialsearchview.searchviewlistener () {
@Override
public void Onsearchviewshown () {
//do some magic
}
@Override
public void onsearchviewclosed () {
Do some magic
}
});
Operating effect:
Related code
Material Design-style searchview for voice search
Williamchart all kinds of chart effect realization Daquan
Viewpager Implementing the Welcome page animation effect
Alarm clock alarmandmusic sliding adjustment time and page rotation windmill effect
Flipviewpager to the item to achieve left and right fold sliding page effect
High imitation NetEase cloud Music client's home page switch tabhost
Several popular Android progress effects
High imitation QQ space slide menu effect and skin changing function
Rotatemenu to simply rotate the menu control
Wheelmenu Android Big Wheel implementation
Material Design-style searchview for voice search "It blue Panther"