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. sending an intent from RuntimeInit crash handlers.

Hi,

I want to send an intent from a crash handler [ crash(String tag,
Throwable t) in RuntimeInit.java) ] to an activity (stand alone
appllication)

I tried to send it from above handler as follows..

Intent intent = new Intent
("com.sonyericsson.android.bugreport.action.START_MYAPP");
               intent.setFlags(Intent.MY_ACTIVITY_NEW_TASK);
               ActivityManagerNative.getDefault().startActivity
(intent);

but i failed to send an intent to my application..

Can i send an intent to my application fro RuntimeInit.java handlers?

Thanks in advance!

-Ram

-- 

2. Fatal error occurs during creating CDMAPhone in 2.0 releas

Fatal error occurs during creating CDMAPhone but not during creating
GSMPhone in 2.0 release
Here is log. ( logcat -b radio )
  :
D/STK     ( 1853): StkService: StkService: is running
D/STK     ( 1853): StkService: NEW sInstance
I/PHONE   ( 1853): Creating GSMPhone
  :
D/PHONE   ( 1853): [PhoneProxy] Switching phone from GSMPhone to
CDMAPhone
D/PHONE   ( 1853): [PhoneProxy] Setting Radio Power to Off
  :
D/PHONE   ( 1853): mDoesRilSendMultipleCallRing=true
D/PHONE   ( 1853): mCallRingDelay=3000
D/CDMA    ( 1853): [CdmaDataConnection] DataConnection.clearSettings()
D/CDMA    ( 1853): [CdmaDataConnection] CdmaDataConnection
<constructor>
< Fatal Error occurs  : Expect "Creating CDMAPhone" >

If change PREFERRED_NETWORK_MODE to NETWORK_MODE_CDMA from
NETWORK_MODE_WCDMA_PREF in RILConstants.java, Telephony should use
CDMAPhone as default , this error always occurs as below
   :
D/PHONE   ( 1853): mDoesRilSendMultipleCallRing=true
D/PHONE   ( 1853): mCallRingDelay=3000
D/CDMA    ( 1853): [CdmaDataConnection] DataConnection.clearSettings()
D/CDMA    ( 1853): [CdmaDataConnection] CdmaDataConnection
<constructor>
< Fatal Error occurs  : Expect "Creating CDMAPhone">

Let me know how to fix it.

-- 

3. Can't log event PHONE_UI

4. Specifying SeekBar colors in layout file ...

5. How to install my app and keep an icon from showing up in the application tray

6. Reg Dec11 Android Update

7. How to install my app and keep an icon from showing up in the application tray