私は私の活動に次のコードを持っている:設定のスタイル、アンドロイド
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="TitleRow" parent="@android:style/TextAppearance.Medium">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">#A0A0A0</item>
<item name="android:layout_marginTop">5dp</item>
<item name="android:layout_marginBottom">5dp</item>
<item name="android:paddingLeft">2dp</item>
<item name="android:paddingRight">2dp</item>
</style>
</resources>
:ここ
......
DataCell[i] = new TextView(context,null,R.style.TitleRow);
DataCell[i].setText(data[i]);
......
は解像度である私のstyle.xmlファイルですが>>フォルダ値
値は表示されません。 しかし、DataCell[i] = new TextView(context)
を使用すると、正常に動作します。私は属性セットにnullを使用しているという事実に何らかの問題があることを知っています。しかし、長い時間を探した後、私はそれを行う方法の完全な例を見つけることができません。私は誰かがこれを私に一度だけ明瞭にすることができることを願っています。
あなたは私の単純なコードサンプルを与えてもらえます。 – Brahadeesh
編集済み回答.... –
ルートノードの問題が機能していません。だから私はnullを使用しました。できます。任意のアイデア理由/ – Brahadeesh