Android get system icon programmatically -


i'm trying use java (not xml) add system drawable layout , able in xml part can't figured out how add system drawable in java ?

in xml

android:drawable="@android:drawable/cursor" 

how program in java

resources res = getresources(); drawable img = res.getdrawable(r.drawable.cursor); 

just

drawable img = res.getdrawable(android.r.drawable.cursor); 

Comments