标签:span nts min pre com prot new imp lint
10_FragmentArguments
package com.bignerdranch.android.criminalintent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.Fragment;
import java.util.UUID;
public class CrimeActivity extends SingleFragmentActivity {
private static final String EXTRA_CRIME_ID =
"com.bignerdranch.android.criminalintent.crime_id";
public static Intent newIntent(Context packageContext, UUID crimeId) {
Intent intent = new Intent(packageContext, CrimeActivity.class);
intent.putExtra(EXTRA_CRIME_ID, crimeId);
return intent;
}
@Override
protected Fragment createFragment() {
UUID crimeId = (UUID) getIntent()
.getSerializableExtra(EXTRA_CRIME_ID);
return CrimeFragment.newInstance(crimeId);
}
}
标签:span nts min pre com prot new imp lint
原文地址:https://www.cnblogs.com/zhouheng0918/p/9196845.html