android - Toast not showing well when using AppCompatActivity -


i inherited "appcompatactivity" activity in custom activity shown in code below :

public class myhomeactivity : appcompatactivity {    toast.maketext(this, "email & message sent @ sos contacts.", toastlength.long).show(); } 

the toast message not showing in activity shown in picture below.. please if have solution it....

enter image description here

create custom view toast textview support multiple lines, create custom view toast text fits in it.

view view = layoutinflater.inflate(resource.layout.custom_toast, null); var txt = view.findviewbyid<textview>(resource.id.txtcustomtoast); txt.text = "your toast message";  var toast = new toast(this)     {         duration = toastlength.short,         view = view     }; toast.show(); 

also inserting new line character (i.e \n) toast message in current code, show toast message in 2 lines , background proper.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -