0
1つのxmlファイルとViewを1つのアクティビティに拡張する1つのクラスを追加して、同時に動作させる必要があります。androidアクティビティに2つのビューを追加する方法
onCreate()
{
RelativeLayout ll= new RelativeLayout(this);
ll.addView(new GraphicsView(this));
ll.--------->how to add main.xml here?
setContentView(ll);// so that i can write like this
}
この問題を解決してください以下のような 、
- main.xml
- プライベート静的クラスGraphicsViewは表示
MyActivityを拡張します。 ありがとう