I've installed my .apk on Transformer Prime 201 with android ver. 4.0.3 but ProgressDialog does't look like custom ProgressDialog on device.
Why is it so? What does I must to change in my code for using custom ProgressDialog style on the device?
ProgressDialog progressDialog = new ProgressDialog(this.context);
progressDialog.setIndeterminate(true);
progressDialog.setCancelable(true);
progressDialog.setOnCancelListener(this);
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.setMessage(MESSAGE);
progressDialog.show();
You need to set your App to the Holo Theme. This progressIndicator is only shown if you use the Holo theme in your App.
The problem is that you can not simply set the Theme because devices with Android Versions smaller then 3 don't have this theme available.
Therefor you neet to create two Theme files. One in the folder res/values/ and one in the folder res/values-v11/ The file in the folder res/values-v11 will be loaded for all devices with API level 11 or greater.
In the values-v11 folder define a theme for your app like this:
<resources>
<style name="Theme" parent="@android:style/Theme.Holo.Light"></style>
</resources>
In the default values folder define a theme like this:
<resources>
<style name="Theme" parent="@android:style/Theme.Light.NoTitleBar"></style>
</resources>
Now apply this theme to your application in the Manifest:
<application
android:name=".name.App"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme" >
For more informations on this read the documentation on themes and styles.