Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 13th, 2011, 05:51 PM
Registered User
Join Date: Jun 2011
Location: Norway
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to solo
Question A solid red Drawable resource


The code should give me a rectangular Shape Drawable with a solid
fill, rounded edges, 10dp outline, and 10dp of padding around
each edge.

But where should I put the code??

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
         android:radius="15dp" />
Reply With Quote
  #2 (permalink)  
Old June 15th, 2011, 09:04 PM
Registered User
Join Date: Jun 2011
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post

This is a generic shape defined in XML.

file location:
The filename is used as the resource ID.

resource reference:
In Java: R.drawable.filename
In XML: @[package:]drawable/filename
Good luck!
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[red]Setting prob[/red] shivanshub ASP.NET 2.0 Professional 1 September 12th, 2006 10:01 AM
How to create solid caret in C# mr_deb C# 0 June 23rd, 2006 01:58 AM
Dreaded red X sibbs Dreamweaver (all versions) 3 February 17th, 2006 07:56 PM
from color="red" to color='red' juaniux XSLT 2 November 16th, 2004 04:18 PM
How to find RGB %'s of a solid colour image rhofing General .NET 0 June 11th, 2004 01:26 PM

All times are GMT -4. The time now is 02:47 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.