Private class OtherListener implements the View. An OnClickListener {
@ Override
Public void onClick (View View) {
The switch (the getId ()) {
Case R.i db tn_register:
//jump to the registered interface
Intent a=new Intent (MainActivity. This, register_activity. Class);
StartActivity (a);
break;
Case R.i d.i b_login_from_qq:
Try {
//is that you can jump to qq home page
Intent b=getPackageManager (). GetLaunchIntentForPackage (" com. Tencent. Mobileqq ");
StartActivity (b);
} the catch (Exception e) {
e.printStackTrace();
//Toast. MakeText (MainActivity. This "not installed QQ," Toast. LENGTH_LONG), show ();
}
break;
Case R.i d.i b_login_from_chat:
Try {
The Intent of c=getPackageManager (). GetLaunchIntentForPackage (" com. Tencent. Mm ");
StartActivity (c);
} the catch (Exception e) {
e.printStackTrace();
//Toast. MakeText (MainActivity. This "not installed WeChat", Toast. LENGTH_LONG), show ();
}
break;
}
}
}
CodePudding user response:
What is the try and catch? You open the toast notes will know where is wrong,CodePudding user response:
No response?? You didn't log logcat output??????E.p rintStackTrace () have no reaction??????
CodePudding user response:
Ib_login_from_chat relating to set up the event?CodePudding user response:
Code quality really??CodePudding user response:
The