I wanna know how to access strings & colors & dimens of xml files programmatically.
Is there any easy way to access it ???
I wanna know how to access strings & colors & dimens of xml files programmatically.
Is there any easy way to access it ???
You can use getResource of your activity to get the string, color ,etc from your values folder of your project.
sample:
String m_string = getResources().getString(R.string.app_name); //string xml
float m_dimension = getResources().getDimension(R.dimen.dimension); //dimens xml
int m_color = getResources().getColor(R.color.blue); //color xml