2016-11-12 9 views
0

id = "credit_wallet"のtextviewでレイアウトを取得しました。TextViewがレイアウト内に表示されない

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@color/md_brown_900" 
    android:orientation="vertical" > 

    <include 
     android:id="@+id/lay_include" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentTop="true" 
       layout="@layout/top_points_bar" /> 
    <TextView 
     android:id="@+id/credit_wallet" 
     android:gravity="center" 
     android:textColor="@color/md_brown_700" 
     android:layout_marginTop="65dp" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentTop="true" 
     /> 
    <com.justfashion.Logo 
android:id="@+id/logo" 
     android:text="Fashion Wallet" 
     android:gravity="center" 
     android:textSize="20dp" 
     android:textColor="@color/md_brown_700" 
     android:layout_marginTop="60dp" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentTop="true" 
     /> 

    <ListView 
     android:id="@+id/listearncredit" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_marginTop="70dp" 
     android:layout_below="@+id/logo" 
     android:cacheColorHint="@color/AliceBlue" 
     android:textColor="@color/AntiqueWhite" 

     android:dividerHeight="0dp" 
     android:divider="@color/Aqua"/> 

</RelativeLayout> 

マイJAVA:

http://pastebin.com/raw/bgf4njkT

それはcredit_walletの値を示していません。なにが問題ですか?みんな助けて!

Btw。サンプルテキストを追加すると、値は表示されず、表示されます。

+1

スクリーンショットを提供できますか? –

+0

これはtextColorの問題です。それに応じてあなたのtextColorを設定してみてください – HelloSadness

+0

なぜあなたはandroidを使用していますか:layout_alignParentTop = "true"を含むレイアウトとTextView。それを行う正しい方法ではないようです。それは問題を引き起こす可能性があります –

答えて

0

実際には、それは表示されますが、textColorは「背景と同じですが、あなたの場合は茶色です」と表示されます。それを設定しよう!

+0

いいえ、それを見ていない、それは別の色、似たような名前です:) –

0

あなたの背景が茶色であるようにそれはloosks、そしてあなたのTextView textcolorも茶色です...
は白ANSにごtextColorを変更してみてください、それはの、textColorの問題だかどうかを確認します。目に見えない価値の茶色=>種類のブラウン...

+0

いいえ、それを見てはいけない、それは別の色、似たような名前です:) –

0

ちょうどあなたが任意のテキストを取得しているか否か、Javaコード

creditWallet.setText(PreferenceConnector.readInteger(aiContext, PreferenceConnector.WALLETPOINTS,0)+""); 

にこの行を確認してください。そこにデバッグを入れてください

+0

しかし、デバッグのエラーを参照してください。 –

関連する問題