0

Basically what I want is a simple progressbar with a custom layout to be just a 2dp - 3dp thin line, used to show some progress (RAM used), something like this one:

http://www.uiparade.com/portfolio/dark-progress-loader/#

Could someone recommend me the best approach to do this?

Thanks in advance!.

  • Don't you think you'd be much happier with the result if you did some research and attempted it yourself, first? – Cat Sep 22 '12 at 01:10
  • This is not just because I didn't searched, is because I'm searching the best approach, following Android Design guidelines and trying not to break CTS. Why?, I'm part of a project building custom ROMs and designing features (This one for example will show ram usage on Recent apps altogether with our already implemented "Clear all recents" button). There's no need to explode, does it makes you feel good to answer people like that?. I could implement an easy snippet in seconds, The thing is to always optimize. – Jesus David Gulfo Agudelo Sep 22 '12 at 01:55

1 Answers1

1

you can set a custom drawable and a ProgressBar. here's a post that talks about it can shows how it can be done,

Custom Drawable for ProgressBar/ProgressDialog

of course, the hard part is correctly designing the drawable to get the look you want. that's left as an exercise for the reader.

Community
  • 1
  • 1
Jeffrey Blattman
  • 22,176
  • 9
  • 79
  • 134
  • This was the first idea that came to my mind, but then I thought about doing some kind of Custom view and override onDraw to get my desired behaviour, I guess i'll try this one first, designing the drawable is the easy part though. – Jesus David Gulfo Agudelo Sep 22 '12 at 01:39
  • Done, did it like this, using `style="?android:attr/progressBarStyleHorizontal"` to give it some Holo magic :) – Jesus David Gulfo Agudelo Sep 22 '12 at 02:25
  • @JesusDavidGulfoAgudelo keep in mind that it won't look the same on android 2, because "progress style horizontal" looks different there (it's not a thin line). you could however find the drawable for the holo drawable in the android 4 source, and put it into your app. – Jeffrey Blattman Sep 24 '12 at 15:46
  • it's not meant to be used on an app. It's a modification of android frameworks itself, Jellybean soruces. – Jesus David Gulfo Agudelo Oct 12 '12 at 00:16