2011-03-08 17 views
9

नीचे एक्सएमएल का उपयोग कर रहा हूं और जब मैं एंड्रॉइड का उपयोग करता हूं: textStyle = "italic" विशेषता, पाठ दिखाई नहीं देता है। मूल रूप से स्टाइल सारांश सबबिटेल के साथ कोई भी टेक्स्ट व्यू दिखाई नहीं देगा।टेक्स्ट एंड्रॉइड के साथ दिखाई नहीं देता है: textStyle = "italic"

<style name="SummarySubtitle" parent="@android:style/TextAppearance"> 
     <item name="android:layout_width">wrap_content</item> 
     <item name="android:layout_height">fill_parent</item> 
     <item name="android:gravity">right|center_vertical</item> 
     <item name="android:layout_weight">1</item> 
     <item name="android:paddingRight">6dp</item> 
     <item name="android:textSize">12dp</item> 
     <item name="android:textStyle">italic</item> 
    </style> 

    <?xml version="1.0" encoding="utf-8"?> 
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="fill_parent" android:layout_height="70dp" 
     android:orientation="vertical"> 

     <LinearLayout android:id="@+id/summary_header" 
      android:layout_width="fill_parent" android:layout_height="30dp" 
      android:orientation="horizontal"> 

      <TextView android:id="@+id/summary_title" android:text="Title" 
       style="@style/SummaryTitle"/> 

      <TextView android:id="@+id/summary_subtitle" 
       android:text="Subtitle " style="@style/SummarySubtitle"/> 

     </LinearLayout> 

     <LinearLayout android:id="@+id/summary_subheader" 
      android:layout_width="fill_parent" android:layout_height="20dp" 
      android:orientation="horizontal"> 

      <TextView android:id="@+id/summary_min" android:text="@string/min" 
       style="@style/SummaryHeader"/> 

      <TextView android:id="@+id/summary_max" android:text="@string/max" 
       style="@style/SummaryHeader"/> 

      <TextView android:id="@+id/summary_avg" android:text="@string/avg" 
       style="@style/SummaryHeader"/> 

     </LinearLayout> 

     <LinearLayout android:id="@+id/summary_values" 
      android:layout_width="fill_parent" android:layout_height="20dp" 
      android:orientation="horizontal"> 

     <TextView android:id="@+id/summary_value_min" 
      android:text="$0.00" style="@style/SummaryValue"/> 

     <TextView android:id="@+id/summary_value_max" 
      android:text="$0.00" style="@style/SummaryValue"/> 

     <TextView android:id="@+id/summary_value_avg" 
      android:text="$0.00" style="@style/SummaryValue"/> 

    </LinearLayout> 

</LinearLayout> 
+0

तो मतलब है कि कि अगर आप एंड्रॉयड निकालें: पाठ-शैली घटकों गाया जाता है? – Necronet

+0

@Necronet सही – Rick

+0

ऐसा लगता है कि कोई भी इटैलिक का उपयोग नहीं करता है ... या अधिक लोग जो नोटिस करेंगे। ^^ पूछने के लिए धन्यवाद। – jellyfish

उत्तर

5

सभी मैं इस विषय पर पाया अब तक

http://groups.google.com/group/android-developers/browse_thread/thread/843376e298e95e14

प्रासंगिक बोली: "ओह, हाँ, मैंने देखा है कि बहुत लेकिन जब आप अपने अनुप्रयोग चलाने के लिए, यह सही ढंग से बना देता है।।"

यह लेआउट के ग्राफिकल प्रतिनिधित्व पर दिखाई नहीं देता है लेकिन जब आप ऐप बनाते और चलाते हैं तो सही तरीके से काम करता है।

+1

दरअसल, जब मैंने डिवाइस पर ऐप चलाया तो शैली सही ढंग से लागू होती है। इसे एक और शैली के साथ संयोजन भी करें, जैसे 'एंड्रॉइड: टेक्स्ट स्टाइल = "बोल्ड | इटैलिक" '। – AlexAndro

+3

मेरे पास विपरीत समस्या है: यह एक्लिप्स पूर्वावलोकन पर सही ढंग से (इटालिक) दिखाता है लेकिन मेरे गैलेक्सी टैब 2 डिवाइस पर नहीं। – thomaus

+0

स्वच्छ निर्माण करने का प्रयास करें? – Sid

-1

इस कोड का उपयोग करने की कोशिश:

adInfoTV.setTypeface(Typeface.MONOSPACE,Typeface.ITALIC); 
संबंधित मुद्दे