while am trying to fetch current focus object i.e View ,,,,by using
getcurrent focus method ...but view object not getting any value it is
showing null value
please let me know what shu i do now....code is given bellow
*public* *class* CurrentView *extends* Activity {
/** Called when the activity is first created. */
View view;
Button bt;
@Override
*public* *void* onCreate(Bundle savedInstanceState) {
*super*.onCreate(savedInstanceState);
setContentView(R.layout.*main*);
bt=(Button)findViewById(R.id.*Button01*);
bt.setText("Get View");
bt.setOnClickListener(*new* View.OnClickListener() {
@Override
*public* *void* onClick(View v) {
// *TODO* Auto-generated method stub
*view**=(View)getCurrentFocus(); //here view is not getting
any value....!!*
}
});
}
-- Ankit
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en