android - Custom Snackbar width is not setting MATCH_PARENT in Tablets -


snackbar width matching full width in mobiles not setting match_parent when running in tablet. kindly me!code below

final snackbar msnackbar = snackbar.make(view, "", snackbar.length_long); layoutinflater inflater = (layoutinflater) getbasecontext().getsystemservice(context.layout_inflater_service); snackbar.snackbarlayout layout = (snackbar.snackbarlayout) msnackbar.getview(); layout.setpadding(0,0,0,0); textview textview = (textview)  layout.findviewbyid(android.support.design.r.id.snackbar_text); textview.setvisibility(view.invisible); snackview = inflater.inflate(r.layout.snackbar_layout, null); layout.addview(snackview, 0); 

i think default behavior of snackbar on tablets.for more information look here


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -