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 own Lego, 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 own Lego, and use it with the other Android Lego.
> 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 of Lego here?

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 own Lego"), 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