0

これが私のレイアウトです

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root" 
android:orientation="vertical"
android:layout_width="fill_parent" 
android:layout_height="fill_parent"
android:padding="10dp">

<ImageView android:id="@+id/fullimage" 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:contentDescription="@string/product_picture">
</ImageView>

<TextView android:id="@+id/custom_fullimage_placename"
    android:layout_width="fill_parent" 
    android:layout_height="50px"
    android:textSize="16sp"
    android:textStyle="bold"
    android:textColor="#000000"
    android:layout_weight="1">
</TextView>
</LinearLayout>

これは、pic と text を設定するコードです。

AlertDialog.Builder imageDialog = new AlertDialog.Builder(this);
    LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);

    View layout = inflater.inflate(R.layout.custom_fullimage_dialog,
            null); //(ViewGroup) findViewById(R.id.layout_root)

    System.out.println(text);
    TextView picText = (TextView) layout.findViewById(R.id.custom_fullimage_placename);
    picText.setText(text);

    AQuery aq = new AQuery(layout);
    Bitmap placeholder = aq.getCachedImage(R.drawable.image_missing);
    aq.id(R.id.fullimage).image(imageUrl, true, true, 0, R.drawable.image_missing, placeholder, AQuery.FADE_IN_NETWORK, 0);

   .... 

画像は問題なく表示されますが、テキストを表示できません..そして理由がわかりません。

何か案は?

編集 :

みんなのおかげで問題を解決しました...画像に固定制限を与えました(幅と高さを300dpに設定します..)アラートダイアログ内にあるため、この方法でのみ機能する可能性があります...

4

2 に答える 2

0

テキスト値を実際に設定した場所がわかりません。「println」出力は期待値を示していますか?

于 2013-04-30T19:02:21.477 に答える
0

実際には黒であるテキストビューの色を置き換えてください。

于 2013-04-30T19:03:51.323 に答える