also, once you change the bitmap, you need to call invalidate() so
onDraw is called again
On Aug 6, 4:41 pm, Zwiebel hunzwie...@gmail.com wrote:
Thanks I will try it!
On aug. 6, 20:04, Kostya Vasilyev kmans...@gmail.com wrote:
You are calling TextView.setText(int)
Nope.
setImageURI / setImageDrawable / setImageResource in ImageView all call
requestLayout() and invalidate().
07.08.2011 19:28, androidmediadeveloper пишет:
also, once you change the bitmap, you need to call invalidate() so
onDraw is called again
On Aug 6, 4:41 pm,
Thanks for all, I could make it now!
Thanks for fast helps.
On aug. 6, 22:23, Kostya Vasilyev kmans...@gmail.com wrote:
Oh, and here is another one:
nextInt(3) can be one of: 0, 1, 2.
nextInt(3) +1 then becomes one of: 1, 2, 3.
This:
imageArr[rndInt]
expects values 0, 1, 2
So, take
I tried it out and sadly n is 0 everytime, but I don't know why.
On aug. 6, 17:23, Miguel Morales therevolti...@gmail.com wrote:
Add some logging so that you can see what n is.
Then find out why it's not generating a random number.
On Sat, Aug 6, 2011 at 8:33 AM, Zwiebel
On Sun, Aug 7, 2011 at 2:38 AM, Zwiebel hunzwie...@gmail.com wrote:
I tried it out and sadly n is 0 everytime, but I don't know why.
Reading the docs usually helps:
public static double random()
Returns a double value with a positive sign, greater than or equal
to 0.0 and less than 1.0.
Thanks, I could make it with your helps. But now I'm found a new
problem. I try to modify my textview with .setText method, but I got
this error:
ERROR/AndroidRuntime(3745): android.content.res.Resources
$NotFoundException: String resource ID #0x1
ERROR/AndroidRuntime(3745): at
You are calling TextView.setText(int)
counter_txt_foe.setText(counter_foe);
which expects an R.string resource ID for the text.
Do this instead:
counter_txt_foe.setText(String.valueOf(counter_foe));
to call TextView.setText(CharSequence)
-- Kostya
07.08.2011 0:01, Zwiebel пишет:
Thanks,
Oh, and here is another one:
nextInt(3) can be one of: 0, 1, 2.
nextInt(3) +1 then becomes one of: 1, 2, 3.
This:
imageArr[rndInt]
expects values 0, 1, 2
So, take out the +1, to avoid getting an index-out-of-bounds exception.
-- Kostya
07.08.2011 0:01, Zwiebel пишет:
Thanks I made it only forget to delete from here.
On aug. 6, 20:23, Kostya Vasilyev kmans...@gmail.com wrote:
Oh, and here is another one:
nextInt(3) can be one of: 0, 1, 2.
nextInt(3) +1 then becomes one of: 1, 2, 3.
This:
imageArr[rndInt]
expects values 0, 1, 2
So, take out the +1,
Thanks I will try it!
On aug. 6, 20:04, Kostya Vasilyev kmans...@gmail.com wrote:
You are calling TextView.setText(int)
counter_txt_foe.setText(counter_foe);
which expects an R.string resource ID for the text.
Do this instead:
counter_txt_foe.setText(String.valueOf(counter_foe));
to
10 matches
Mail list logo