Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8674347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:41:19+00:00 2026-06-12T19:41:19+00:00

I am attempting to create a custom android style xml. And while everyone else

  • 0

I am attempting to create a custom android “style” xml. And while everyone else I see out there seems to be using ints, it wont even compile:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style  name="DialogStyle"
            parent="android:style/Theme.Dialog"
            >
        <item name="android:background">@color/ReliantCyan</item>
        <item name="android:radius">6</item>
        <item name="android:textColor">@color/White</item>
    </style>
</resources>

gets me:

 .../dialogStyle.xml:7: error: Error: Integer types not allowed (at 'android:radius' with value '6').

I have also tried 6pd and 6px but then it says no strings allowed. What am I doing wrong here?

(any accepted answer must be android 2.2 compatible.)


I have now also tried:

<dimen name="dRadius">10pd</dimen>

and then

<item name="android:radius">@dimen/dRadius</item>

but I get a very similar error:

 ... error: Error: String types not allowed (at 'dRadius' with value '10pd').
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:41:20+00:00Added an answer on June 12, 2026 at 7:41 pm

    I can’t explain this behavior, exactly. Specifying <item name="android:radius">6dp</item> should be enough.

    However, to work around this, we can add a dimension resource (within the same file, even, as long as it’s outside of the style tag), then use that via @dimen.

    Something like this:

    <resources>
        <dimen name="testradius">6dp</dimen>
        <style ...>
            ...
            <item name="android:radius">@dimen/testradius</item>
            ...
        </style>
    </resources>
    

    Make sure to specify it as 6dp (6px should work also), not 6 or 6pd or any variant thereof.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I attempting to create custom tabs using this . But when I try to
I am attempting to create my own custom Autocomplete style dropdown control in c#
I'm attempting to create a custom button using a background image in Interface Builder.
I'm attempting to create a custom control that inherits from System.Web.UI.WebControls.ListView . Codebehind: using
I'm attempting to create a grid style view (similar to NSCollectionView ), except using
I'm attempting to create a custom JButton that has interchangeable skin components. Using CardLayout
I am attempting to create custom colors of the tabs in a TabHost. I
I am attempting to create a custom Adapter for my ListView since each item
So, horray - I'm attempting to create a new custom Payment Gateway. It's designed
While attempting to create a replacement tablespace for USER, I accidentally created a datafile

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.