2016-06-23 3 views
0

これは他の質問とは異なりますので、私の問題を理解してください。 XMLドロアブルが実際のデバイスに表示されない

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:paddingBottom="@dimen/activity_vertical_margin" 
android:paddingLeft="@dimen/activity_horizontal_margin" 
android:paddingRight="@dimen/activity_horizontal_margin" 
android:paddingTop="@dimen/activity_vertical_margin" 
tools:context="com.bradley.learndrawable.MainActivity" > 

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:background="@drawable/test" 
    android:text="2" 
    android:textStyle="bold" 
    android:gravity="center" 
    android:textColor="#FFFFFF" /> 

を次のようにそれが緑の円としてテキストビューを表示する必要があり、私は

のtest.xml

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
android:shape="ring" > 

<size 
    android:height="30dp" 
    android:width="30dp" /> 

<solid android:color="#009688" /> 

を持っていると私は私のTextViewを持っています色は白色、数字は白色です。 グラフィカルビューではうまくいきますが、実際のデバイスではうまくいきません。

すべてのドロウアブルフォルダにドロウアブルをコピーしました。 まだ私にとっては幸運はありません。

ヘルプ! :)

Screenshot of Graphical View

+0

それは後で何もないdrawableフォルダにあるべきです。 – CaseyB

+0

私はEclipseの兄弟を使用します☺ –

+0

テキストの色を黒に設定するとどうなりますか?テキストは表示されていますか? – MidasLefko

答えて

0

あなたはandroid:layerType="software"を試すことができます。私はこれが問題を解決するかどうかは分かりませんが、それはうまくいくかもしれません。

+0

答えがわからない場合は、 –

+1

@JuanCruzSolerあのスマートです。ありがとう! –

+0

兄弟、それは動作しませんでした。 –

関連する問題