別のレイアウトに1つのレイアウトを追加する方法.tblrow.XML.soにこのレイアウトを作成しました。この行をmenu.XML.iに追加したいのですが、私はそれを行うことができます。私はどのように私は各行を識別することができますそれを追加します。私を助けてください。私はXMLではないjavaで解決策が必要です。 マイコードは別のレイアウトのレイアウトを追加する
<TableRow android:id="@+id/tblRowMovies" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/btn_backgrnd" android:clickable="true" android:focusable = "true" android:layout_weight="1.0">
<ImageView android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/movie" android:layout_gravity="center_vertical|center_horizontal"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="MOVIES" android:layout_gravity="center_vertical" android:paddingLeft="20dp" android:textColor="@android:color/white" android:textSize="20sp" android:textStyle="bold">
</TextView>
です。
私はthis.butは、Javaコードでそれを必要と知っています。 –
これはあなたを助けるかもしれません。 http://stackoverflow.com/questions/3195668/android-programmatically-include-layout-i-e-without-xml – Gopinath