[android-developers] Example of setting margins on a view through code

2009-02-17 Thread steele johnson
Hello, Can someone show me an example of how I can set the margins of a view through code? I can't seem to find an example anywhere. The docs say that ViewGroup.MarginLayoutParams is per view, so how would I get/ set the margins of a view. Thanks

[android-developers] Any way of iterating through all views in a view group without knowing their ids?

2009-02-12 Thread steele johnson
I'm looking for a way to iterate a viewgroup to retrieve all child views without calling findViewById(). Does view count and view position line up? So can I get the view count and then use that as a counter to call getChildAt(int index)? Thanks

[android-developers] Re: How to iterate a ViewGroup for a specific view id?

2009-02-12 Thread steele johnson
Also, I do not know the view id's. I just want to iterate through all the views in a group. Thanks On Feb 11, 5:20 pm, Romain Guy romain...@google.com wrote: findViewById() On Wed, Feb 11, 2009 at 2:17 PM, steele johnson jsal...@gmail.com wrote: Hello, I'm looking for a simple method

[android-developers] How to iterate a ViewGroup for a specific view id?

2009-02-11 Thread steele johnson
Hello, I'm looking for a simple method to search a ViewGroup for a specific view given the id. This ViewGroup could have nested ViewGroups as well, so it needs to be recursive. Anyone know if Android as some type of view iterator? I can't seem to find anything. Thanks

[android-developers] Re: How to iterate a ViewGroup for a specific view id?

2009-02-11 Thread steele johnson
...@google.com wrote: findViewById() On Wed, Feb 11, 2009 at 2:17 PM, steele johnson jsal...@gmail.com wrote: Hello, I'm looking for a simple method to search a ViewGroup for a specific view given the id. This ViewGroup could have nested ViewGroups as well, so it needs to be recursive. Anyone

[android-developers] Swapping in and out ViewGroups (Layout) within a container ViewGroup.

2009-01-30 Thread steele johnson
Hello, I'm trying to dynamically swap in and out various layouts to one layout container. I've instantiated the container layout (mContainerLayout) by finding it using the id through the maine Activity layout. This is successful. Next, I add the inner layout by calling: layoutInflater =

[android-developers] Re: Swapping in and out ViewGroups (Layout) within a container ViewGroup.

2009-01-30 Thread steele johnson
Thanks for the help. I'll check out ViewFlipper. On Jan 30, 5:02 pm, Mark Murphy mmur...@commonsware.com wrote: steele johnson wrote: I'm trying to dynamically swap in and out various layouts to one layout container. Option #1: go the path you are trying Option #2: use ViewFlipper

[android-developers] Re: Swapping in and out ViewGroups (Layout) within a container ViewGroup.

2009-01-30 Thread steele johnson
(mInnerLayout) and it worked. What was happen is that it was returning the root and I thought it was the inner layout. ;) On Jan 30, 5:39 pm, steele johnson jsal...@gmail.com wrote: Hello, ViewFlipper doesn't help either because I still need to add the layout dynamically. The problem really

[android-developers] Instantiating a layout from an xml file and/or resource id

2009-01-28 Thread steele johnson
Hello, I'm interested in instantiating a LinearLayout object from an xml file that has a LinearLayout file configuration. I want to do this within a method of my Activity. I tried findViewById() but that returned null. I've made sure that the LinearLayout id is the one I'm passing. Note that

[android-developers] Re: Instantiating a layout from an xml file and/or resource id

2009-01-28 Thread steele johnson
Thank you, I'll give it a try. On Jan 28, 9:05 pm, Mark Murphy mmur...@commonsware.com wrote: steele johnson wrote: Hello, I'm interested in instantiating a LinearLayout object from an xml file that has a LinearLayout file configuration. I want to do this within a method of my Activity

[android-developers] Finding a ViewGroup within another ViewGroup

2009-01-27 Thread steele johnson
Does anyone know how to find a ViewGroup within another ViewGroup at runtime? If I have a Layout file (xml layout), how can I get a reference to a nested Layout? Example: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout_1

[android-developers] Finding a ViewGroup within another ViewGroup

2009-01-27 Thread steele johnson
Does anyone know how to find a ViewGroup within another ViewGroup at runtime? If I have a Layout file (xml layout), how can I get a reference to a nested Layout? Example: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout_1

[android-developers] Re: Finding a ViewGroup within another ViewGroup

2009-01-27 Thread steele johnson
Hmm, layout_2 doesn't appear in the id list. On Jan 27, 5:49 pm, Romain Guy romain...@google.com wrote: Just use findViewById(R.id.layout_2) :) On Tue, Jan 27, 2009 at 2:47 PM, steele johnson jsal...@gmail.com wrote: Does anyone know how to find a ViewGroup within another ViewGroup

[android-developers] Re: Finding a ViewGroup within another ViewGroup

2009-01-27 Thread steele johnson
johnson jsal...@gmail.com wrote: Hmm, layout_2 doesn't appear in the id list. On Jan 27, 5:49 pm, Romain Guy romain...@google.com wrote: Just use findViewById(R.id.layout_2) :) On Tue, Jan 27, 2009 at 2:47 PM, steele johnson jsal...@gmail.com wrote: Does anyone know how to find a ViewGroup

[android-developers] Creating gradients on a view/layout in xml.

2009-01-14 Thread steele johnson
I can't seem to find any docs that explain how to define a color gradient on a view in xml. Can someone point me to an example? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To

[android-developers] Re: Creating gradients on a view/layout in xml.

2009-01-14 Thread steele johnson
Thanks for the help. Oh BTW, do you know where I can find all of the xml tags and attrs in a nice categorized list? On Jan 14, 1:38 pm, Mark Murphy mmur...@commonsware.com wrote: steele johnson wrote: I can't seem to find any docs that explain how to define a color gradient on a view

<    1   2