Follwing the new android snackbar, i\'m trying to set it to be positioned on a specific y coordinate. Its seems to be not even a possible.
I\'ve tried with getting t
Defining a layout explicitly for the Snackbar may not always be practical.
The issue seems to have been targeting the parent, rather than the Snackbar.
Snackbar snackbar = Snackbar.make(layout, message, duration);
View snackbarLayout = snackbar.getView();
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
);
// Layout must match parent layout type
lp.setMargins(50, 0, 0, 0);
// Margins relative to the parent view.
// This would be 50 from the top left.
snackbarLayout.setLayoutParams(lp);
snackbar.show();