最終更新:2016-05-31 (火) 13:46:54 (2880d)  

明示的インテント
Top / 明示的インテント

Activityをクラス名で指定して呼び出す方法

コンストラクタ

  • android.content.Intent
    コンストラクタ処理内容
    Intent(Context packageContext, Class<?> cls)宛先のクラスを明示的に指定してインテントを作成します。
    Intent(String action, Uri uri, Context packageContext, Class<?> cls)Create an intent for a specific component with a specified action and data.

Intent(Context packageContext, Class<?> cls)

Intent(String action, Uri uri,Context packageContext, Class<?> cls)

  • setAction(action);
  • mData = uri;
  • mComponent = new ComponentName(packageContext, cls);

関連