How to put Margin for widgets

by Nithin » Thu, 19 Nov 2009 13:42:49 GMT


Sponsored Links
 ny idea, how to put margin for widgets...

setPadding() wont work in my case. I want the entire widget to move,
unlike setPadding. In setPadding(), only contents will move within the
widget.

Thanks

On Nov 18, 3:26pm, Nithin <nithin.war...@gmail.com> wrote:

--



How to put Margin for widgets

by Nithin » Thu, 19 Nov 2009 14:54:24 GMT


 i,

I dont know, what I did till now, now all working fine..

I got the input from this link

http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/app/MenuInflateFromXml.html

the code I am working is,

layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
layoutParams = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
layoutParams.setMargins(30, 10, 0, 0);
TextView tv = new TextView(this);
tv.setText("Sample text");
layout.addView(tv, layoutParams);
setContentView(layout);


Thanks


On Nov 19, 10:42am, Nithin <nithin.war...@gmail.com> wrote:

--


Sponsored Links


Other Threads

1. map that open an overlay when a "pin" is clicked and the overlay contains description and button

Hi,

I like tu use the MapActivity to display some pins. When a pin is
pressed i like to open a description.

This can I obtain following the tutorial:

http://developer.android.com/resources/tutorials/views/hello-mapview.html

But now I like to put a button on the overlay window. That button should open
a detail activity. How can I make this?

How is possible to personalize the overlay "info window"?

-- 
 _| _.  o _| _
(_| (_| \/ | (_| (/_

-- 

2. The onAnimationEnded() event is unreliable

By looking at the code of the ViewGroup class at the function
private void finishAnimatingView(final View view, Animation animation)
{}
it is clear that after the animation ended the view goes through  last
revalidation process.

I suspect that this cause a major bug since we get this event before
the actual animation is ended. The side effect is annoying flickering.

In any case, the question is how to get the real end of animation
event?

-- 

3. How to position buttons in a linear layout?

4. Efficient screen updates for games

5. ReferenceTable overflow (max=512)

6. make automatic login on application

7. Can I use the Linux usbserial driver and ADB at the same time?