¡@

Home 

2014/10/16 ¤W¤È 08:21:57

android Programming Glossary: r.drawable.bar

imageview drawable id in android

http://stackoverflow.com/questions/4526585/imageview-drawable-id-in-android

assert R.id.someImage imageView.getId switch getDrawableId imageView case R.drawable.foo imageView.setDrawableResource R.drawable.bar break case R.drawable.bar default imageView.setDrawableResource R.drawable.foo break Right So that function getDrawableId.. switch getDrawableId imageView case R.drawable.foo imageView.setDrawableResource R.drawable.bar break case R.drawable.bar default imageView.setDrawableResource R.drawable.foo break Right So that function getDrawableId doesn't exist. You can't.. imageView.getTag integer integer null 0 integer switch integer case R.drawable.foo imageView.setDrawableResource R.drawable.bar imageView.setTag R.drawable.bar break case R.drawable.bar default imageView.setDrawableResource R.drawable.foo imageView.setTag..

Creating Closed Source Android Libraries

http://stackoverflow.com/questions/6269816/creating-closed-source-android-libraries

e.g. layouts have to be distributed as open source . And your Java code will not be able to use R.layout.foo or R.drawable.bar since the code will not be recompiled as part of building the host project. Instead you will need to use reflection or getIdentifier..