I'm fairly new to Android development and Java (I come from a Windows
and Windows Mobile background, using C# and .NET), so I hope this is
the correct group to post this question! :)

I am creating a board game (similar to Checkers), and I am using the
Snake game from the API Samples as a starting point / general
framework. I like the TileView as it gives me a good grid to work
with, and I am extending it just like the Snake example does with
SnakeView.

My problem is that I want to make the board bigger than the screen,
and I want the user to be able to move the board around by dragging
and flicking it with their finger.

I enclosed my SkyGame view (which extends TileView) in a ScrollView,
but did not get the expected results. The ScrollView didn't let me
scroll the SkyGame (TileView) around at all with my finger.

Here's my code for my SkyGame.xml:

...............................

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@color/d_sky_blue">


   <ScrollView xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="200px"
    android:layout_height="200px"
    android:scrollbars="none"
    android:background="@color/d_sky_blue">

        <com.spacetornado.skytime.SkyGame
         android:id="@+id/skytime_view"
                android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        />
   </ScrollView>

        <RelativeLayout
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" >

<!-- ... (other views not related to the board go here) --->

        </RelativeLayout>
</FrameLayout>


................................................................

The SkyGame / skytime_view is 300x300 in size (12x12 tile grid, each
tile is 25px square)... so it should be bigger than the 200x200
ScrollView?

Am I going about this the wrong way? Is there a better way to do this?
Basically my board is too big for the screen, and I want a good way
for users to be able to manipulate the board and move it around easily
so they can quickly see whatever part of it they want.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to