判断对象类型

1 void checkforTextView(View v)
2 {
3     if(v instanceof TextView)
4     {
5         // This is a TextView control
6     } else {
7         // This is not a TextView control
8     }
9 }

 

posted @ 2013-03-27 15:33  染煞之心  阅读(105)  评论(0)    收藏  举报