Mark- thanks for your reply!

I am new to 2d graphics and custom components, so let me try to see if
I am reading you right:

You're saying, if I create a table layout with two rows and one
column, and I populate the top row with say 2 buttons and an image, I
can get Android to return the amount of space left over for the other
row? How would I do that? My only knowledge of returning dimensions is
getwidth() and getheight(), which for my g1 return 320x480.

Thanks for your response!

PS, I have a Warescription, is there something I should review?


On Dec 21, 1:17 pm, Mark Murphy <[email protected]> wrote:
> superjet wrote:
> > I had posted a similar thread a while back and received no feedback,
> > so let me try to be more clear...
>
> > I am able to use Androids components to build the most basic layouts,
> > which include images, buttons, text areas, etc. These are like Android
> >Lego! I can build the castle.
>
> > BUT I want to design my own component, my ownLego, that draws on the
> > screen and uses the available area that the Android components have
> > not used. ie, I want to have a top layer of buttons, and the rest of
> > the screen, whatever it is, I want to use to draw 2d graphics. So, I
> > want to make my ownLego, and use it with the other AndroidLego.
> > However, I'm also trying to be a good developer and making this for
> > whatever resolution is thrown my way.
>
> > What is the best way to do this considering the deluge of different
> > resolutions Android developers must cope with? Is there a way to do a
> > table view and return the remaining screen size? Or, am I stuck making
> > an entire new box ofLegohere?
>
> To be honest, I find this one less clear than the original. I think you
> are looking at the problem backwards.
>
> If you create a custom View class ("my ownLego"), your size will
> generally be handed to you, courtesy of the containers (layouts) and
> rules (android:layout_width, android:layout_height). You can indicate
> some size preferences, if needed.
>
> Hence, "the best way to do this considering the deluge of different
> resolutions Android developers must cope with?" is no different for your
> own custom View than it is for anything else -- specify the layout rules
> with density-independent dimensions, use RelativeLayout, etc.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to