ビューを拡張するクラスを作成しました。レイアウトでlayout.addView(何か)をしようとしていますが、例外はありません。
レイアウト
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</RelativeLayout>
クラス
public class Navigator extends View {
Context context;
RelativeLayout layout = (RelativeLayout) findViewById(R.layout.navigator);
public Navigator(Context context) {
super(context);
this.context = context;
}
TextView tab1 = new TextView(context);
tab1.setText("blah");
PROBLEM-> layout.addView(tab1);
}