Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public void altbildirim(Activity context,String yazi,int sure) {
  2. View parentLayout = context.findViewById(android.R.id.content);
  3. Snackbar snackbar = Snackbar.make(parentLayout, yazi, sure);
  4. View snackbarLayout = snackbar.getView();
  5. TextView textView = (TextView)snackbarLayout.findViewById(android.support.design.R.id.snackbar_text);
  6. textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.erroricon, 0, 0, 0);
  7. textView.setCompoundDrawablePadding(10);
  8. snackbar.show();
  9. }
  10.  
  11. textView.setCompoundDrawablePadding(getResources().getDimensionPixelOffset(R.dimen.icon_padding));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement