最終更新: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.
- actioin - Android/インテント/アクション
- uri - 引数となる値のUri (Android/インテント/URI)
- packageContext - A Context of the application package implementing this class.
- cls - The component class that is to be used for the intent.
Intent(Context packageContext, Class<?> cls)
- mComponent = new ComponentName(packageContext, cls);
Intent(String action, Uri uri,Context packageContext, Class<?> cls)
- setAction(action);
- mData = uri;
- mComponent = new ComponentName(packageContext, cls);