style defination not found.

Problems with Canvas, OpenGL, etc...

style defination not found.

Postby ashapawaskar04 » Thu Jun 10, 2010 1:41 pm

Hi

Can anyone explain what is this used for

style="?android:attr/progressBarStyleSmall"

I found this line inside android's sample application 'API demos'. I am trying to understand how they have created progress bar animation and I am stuck at this line.

I did not get any such style defined under res/values/style file.

Regards
Asha P.
ashapawaskar04
Freshman
Freshman
 
Posts: 6
Joined: Tue May 18, 2010 1:56 pm

Top

Re: style defination not found.

Postby IronChef253 » Sat Jun 19, 2010 7:52 am

Hello,

The "Progress Bar" in Android is a special Widget that is included in the Android SDK / API. Basically, loading bars are a very common problem that developers want to solve so Google went ahead and built in four loading bars that you can use out-of-box.

The line you copy/pasted is from the XML style that defines the animation, setting it to be one of the included styles (see the documentation below).

I think you might be wasting your time looking for the graphics in a normal android project...those loading bars are probably in the Android SDK folder someplace (and, by extension, they are pre-installed on every Android phone on the marketplace). Try doing a search for .png files in your SDK install directory and you will find a lot of the bits and pieces. Probably no need for you to worry how it works...

[url]http://developer.android.com/reference/android/widget/ProgressBar.html#attr_android:progressBarStyle
[/url]

Code: Select all

android:progressBarStyle

Since: API Level
Default ProgressBar style. This is a medium circular progress bar.
Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".
This corresponds to the global attribute resource symbol progressBarStyle.
Related Methods
android:progressBarStyleHorizontal

Since: API Level
Horizontal ProgressBar style. This is a horizontal progress bar.
Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".
This corresponds to the global attribute resource symbol progressBarStyleHorizontal.
Related Methods
android:progressBarStyleLarge

Since: API Level
Large ProgressBar style. This is a large circular progress bar.
Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".
This corresponds to the global attribute resource symbol progressBarStyleLarge.
Related Methods
android:progressBarStyleSmall

Since: API Level
Small ProgressBar style. This is a small circular progress bar.
Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".
This corresponds to the global attribute resource symbol progressBarStyleSmall.
Related Methods

IronChef253
Junior Developer
Junior Developer
 
Posts: 11
Joined: Sun Jun 13, 2010 6:51 am

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 4 guests