Re: [android-developers] Equally verticaly spaced button

2012-05-12 Thread Kostya Vasilyev
Ah, ok, I'll bite.

View is exactly the android.widget.View that you mentioned above.

You can use it just like any other View subclass in a layout XML.

Ordinarily, it's useless, because a View doesn't draw anything. But here we
can use it to provide spacing between the other views / widgets / buttons.

The code I wrote in my email was not syntactially complete, I omitted the
usual implied things like android: namespace prefix, layout_ attribute
prefixes.

With this boilerplate stuff in place, it might look like this:

?xml version=1.0 encoding=utf-8?
LinearLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=vertical
 Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=button 1/
 View
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1/

Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=button 2/
 View
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1/

Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=button 3/
/LinearLayout

-- K

2012/5/12 huberte svend.wal...@gmail.com

 Le vendredi 11 mai 2012 19:03:39 UTC-4, Kostya Vasilyev a écrit :

 View? No, View is definitely not documented. It might not even exist.

 /LameJoke


 :)

 Of course it's documented, but not the way your wrote it.

 Because your code as you wrote is:

 - not referenced in
 http://developer.android.com/reference/android/view/View.html
 - returns error

 would you be so kind and give me some explanation ?


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Equally verticaly spaced button

2012-05-11 Thread Jason Teagle
What exactly is the problem here? You get three buttons, that equally fill 
the parent vertically.


Please try to be a little more specific about the problem - state what you 
expected, and what you got (in case it doesn't match what somebody else 
might get).



--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Equally verticaly spaced button

2012-05-11 Thread huberte
Exactly. Look closely at the title. I thought it was clear enoug. Sorry Jason. 

Space, e.g having the same space between them, not resizing them. 

For example : top-20dp-button-20dp-button-20dp

I I was clear enough 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Equally verticaly spaced button

2012-05-11 Thread Kostya Vasilyev

... where 20dp is a dynamic size, based on how much space is available?

If that's what you want, consider:

LinearLayout orientation=vertical

Button height=wrap_content/

View width=fill_parent, height=0dp, weight=1/

Button height=wrap_content/

View width=fill_parent, height=0dp, weight=1/

Button height=wrap_content/

/LinearLayout

The View items act as spacers, and will be dynamically resized by 
LinearLayout due to having weight attribute.


-- K

11.05.2012 15:25, huberte написал:

Exactly. Look closely at the title. I thought it was clear enoug. Sorry Jason.

Space, e.g having the same space between them, not resizing them.

For example : top-20dp-button-20dp-button-20dp

I I was clear enough



--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Equally verticaly spaced button

2012-05-11 Thread huberte
Thanks but your code is not working, what is this view item ? I searched, 
it's not documented, is it ? I can complete the code you gave me (id,  
missing with type view)

http://developer.android.com/reference/android/view/View.html 

20 dp was an example, I could have written 2000 dp or whatever

Le vendredi 11 mai 2012 08:20:25 UTC-4, Kostya Vasilyev a écrit :

 ... where 20dp is a dynamic size, based on how much space is available? 

 If that's what you want, consider: 

 LinearLayout orientation=vertical 

 Button height=wrap_content/ 

 View width=fill_parent, height=0dp, weight=1/ 

 Button height=wrap_content/ 

 View width=fill_parent, height=0dp, weight=1/ 

 Button height=wrap_content/ 

 /LinearLayout 

 The View items act as spacers, and will be dynamically resized by 
 LinearLayout due to having weight attribute. 

 -- K 

 11.05.2012 15:25, huberte написал: 
  Exactly. Look closely at the title. I thought it was clear enoug. Sorry 
 Jason. 
  
  Space, e.g having the same space between them, not resizing them. 
  
  For example : top-20dp-button-20dp-button-20dp 
  
  I I was clear enough 
  

 -- 
 Kostya Vasilyev 



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Equally verticaly spaced button

2012-05-11 Thread Kostya Vasilyev
View? No, View is definitely not documented. It might not even exist.

/LameJoke
 12.05.2012 1:58 пользователь huberte svend.wal...@gmail.com написал:

 Thanks but your code is not working, what is this view item ? I searched,
 it's not documented, is it ? I can complete the code you gave me (id, 
 missing with type view)

 http://developer.android.com/reference/android/view/View.html

 20 dp was an example, I could have written 2000 dp or whatever

 Le vendredi 11 mai 2012 08:20:25 UTC-4, Kostya Vasilyev a écrit :

 ... where 20dp is a dynamic size, based on how much space is available?

 If that's what you want, consider:

 LinearLayout orientation=vertical

 Button height=wrap_content/

 View width=fill_parent, height=0dp, weight=1/

 Button height=wrap_content/

 View width=fill_parent, height=0dp, weight=1/

 Button height=wrap_content/

 /LinearLayout

 The View items act as spacers, and will be dynamically resized by
 LinearLayout due to having weight attribute.

 -- K

 11.05.2012 15:25, huberte написал:
  Exactly. Look closely at the title. I thought it was clear enoug. Sorry
 Jason.
 
  Space, e.g having the same space between them, not resizing them.
 
  For example : top-20dp-button-20dp-button-**20dp
 
  I I was clear enough
 

 --
 Kostya Vasilyev

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Equally verticaly spaced button

2012-05-11 Thread huberte
Le vendredi 11 mai 2012 19:03:39 UTC-4, Kostya Vasilyev a écrit :

 View? No, View is definitely not documented. It might not even exist.

 /LameJoke 


:)

Of course it's documented, but not the way your wrote it.

Because your code as you wrote is:

- not referenced 
in http://developer.android.com/reference/android/view/View.html
- returns error

would you be so kind and give me some explanation ?


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Equally verticaly spaced button

2012-05-11 Thread huberte
Le vendredi 11 mai 2012 19:03:39 UTC-4, Kostya Vasilyev a écrit :

 /LameJoke 


By the way your blog is terrific and your apps great !

congrats ! 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en