Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

test: Reply
LinkBack Thread Tools
Old April 3rd, 2012, 10:56 AM   #1 (permalink)
Thread Author (OP)
Join Date: Nov 2010
Location: London
Posts: 210
Device(s): HTC Desire HD, Samsung Galaxy SII, Samsung Galaxy Nexus, ASUS Nexus 7
Carrier: Not Provided

Thanks: 16
Thanked 8 Times in 7 Posts
Question Remove widget margins in Relative layout?

Essentially as the title says.

I've built a widget; where I want one corner to be right up against the edge of the screen. It's a horizontal widget and made using a relative layout. It's the right hand side margin that I want right up against the screen edge. I've already tried the following:

This did move the entire widget closer to the edge but increasing the dp after that did nothing. It just stopped there, with a gap still there (albeit now a smaller gap).

I've tried using android:gravity. The background of this widget is a drawable shape with a button on it (coded via main.xml as normal). I've tried the above bits of code on both the drawable background XML and the main XML. Nothing works.

I'm sure there is an easy fix to this hence why I'm posting in Dev 101. Thanks in advance!


My Android apps: Link to play store.
RED_ is offline  
Reply With Quote
sponsored links
align right, android, android 4.0, button, edge, layout, margin, margins, relative, screen, xml

Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 01:15 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.