Friday, 23 August 2013

Android - Set Text on 'Loading" ProgressBar from strings.xml

Android - Set Text on 'Loading" ProgressBar from strings.xml

I am working on a Live Project. and we are designing it for 2 languages.
So, I have to take each text from strings.xml When I click on any link and
when a view is loading it is showing ProgressDialog showing Loading... The
code for that is,
ProgressDialog dialog =
ProgressDialog.show(HomeScreen_menu.this,"","Loading...", true, false);
but, I want it from from strings.xml
How can I do that?? I tried,
ProgressDialog dialog =
ProgressDialog.show(HomeScreen_menu.this,"",R.string.loading_data, true,
false);
but, It is showing error at R.string.loading_data because it is int value.
Please Help..!
Thank You..:-)

No comments:

Post a Comment