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. Getting platform files from command line

Hi Everyone,
    I apologize if I'm in the wrong place, and I apologize if you've already
seen this message, but to the best of my knowledge this message never made
it through (since I was a brand new user at the time) I can't figure out how
to get the platform files for development, without running 'android' and
starting the GUI. I want to avoid running GUI applications on my dev server,
since it's headless and I don't want to forward X particularly. I can't
imagine that it does anything more than figure out your platform, pull down
a tarball and unpack it, surely this doesn't necessitate a gui, does anyone
know how I can get the platform files without it?

Cheers,
Dan

-- 

2. android Java code for form action

Hi ,

I did log in form in android ,

How to add the event functionality for this login form,

Now login form display,

I want to add the java code ,

That is When user enter his username and password ,

Get the value into variable and page redirect and system should show ,
you have enter this username and password ..chk the scrren shot..

http://i.imgur.com/Ncnee.gif

-- 

3. Problem with the picasa api

4. AppWidget design pattern with SQLite database

5. Question about NDK

6. How to watermark the camera picture?

7. Chilling news: Oracle sues Google over Android