プログラム的には、次のように定義されたRelativeLayout
and (タイトルと呼ばれる) があります。TextView
RelativeLayout layout = new RelativeLayout(this);
final RelativeLayout.LayoutParams parameters_title =
new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
title.setLayoutParams(parameters_title);
layout.addView(title,parameters_title);
これからどんどん追加していきたいと思いtextviews
ますbuttons
。しかし、今のところ、 を に変換するために、RelativeLayout
を aに「変換」したいと思います (言葉にする方法がわかりません) 。このように使おうとしましたが、うまくいきませんでしたView
WindowManager
LayoutInflater
LayoutInflater layoutInflater =
(LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
myView = layoutInflater.inflate(layout, null );
次に、目標はthroughにmyView
入れることです。からを取得するにはどうすればよいですか?WindowManger
addView
View
RelativeLayout