2013年9月12日星期四

[Android] 100 ProgressBar long strip progress bar

I want to be a long strip of progress , requires:
1. If the two pictures, one set as background , one for the foreground ( ie progress section )
2. Do not use XML, entirely by the code set

questions:
1. Circular progress bar is the default , I use code is set to become a long strip .
2. I will set the background image , how to use code Set the foreground picture.
------ Solution ---------------------------------------- ----
read setting circle code, you can set up a rectangle . . .

------ Solution ------------------------------------ --------
android is not to provide a long bar progress bar do ? APIdemo there ah

------ Solution ------------------------------------ --------
landlord does not know why do not the XML .
I know the general progress of the player is to use XML configuration are , for example, cool dog , cool me, everyday sounds and so on.
landlord in order to use such a progress bar , can use the XML configuration

------ Solution ------------------------------------ --------

ProgressBar progressBar = new ProgressBar(this);

progressBar.setIndeterminate(false);

progressBar.setProgressDrawable(getResources()
                  .getDrawable(android.R.drawable.progress_horizontal));

progressBar.setIndeterminateDrawable(getResources()
                  .getDrawable(android.R.drawable.progress_indeterminate_horizontal));


I do not know from time to time LZ want
------ eference ----------------------------- ----------

who probably do not know it, there is no need to set the round , but I have seen are using XML configuration , I asked to use code is set . That there is no API to set the progress bar to strip ?
------ eference --------------------------------------- < br>
did not understand my request? I do not want XML configuration . Give it set the foreground image and background image
------ eference ------------------------- --------------

I want API interface settings, not the other Luanche .
------ eference --------------------------------------- < br>
I was so written , did not achieve the desired effect , there is no background and foreground figure , I want to map the progress bar to go .
------ eference --------------------------------------- < br>
  The reply on 2011-11-07 09:04:48 deleted by moderator

------ eference ------------------------------------ ---
feel no WinCE Android forum forum popular in WinCE forum posts , back to the people still more
------ eference -------------- -------------------------
wonder m talking playback sound effects are not so out of
------ eference ---------------------------------------
out out no ah ? I also the same problem

没有评论:

发表评论