Scrollable area like in Robo Defense game(both horizontal and vertical)

by Maksim » Thu, 13 Aug 2009 22:45:58 GMT


Sponsored Links
 I'm trying to implement something very similar in my application, but
looks like it's impossible to do this with standard components. I read
several topics about such scrolling feature in the group, but all the
topics ends with suggestion to write your own scroll view.
I wonder did somebody implement such scroll view already? Or can
somebody provide a brief how-to on this particular feature.
I think any information on this would be very appreciated by many
members of the group.

Thanks.


--~--~---------~--~----~------------~-------~--~----~



Scrollable area like in Robo Defense game(both horizontal and vertical)

by Markus Junginger » Thu, 20 Aug 2009 08:18:13 GMT


 I'm in the same boat and need a custom ScrollView capable of scrolling
in both directions. Before I start it on my own, I wanted to check
here first. This has probably done before a couple of times and maybe
someone does not mind sharing some code?

Anyone knows if Donut is going to support scrolling in both
directions?

Thanks,
Markus
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Scrollable area like in Robo Defense game(both horizontal and vertical)

by Markus Junginger » Thu, 20 Aug 2009 14:05:26 GMT


 


They must use there own custom UI component because it's not supported
by Android 1.5. Most games won't scroll any child views but will
implement a single game View and handle scrolling "just" for this
view. At least that's how I do it.

Nevertheless, what I was looking for is view something else. To
clarify my requirements a little more: there is just a fixed size View
which is larger than the screen and you need to scroll that and its
child views in both directions. I hope someone shares his/her
solution.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Scrolling text (marquee) in an AppWidget

I'm at wits end here.  How can I have text in an AppWidget (i.e.
widget) scroll?

According to
 http://www.***.com/ ;lnk=gst&q=widget+marquee#29c283a5800a87c4
, it should be doable as following:

 <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:focusable="true"
         android:singleLine="true"
         android:ellipsize="marquee"
         android:mar{*filter*}epeatLimit="marquee_forever">
  <requestFocus/>
</TextView>

This does not work for me.  Can anyone help?

Thanks,
-Matt

-- 

2. Using ? (question mark) and @ (at symbol) as values for a string resource




It can be just a bug. Just make a habbit of always using double quotes
and escape all single and double quotes inside the string. It simply
saves some time, as for example these are also not fully correct:

        <string name="foo1">This is 'quoted' text</string>
        <string name="foo2">"This is "quoted" text"</string>

as the foo1 will throw "Apostrophe not preceded..." error and the
second, while syntax is correct, equals to:

        <string name="foo2">"This is quoted text"</string>

which is not what one intended.

And for a record (in case other will be digging in list archive), you
shall keep in mind you are editing XML file, therefore
entries like this:

        <string name="foo1">"&"</string>
        <string name="foo2">"<"</string>
        <string name="foo3">">"</string>

are also invalid despite the quotation and you shall use:

        <string name="foo1">"&amp;"</string>
        <string name="foo2">"&lt;"</string>
        <string name="foo3">"&gt;"</string>

instead (quotation is optional there but as I said - use it always -
it won't hurt much).

-- 

3. Using ? (question mark) and @ (at symbol) as values for a string resource

4. Post-Mortem on Panic/Reboot

5. EAP-FAST

6. Block device driver

7. (CLOSED) WTA: PRL SMART