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
Post a Comment