android - Why is the width of toast shorter than its content? -


i wrote activity contains navigation drawer (a simple fragment listview inside), , model , adapter listview. there imageview , textview in single list item, it's in many apps. that's have done, , rest codes of activity , fragment's classes generated automatically android studio. when used toast.maketext in activity, result looks this.

i've searched question , tried using toast.maketext(this.getapplicationcontext(), ...) instead of toast.maketext(this, ...), , worked. i'm wondering why happen , how should solved problem correctly?

in official documentation says typical toast looks this:

context context = getapplicationcontext(); toast toast = toast.maketext(context, text, duration); 

i imagine because depending on class have, context varies because not context instances created equal.

more info here:


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -