We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
跳转Activity的跳转方式,是这样的。
AnimalActivity.startActivity(this);
public class AnimalActivity extends AppCompatActivity { public static void startActivity(Context context) { Intent intent = new Intent(context, AnimalActivity.class); context.startActivity(intent); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ...... } }
这种跳转方式跟普通的直接跳转有什么区别吗?
Intent intent = new Intent(this, AnimalActivity.class); this.startActivity(intent);
The text was updated successfully, but these errors were encountered:
@Wing-Li 1. 参数较少时便于控制传递的参数,2. 代码简洁,适用于多处调用 3. 不容易出错 4. 可读性也更好。等等啦
Sorry, something went wrong.
No branches or pull requests
跳转Activity的跳转方式,是这样的。
AnimalActivity.startActivity(this);
这种跳转方式跟普通的直接跳转有什么区别吗?
The text was updated successfully, but these errors were encountered: