views:

12

answers:

1

I'm trying to set up a style that I'll use for my text entry boxes on forms in my application. I've got a basic style, TextEntry, and extensions such as TextEntry.Name. Here's what I want to do:

<style name="PgoTextEntry">
      <item name="android:textAppearance">@style/PingoText.White</item>
      <item name="android:layout_width">fill_parent</item>
      <item name="android:layout_height">wrap_content</item>
      <item name="android:background">@drawable/textentrybox3</item>
      <item name="android:textColorHint">@color/PingoHintColor</item>

</style>
<style name="PgoTextEntry.Name">
      <item name="android:inputType">android:textPersonName | android:textCapWords</item>
</style>

Problem is, that this causes an error, 'String types not allowed ...' It doesn't like me oring the two values textPersonName and textCapWords together.

Any ideas how I can do this so I don't have to put the inputType in for every entry field by hand?

Thanks

A: 

I figured it out. The problem was that I was adding a space on either side of the vertical bar. The code should look like:

<style name="PgoTextEntry.Name">
      <item name="android:inputType">textPersonName|textCapWords</item>
 </style>
Rben