Created
February 13, 2018 00:53
-
-
Save wongcain/d8747c627163b09ace24d41fd88e6bcf to your computer and use it in GitHub Desktop.
Navigation Data Bindings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.cain.mvvmexample; | |
import android.content.Context; | |
import android.content.Intent; | |
public class OtherScreenRequest implements NavigationRequest { | |
public final String EXTRA_ID = "id"; | |
private final int id; | |
public OtherScreenRequest(int id) { | |
this.id = id; | |
} | |
@Override | |
public Intent getIntent(Context context) { | |
Intent intent = new Intent(context, OtherScreenActivity.class); | |
intent.putExtra(EXTRA_ID, id); | |
return intent; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment