-public class ProfileDetailActivity extends AppCompatActivity {
- private MobileLedgerProfile profile;
+public class ProfileDetailActivity extends CrashReportingActivity {
+ private static final String TAG = "profile-det-act";
+ private ProfileDetailFragment mFragment;
+ public static void start(Context context, @Nullable Profile profile) {
+ Intent starter = new Intent(context, ProfileDetailActivity.class);
+ if (profile != null) {
+ starter.putExtra(ProfileDetailFragment.ARG_ITEM_ID, profile.getId());
+ starter.putExtra(ProfileDetailFragment.ARG_HUE, profile.getTheme());
+ Logger.debug(TAG,
+ String.format(Locale.ROOT, "Starting profile editor for profile %d, theme %d",
+ profile.getId(), profile.getTheme()));
+ }
+ else
+ Logger.debug(TAG, "Starting empty profile editor");
+ context.startActivity(starter);
+ }
+ @NotNull
+ private ProfileDetailModel getModel() {
+ return new ViewModelProvider(this).get(ProfileDetailModel.class);
+ }