Skip to content

自定义view中无法生成findViewById代码 #26

@appsbuilder999

Description

@appsbuilder999

public class MapOptionView extends LinearLayout implements View.OnClickListener {

public MapOptionView(Context context, AttributeSet attrs) {
    super(context, attrs);

    onCreate();
}

private void onCreate() {
    LayoutInflater.from(getContext()).inflate(R.layout.fmd_map_option, this);
}

@Override
public void onClick(View v) {

}

}

如上代码,选布局文件,只生成了属性字段,对应的findById代码没有生成

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions