0
私は、複数の動的ビューをアンドロイドで作成しています。親フラグメントと子フラグメントのレイアウトを使用しています。ダイナミックビューを作成していますが、Butterknife 。バターナイフを使用して動的ビューをバインドする方法
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
this is the on create
// Inflate the layout for this fragment
View view = super.onCreateView(inflater, container, savedInstanceState); this.container.addView(inflater.inflate(R.layout.overall_sport_performance_row, null), 5);
iはoverall_sport_performanceレイアウトの1つのTextViewを持っていると私はあなたのフラグメントのビューがoverall_spot_performance.xml
ある場合butterknife
今まで何を試しましたか? onViewCreatedをオーバーライドし、この "ButterKnife.bind(this、view);"を追加してください。その方法で –