In my application generating dynamic text view. I want to add onclickListener to my text view.
How can I do it please give me some hint.
Here hard code for textview .
for (int i = 0; i < subCategory.length; i++) {
TextView tv = new TextView(this);
tv.setText(subCategory[i]);
tv.setId(i);
sCategoryLayout.addView(tv);
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…