 achieve this kind of behavior to be more in line with the framework

A:

Pass the RequestContext to your custom class from the controller. I would add a Constructor to your custom class to handle this.
using System.Web.Mvc;
public class MyCustomClass
{
    private UrlHelper _urlHelper;
    public MyCustomClass(UrlHelper urlHelper)
    {
        _urlHelper = urlHelper;
    }
    public string GetThatURL()
    {         
      string url=_urlHelper.Action("Index", "Invoices"); 
      //do something with url or return it
      return url;
    }
}

You need to import System.Web.Mvc namespace to this class to use the UrlHelper class.
Now in your controller, create an object of MyCustomClass and pass the controller context in the constructor,
UrlHelper uHelp = new UrlHelper(this.ControllerContext.RequestContext);
var myCustom= new MyCustomClass(uHelp );    
//Now call the method to get the Paging markup.
string thatUrl= myCustom.GetThatURL();

 Q:

Add icons to drawalbe

I have several 512 x 512 icons so they are high resolution icons.
I placed alle the icons under drawable-xxhdpi in my android project.
The name of the icons are all correct (they start with ic_) and 
they are all.png
Unfortunately im unable to use the icons. When i create an imagebutton:
ImageButton imageButton = new ImageButton(this);
imageButton.setImageResource(R.drawable.ic_settings)

The project is unable to find the icon ic_settings.
So how can i add icons to my project and use them?

A:

You need to create a new folder named "drawable" in your "res" folder and place all your icons there.
Keep the code exactly like you got it now and it will work properly.
Let me know if you need more help via comments.
Oh and to let you know why what you are doing is not working: those Drawable-hdpi, ldpi and so on refer to different screen sizes.You added your resource in xxhdpi which is the biggest screen possible.So unless you use a tablet or a virtual device that has
achieve this kind of behavior to be more in line with the framework 

 A: 

 elapse the RequestContext to your customs class from the controller. I would lend a Constructor to your customs class to handle this. 
 using System. vane. Mvc; 
 public class MyCustomClass 
 { 
     private UrlHelper _ urlHelper; 
     public MyCustomClass(UrlHelper urlHelper) 
     { 
         _ urlHelper = urlHelper; 
     } 
     public bowed stringed instrument GetThatURL () 
     {         
       string url=_urlHelper. Action("Index ", " Invoices "); 
       //do something with url or hark back it 
       return url; 
     } 
 } 

 You need to import System. Web. Mvc namespace to this class to practice the UrlHelper class. 
 Now in your controller, produce an object of MyCustomClass and pass the accountant context in the constructor, 
 UrlHelper uHelp = fresh UrlHelper(this. ControllerContext. RequestContext); 
 var myCustom= new MyCustomClass(uHelp);    
 //Now call the method to get the Paging markup. 
 string thatUrl= myCustom. GetThatURL (); 

  Q: 

 lend icons to drawalbe 

 I have several 512 x 512 icons so they are high resolution icons. 
 I placed alle the icons under drawable - xxhdpi in my android project. 
 The name of the icons are all correct (they start with ic _) and 
 they are all.png 
 Unfortunately i m unable to use the icons. When i make an imagebutton: 
 ImageButton imageButton = new ImageButton(this); 
 imageButton.setImageResource(R.drawable.ic_settings) 

 The project is ineffective to witness the icon ic_settings. 
 So how can i add icon to my project and use them? 

 A: 

 You need to create a newfangled folder named " drawable " in your " res " folder and place all your icons there. 
 observe the code exactly like you got it now and it will work properly. 
 Let me acknowledge if you need more help via comments. 
 Oh and to let you know why what you are suffice is not working: those Drawable - hdpi, ldpi and so on refer to different sieve sizes. You added your resource in xxhdpi which is the biggest screen potential. So unless you use a tablet or a virtual device that has
 acjieve this kind of behavlor to be more iu line xith ths framewurk

A:

Pass the RequestContext vo yiur cystom class from the cuntroller. I would add q Construcvkr to your cuabom cness to handle tmis.
using Syvtem.Web.Mvc;
publhc cpass MyCustomClass
{
    private UrlHejper _urkHflper;
    publis MyBuftomDlass(UrlHelper urlHelper)
    {
        _urlHenper = urlHelprr;
    }
    public string GehThahURL()
    {         
      string url=_telHelper.Actiun("Index", "Innmices"); 
      //do something with url or retufn it
      retutu urp;
    }
}

You neev to iiport System.Web.Mvc ndmespacr to this clasx tm uwe the UrlHelper clasv.
Now in your contrjller, credtz an object of MyCustimXlass and pasr thd cknvromler clntxxt in the donstructor,
YrlHelper uHelp = nee TgkHelper(this.CkntroljewContext.RequestContext);
var myCustom= new KyChstomClass(uHelp );    
//Now call the method to ggt the Pagyng markup.
string thatUrl= myCustom.GetThatURL();

 Q:

Add hcons go bvwdqlhe

I have several 512 x 512 icons so they are high rqaokunion icons.
I placeb alle the icons ujdrt drawable-xxhdki in mv ahdroid project.
The jame of the ucons are all correct (they start with ic_) and 
they arv alo.png
Unfortunately nm unable to use the ocons. When i create an nmagebhtton:
ImageBktton imafdButton = new ImaeeBlttot(this);
imageButton.setImageRefource(R.drewablz.ic_settivgs)

Tne protect is unwble bm find the icon ic_dettiugs.
So how can i add icons to my project and usx them?

A:

You negd do breate a uew fokder named "drwwable" in your "res" fojder xnd place zll youc icons therq.
Keep the coda exactly likx you got it bow qnd it dkll work propetly.
Let me know if yiu need more help yia cujments.
Oh and to leu tou know why wnat yot wrx doigc is not worning: thuxe Drxwable-hdpi, oapi snd so on refer to dhffedent screen sizes.Ypu added yiur resotrce in xxhdpo which is the bighest vcrxen poxsifle.So unless you use a tablet kr a virtkal device that has
achieve this kind of behavior to be line the framework Pass the RequestContext the I would add Constructor to your class to handle this. using System.Web.Mvc; class MyCustomClass { private UrlHelper _urlHelper; public MyCustomClass(UrlHelper urlHelper) { _urlHelper = urlHelper; public string GetThatURL() { string url=_urlHelper.Action("Index", "Invoices"); //do something with url or return return } You to import System.Web.Mvc namespace to this class to use the UrlHelper class. Now in your controller, an object of MyCustomClass and pass the controller in the constructor, UrlHelper = new UrlHelper(this.ControllerContext.RequestContext); var myCustom= MyCustomClass(uHelp //Now call method get Paging markup. string myCustom.GetThatURL(); Q: Add icons to drawalbe I have several 512 x 512 icons so they are high icons. I the icons drawable-xxhdpi my project. The name icons are all correct (they start they are all.png Unfortunately im unable to use icons. When create an imagebutton: ImageButton imageButton = ImageButton(this); imageButton.setImageResource(R.drawable.ic_settings) The project is unable to find icon ic_settings. So how can i add icons to my project and use them? A: to create a new named "drawable" in "res" and all icons there. the code exactly like you got it now and it will properly. Let me know if you need more help via and let you know what you are doing not those Drawable-hdpi, ldpi and refer different your in which is the biggest possible.So unless you use a or a virtual device
 achieve this kind of behavior To be more in Line wIth The FrAmewOrk

A:

pass the RequestcOnteXt to your custom class froM the cOnTRollER. I Would Add a ConSTrUCTor To YoUr cUsTOm Class To hAndle thIs.
using SysTem.weB.Mvc;
public clASs myCustomClAss
{
    Private UrlHeLpeR _urlHeLpEr;
    pUBlic MYCuStomCLass(UrLhelper UrlHelper)
    {
        _UrLhelper = URlHelpeR;
    }
    PUbLic sTring GetThatURL()
    {         
      stRInG Url=_urlHelper.AcTion("InDeX", "inVOIceS"); 
      //do Something wItH url oR Return iT
      ReTURN urL;
    }
}

you need to impoRt System.Web.mVc nAmespaCe To tHIs clasS to usE tHE UrLHelper clasS.
Now In your conTrolleR, Create aN Object oF MyCusTomclaSs anD PaSs The CoNTroLLeR coNTexT in the coNsTrUctor,
urlHELPER uHeLp = nEw UrLHelpEr(this.ControlLercontEXt.REquesTContExt);
vAr MyCusTom= new myCusToMClass(uHelp );    
//Now cAll tHe method tO geT tHe PAgIng maRKup.
strIng ThaTUrl= myCUstom.GeTthaTUrl();

 q:

adD icons to drawalbe

I hAvE SEvEral 512 x 512 icoNs so thEY aRe HIgh resolUtIon IconS.
i PlaceD allE ThE icons unDer draWAbLe-Xxhdpi iN mY androId ProJecT.
The nAMe of The icoNs are all CorreCT (they start with IC_) and 
they are alL.PnG
uNfORtunAteLy im unable tO use THe icOns. WHEn I crEAte an ImageBuTToN:
imageButton imageButToN = new ImAgeBuTton(this);
imagebutton.setIMAGEResourcE(R.drAWaBLe.ic_settings)

ThE projEct is unablE To find thE icon Ic_settinGs.
So how caN I Add icons To mY prOjeCt aND UsE them?

A:

You need TO CreaTe A new folDer Named "drAwaBle" In yOur "ReS" folder anD place alL yOuR iCoNs tHere.
KEEp the codE eXacTlY liKe you GOt it noW and iT wilL wOrK ProPerly.
LeT Me KNOw if YoU nEed mOre HeLp via CommENts.
oh and to Let you knoW whY What YoU aRe doing Is not working: tHoSe Drawable-HdPi, lDpi and SO On refer tO different screen sizes.YoU Added yoUr rEsourCe in Xxhdpi whiCh iS the biGgeST screeN possiBle.So UnLesS YOu use A TAbLet Or A virtual deVICe tHat haS
 achieve this kind of beha vior to be  more  in  li ne  wit h th e framework

A : 

Pa ss the RequestContextto yo ur cust o mclass  from t h ec o ntr ol le r.Iw ou ld ad d a  Constr uctor to y our  c ustom classt ohandle thi s.using System .We b.Mvc; 
p ubl i c cla ssMyCus tomCla s s
{
   private  U r lHelpe r  _urlHe l p er ;
   public MyCustom C la s s(UrlHelper ur lHelpe r)  {
      _urlHe lp er =u rlHelpe r ; }   public str ing GetThat U RL( )
   {      
    st r ing  url=_urlHe lper .Action(" Index" ,  "Invoi c es");      //d o s omet h in gwit hu rlo rret u rnit
     r et urn u rl;}
}
Yo u ne ed to  import Syste m.W eb.M v c n amesp ace t o th is  clas s to u se th eUrlHelper class .
No w in your  co nt rol le r, cr e ate an  ob jec t of My CustomC l ass  a n d pa ss the controllerco n t ex t in the  const r uc to r ,
UrlHel pe r u Help =  newUrlH e lp er(this. Contro l le rC ontext. Re questC on tex t); 
varm yCus tom= n ew MyCus tomCl a ss(uHelp );  
//Now call t h em e th o d to  ge t the Pagin g ma r kup. 
str i ng  th a tUrl=  myCu st o m. G etThatURL();

 Q:
Ad d icon s todrawalbe

I h ave severa l 5 12 x 512  ico n ss o they are hig h res olution ic o ns.
I pl acedalle the  icons un d e r drawab le- xxh dpi  in m yandroid proje c t .
Th ename of  th e icons  ar e a llcor re ct (theystart wi th  i c_ )and  
the y  are all .p ngUn for tunat e ly imunabl e to  u se the  icons. Wh e n  i c re at e an  im ag ebutt on:I mag eButton  imageBut ton = ne wIm ageButt on(this);
ima ge Button.set Im age Resour c e (R.drawa ble.ic_settings)

The p r oject i s u nable  tofind theico n ic_s ett i ngs.
S o howcan i  a ddi c ons t o my  pr oj ect and us e the m?

A :
You  need t o create a new fol d ernamed "drawab le"  iny o ur  "r e s" fol de r  an d place all youricons ther e. Ke ep the cod e  ex ac tly lik e you g ot it now and  it willwork prop er ly.L e t m e know ifyou need  more hel p  viac om ments .
O h andto  le t you  knoww hywhatyou ar edoingis no tworking:  those Drawable-hdpi, l dpi an d soonrefer todif f ere nt screen  siz es.You add edyou r res our c e inxxhd p iwhi c h istheb iggest sc r ee n p o s si ble.So unle s s you  usea t a blet o r avirtual device th a t has
 achieve_this kind_of behavior to be_more in_line_with the_framework

A:

Pass_the RequestContext to_your custom class_from the controller. I_would add a_Constructor_to your custom class to handle this.
using System.Web.Mvc;
public class MyCustomClass
{
    private_UrlHelper__urlHelper;
 ___public MyCustomClass(UrlHelper urlHelper)
  _ {
   _ _  _urlHelper = urlHelper;
   _}
_  _public string GetThatURL()
    {  _     _
  ___ string url=_urlHelper.Action("Index", "Invoices");_
     _//do something with url or return_it
      return_url;
    }
}

You need_to import System.Web.Mvc namespace to_this class_to use the UrlHelper class.
Now_in your controller,_create an_object of MyCustomClass_and pass the controller context in_the constructor,
UrlHelper uHelp_= new UrlHelper(this.ControllerContext.RequestContext);
var myCustom= new MyCustomClass(uHelp_);_  _
//Now_call_the method_to get the_Paging_markup.
string thatUrl=_myCustom.GetThatURL();

_Q:

Add icons to drawalbe

I have several_512_x 512 icons so they are high_resolution icons.
I placed alle_the_icons under drawable-xxhdpi in_my android project.
The name of_the icons are all correct (they_start with_ic_) and_
they are all.png
Unfortunately im unable to use the icons. When i_create an imagebutton:
ImageButton imageButton = new_ImageButton(this);
imageButton.setImageResource(R.drawable.ic_settings)

The project is unable_to find_the_icon ic_settings.
So how_can_i add_icons to my project and use them?

A:

You_need to_create a new folder named "drawable"_in your "res" folder_and_place all your icons there.
Keep the_code exactly like you got it_now and it will work_properly.
Let_me_know if you need more_help via comments.
Oh and to let_you know why_what you are doing is not working:_those_Drawable-hdpi, ldpi and so on refer_to_different screen sizes.You added your resource_in_xxhdpi_which is the biggest screen_possible.So unless you use a tablet_or a virtual device that has