【安卓】从当前Activity获得其他view

it2024-12-15  17

LayoutInflater textInflater=LayoutInflater.from(this); //视图view2 View view=textInflater.inflate(R.layout.view2,null); //获得view2内的名为view2_id的textView TextView textView=(TextView)view.findViewById(R.id.view2_id);
最新回复(0)